Transparent Huge Pages
How do we fine tune Transparent Huge Pages? Is there a guideline that someone can point to? We are seeing some issues in our customer sites and the IT department has raised the question to us. We are using a Master-Shard setup and below are the messages from the support team, not sure what to interpret from this:
MASTER DB [root@cospnomniapd1v my.cnf.d]# cat /proc/meminfo |grep -i huge AnonHugePages: 1517568 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB
[centina@cospnomniapd1v ]$ egrep 'trans|thp' /proc/vmstat nr_anon_transparent_hugepages 746 thp_fault_alloc 33471 thp_fault_fallback 0 thp_collapse_alloc 1113 thp_collapse_alloc_failed 0 thp_split 1494
THP usage in Master Db is quite less as we have allocated only 5Gb of innodb_buffer_pool_size and there is no thp_collapse_alloc_failed in master DB
on the other hand shard Db is using 10Gb of ram size as THP out of 15Gb Ram and there are failures also on thp allocation. not sure what is the impact of this failure. We have allocated 10GB of innodb_buffer_pool_size in both the shards.
below are some stats from SHARD 2 and similar behavior is observed in SHARD1
SHARD DB 2 [centina@cospnomniapd3v ]$ cat /proc/meminfo | grep -i huge AnonHugePages: 11798528 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB
[root@cospnomniapd3v ]# egrep 'trans|thp' /proc/vmstat nr_anon_transparent_hugepages 5780 thp_fault_alloc 30114 thp_fault_fallback 502 thp_collapse_alloc 1690 thp_collapse_alloc_failed 118 thp_split 1175