interpretation of malloc_stats_print() output

Mayank Kumar (mayankum) mayankum at cisco.com
Tue Jun 2 23:42:11 PDT 2015


Thanks Jason.

From: Jason Evans [mailto:jasone at canonware.com]
Sent: Tuesday, June 02, 2015 10:10 PM
To: Mayank Kumar (mayankum)
Cc: jemalloc-discuss at canonware.com
Subject: Re: interpretation of malloc_stats_print() output

On Jun 2, 2015, at 11:25 AM, Mayank Kumar (mayankum) <mayankum at cisco.com<mailto:mayankum at cisco.com>> wrote:
I am trying to match output from malloc_stats with output from top and also trying to figure out total process virtual memory usage from stats.

What fields in the stats should be added to get the total virtual memory for my process ?

For the version of jemalloc you're using, virtual memory can be computed by multiplying the number of chunks times the chunk size -- 396 MiB in this case.

Also is this link an accurate measurement of fragmentation for my process?
http://jemalloc.net/mailman/jemalloc-discuss/2014-April/000766.html

from the link it seems active should be less than allocated, but I see otherwise. Is there a documentation somewhere to decipher this interesting output from jemalloc stats ?

The jemalloc manual documents all the statistics:

                http://www.canonware.com/download/jemalloc/jemalloc-latest/doc/jemalloc.html



CPUs: 2
Arenas: 8
Pointer size: 4
Quantum size: 16
Page size: 4096
Min active:dirty page ratio per arena: 8:1
Maximum thread-cached size class: 32768
Chunk size: >>>4194304<<< (2^22)
Allocated: 251363184, active: 270594048, mapped: 415236096
Current active ceiling: 1488977920
chunks: nchunks   highchunks    curchunks
            100           99           >>>99<<<
huge: nmalloc      ndalloc    allocated
            0            0            0
 [...]

Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jemalloc.net/mailman/jemalloc-discuss/attachments/20150603/fcbc3a2e/attachment.html>


More information about the jemalloc-discuss mailing list