5

Linux kernel new feature called Transparent Huge Pages (THP) which is by default enabled on CentOS 6.x and above OS. Is THP good for MySQL DB machine?

I am trying following to disabled THP but seems not working

$sudo echo never > /sys/kernel/mm/transparent_hugepage/enabled
$sudo cat /sys/kernel/mm/transparent_hugepage/enabled 
always madvise [never]

Why still showing?

$sudo grep -i AnonHugePages /proc/meminfo
AnonHugePages:    176128 kB

Kernel:

$uname -r
3.13.0-37-generic
  • In general huge pages are a good thing for any kind of database server. – Bratchley Apr 17 '15 at 2:20
  • I heard from various sources, just disable it because it create high load on CPU especially DB server. – Satish Apr 17 '15 at 2:23
  • No, I have no idea why someone would say that. Huge pages are intended to prevent swapping from disk so if anything it lowers CPU utilization for sequential memory access which is common. The down side is that it can waste memory space. I think Oracle has a problem with THP specifically and prefer you just allocate them statically. Still huge pages are usually a good thing. – Bratchley Apr 17 '15 at 2:29
  • It looks like Oracle's issue with THP is with I/O not CPU. – Bratchley Apr 17 '15 at 2:29
  • 1
    I suggest forget THP and focus on tuning mysql itself, it has alot of options that can improve performance dramaticaly. – Baazigar Apr 17 '15 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.