LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 10-01-2014, 11:27 PM   #1
LinuxLover
Member
 
Registered: Feb 2004
Distribution: Centos 7 x86_64 , Rocky Linux 8 (aarch64)
Posts: 196

Rep: Reputation: 32
Transparent Huge Pages usage on RHEL 6


Hi geeks,
We have many RHEL servers being used only for BIND DNS no other application on these servers.Mainly two RHEL version are being used RHEL 5&6.

It is observed that memory utilization on RHEL 6 machine remains high and RHEL 6 systems keep on increasing the memory gradually whereas we have set the Bind max cache size at 2GB.
After lot of investigation and google searching it is discovered that running process memory utilization is not high like check the below stats

Code:
$ free -m
             total       used       free     shared    buffers     cached
Mem:          7857       7574        283          0        483       2731
-/+ buffers/cache:       4359       3498
Swap:         8191         13       8178


Here system is using 4359MB acutal RAM.

If I check the RSS memory usage of all running process

Code:
]$ ps -e --format rss  | awk 'BEGIN{c=0} {c+=$1} END{print c/1024}'
1917.84
It is less the 2GB.

If we check the kernel memory usage ( Slab)

Code:
]$ cat /proc/meminfo | grep Slab
Slab:            1024312 kB
It is around 1GB

By consulting RHEL 6 documentation , it is found they have enable by default Transparent Huge Pages (AnonHugePages). So if we check the

Code:
]$ cat /proc/meminfo |grep AnonHugePages
AnonHugePages:   1728512 kB

Now I have two question
1- Does these AnonHugePages memory utilization is separate or it is included under used memory of processes ( RSS memory of all running proccess in system)

2- If our Total memory in system 8GB or less , should we disable the AnonHugePages or keep it enable ?


After few weeks or months system start using swap memory and performance degraded.So we have to reboot the machine.
 
Old 10-02-2014, 12:51 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Spin through /proc/*/smaps looking for "Huge"; there'll be a *lot* of them - sum them per pid in a similar awk to above. Or just look at the pid for bind.
That'll tell you who has them allocated.

The ony way I can see this being a problem is if the process asks for a page, writes something (small) then allocates a new page, and gets a huge page allocated each time.
As for turning them off - if it causes a problem, sure. But it's your system not mine .... Can be done on the fly, or at boot.
 
1 members found this post helpful.
Old 10-02-2014, 02:27 AM   #3
LinuxLover
Member
 
Registered: Feb 2004
Distribution: Centos 7 x86_64 , Rocky Linux 8 (aarch64)
Posts: 196

Original Poster
Rep: Reputation: 32
Dear syg00, Thanks for your reply.

If I sum up the AnonHugePages of each process it is exactly the same as system depicting in meminfo look below

Code:
# grep AnonHugePages /proc/*/smaps | awk '{print $2}' |grep -v "^0" |  awk '{sum += $1;} END {print sum " KB" ;}'
1728512 KB
and
Code:
# cat /proc/meminfo |grep AnonHugePages
AnonHugePages:   1728512 kB
If I check only the BIND process AnonHugePages it is using more then 99%

Code:
]# grep AnonHugePages /proc/6839/smaps | awk '{print $2}' |grep -v "^0" |  awk '{sum += $1;} END {print sum " KB" ;}'
1724416 KB

From this I am taking the impression that these running process are using AnonHugePages but it is not included in RSS memory of process (ps aux ).Where as Free command count these AnonHugePage under actual used memory of system. Am I right ?

Still unable to decided should I turn it off or not on system having less then 8GB memory.
 
Old 10-06-2014, 10:13 PM   #4
LinuxLover
Member
 
Registered: Feb 2004
Distribution: Centos 7 x86_64 , Rocky Linux 8 (aarch64)
Posts: 196

Original Poster
Rep: Reputation: 32
Still looking for some more feedback
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Huge pages are stolen by another process tikit Linux - Server 2 06-11-2013 01:31 AM
LXer: Leverage transparent huge pages on Linux LXer Syndicated Linux News 0 04-27-2007 03:33 AM
huge memory usage while doing nothing alizta Linux - General 4 05-11-2004 02:40 PM
Huge text in man pages and help gekko9 Linux - Newbie 3 05-01-2004 12:01 PM
Huge RAM usage? RTT Slackware 4 11-28-2003 03:51 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 11:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration