Monday, September 30, 2013

transparent huge pages make me grumpy

So some clever soul(s) has an idea of helping us manage memory for our Linux 6 based systems.  Maybe it is a good idea ( eventually ) but in early and mid days of Linux 6 you really don't want to do this.

Any reasonably sized Linux database server ( say 8 gb of RAM and up / 32 gb a no brainer ) really SHOULD BE USING hugepages ( that's regular huge pages ) for the SGA.  Read up on how to use them and configure them.  They are good ... really good ... but you need to pay some attention and make sure you know how to size and monitor.

Any reasonably sized Linux database server running 6.x should stay the HECK away from transparent huge pages ... sorry you need to research it a little or at least google it ... not ready for prime time.

Typically the quick/easy way of doing it ( disabling ) in Linux 6 is by adding lines to /etc/rc.local like this:

echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag

Also please be careful depending on distro and sometimes release level within distro the names and/or subdirectories of things under /sys/kernel may change ... so you need to make sure each time you are patching/changing things that it is still "disabled".

One way of getting your toes wet in the monitoring sand is catting /proc/meminfo and making sure that you know what is being reported in there and why.

Good luck all and sorry if I have been slow in blogging about this topic.  Discovered in my old shop well back in 2012 ... but apparently not as well known as it should be.




No comments:

Post a Comment