echo always >/sys/kernel/mm/transparent_hugepage/defrag
echo always >/sys/kernel/mm/transparent_hugepage/enabled
For more details see: http://lwn.net/Articles/423584/
echo always >/sys/kernel/mm/transparent_hugepage/defrag
echo always >/sys/kernel/mm/transparent_hugepage/enabled
For more details see: http://lwn.net/Articles/423584/
I would be interested in seeing some benchmarks that shows the affect of using huge pages of different sizes with hash tables or other data structures.
Here is a memory bandwidth benchmark that uses huge pages (only uses the default size which is 2Mbyte on my system): http://blogs.utexas.edu/jdm4372/2010/11/11/optimizing-amd-op...
It only sums the values from 32 million doubles (about 256Mbytes of ram). So it is only useful as a memory read speed benchmark. But is does show a lot of different ways to optimize memory bandwidth (prefetch, large pages, sse).
It does turn out that to fully remove TLB misses I'd need 1GB pages, which as was pointed out, are rather scary to imagine being paged to disk, as it would take approximately 10s to page it out. As machines with 512GB or 1TB of RAM become more commonplace, I wonder if there could be a mechanism to better assist with their allocation. Right now, one has to use a bunch of manual management and be extremely aware of any other processes that might start consuming memory.