drawback of transparent_hugepage=always?

Josh Boyer jwboyer at fedoraproject.org
Thu Dec 11 14:04:07 UTC 2014


On Thu, Dec 11, 2014 at 01:51:41AM +0100, Reindl Harald wrote:
> Google around brings no clear statement
> 
> is there any drawback of boot with "transparent_hugepage=always" which seems
> not to be the default currently - as far as i understand it should recude
> the overhead of memory management (especially in virtual guests) and seems
> to have been the default for some time
> 
> http://oracle-base.com/articles/linux/configuring-huge-pages-for-oracle-on-linux-64.php
> at least talks about "You can check the current setting using the following
> command, which is displaying the default value of "enabled=[always]"
> 
> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Performance_Tuning_Guide/s-memory-transhuge.html

We had this set to always for quite a while.  However, it isn't a win on
all workloads.  You can run into overhead in cases where you have a
smaller amount of RAM that is often allocated and freed frequently,
which fragments it quite a bit and causes a lot of hugepages to be
broken into regular pages, etc.  We discussed this a bit with the
upstream developers and they didn't expect big wins in a typical desktop
or laptop machine.  We switched to madvise by default so that
applications that can benefit still do, while the overhead for
everything else is reduced.

For static workloads like databases, or virt hosts, or machines with
larger amounts of RAM it might make sense to have it as always.

josh


More information about the kernel mailing list