High amount of private clean data in smaps
Jason Evans
jasone at canonware.com
Mon Jun 3 16:23:05 PDT 2013
On May 30, 2013, at 4:06 PM, Kurtis Martin wrote:
> 1) Why does jemalloc have smaps with such large Private_Clean size? I'm actually surprised jemalloc has such large smaps in general. I would expect a bunch of smaller smaps that match the configured chunk size.
I've been trying to figure this out for quite a while now, and I have yet to come up a way to transition pages that were mapped as MAP_PRIVATE|MAP_ANON to the Private_Clean state. My experiments included fork(2) abuse, mmap'ed files, shared anonymous memory, etc., and I'm currently out of ideas. If you're able to observe a process as its Private_Clean page count is increasing, can you capture an strace log to see what system calls are occurring? Also, can you tell me the Linux kernel version you're using, jemalloc configuration (e.g. whether munmap is disabled), and jemalloc run-time options specified?
Regarding large smaps, all the Unix operating systems I've dealt with coalesce mappings that have identical attributes. If jemalloc maps two chunks that happen to be adjacent to each other, the kernel tracks them as a single mapping. jemalloc goes to some effort to make coalescing possible, because Linux unfortunately does linear map scans that severely degrade performance if the number of map entries isn't kept low.
Thanks,
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jemalloc.net/mailman/jemalloc-discuss/attachments/20130603/c463ce5a/attachment.html>
More information about the jemalloc-discuss
mailing list