Transparent Hugepages: measuring the performance impact
TL;DR This post explains Transparent Hugepages (THP) in a nutshell, describes techniques that can be used to measure the performance impact, shows the effect on a real-world application. The benefits are pretty obvious: no changes required on application side; it reduces the number of TLB misses; page table walking becomes cheaper. One of the key metrics is the number of CPU cycles spent in the page table walking:
Another important metric is the number of main memory reads caused by TLB miss; those reads miss the CPU caches hence quite expensive:
Another powerful way to measure how TPH affects performance and latency is tracing/ probing Linux kernel functions.
Source: alexandrnikitin.github.io