Transparent Huge Pages
Jakob Blomer
jakob.blomer at cern.ch
Mon Feb 20 09:00:19 PST 2012
> If you mmap a huge page (say, 1MB), then MADV_DONTNEED a few 4-KB
> chunks inside, transparent huge pages should break up the huge page so
> it can decommit the parts I asked it to decommit. If it doesn't, that
> sounds like a kernel bug to me!
>
> Similarly, if I mmap 1MB, get a huge page, and then touch only a few
> bytes in the middle, the kernel shouldn't commit a huge page.
>
> If huge pages is behaving how I expect, I don't see why it would cause
> your application to use more memory.
>
> Just to check, you're measuring RSS, not vsize, right?
It is VmRSS from /proc/$pid/status. And I find the difference between
loaded and not loaded in AnonHugePages from /proc/meminfo.
Hm... it's not a vanilla kernel but Scientific Linux 6.2 / Fedora 16. I
can check again using a vanilla kernel.
Cheers,
Jakob
More information about the jemalloc-discuss
mailing list