Workload causes significant internal fragmentation

Thomas W Savage savagetw at us.ibm.com
Tue May 7 13:16:38 PDT 2013


Hey all,

My team is having trouble determining how to address increasing internal
fragmentation (sizeable diff b/w Jm allocated and active) for a particular
workload.

We are allocating objects into three small bins (48, 320, 896). We start
with an insertion phase in which we continually allocate "entries", which
are made up of four allocations: 2x 48-byte objects, 1x 320 obj, and 1x 896
obj. Once we have inserted entries up to a certain threshold, we begin an
eviction phase in which we have some threads continuing insertion and
another thread freeing 320's and 896's (not touching the 48's). By the end
of this run, we observe significant internal fragmentation as demonstrated
in the stats below. Is there anything that can be done to mitigate this
internal frag?

Version: 3.3.1-0-g9ef9d9e8c271cdf14f664b871a8f98c827714784
Assertions disabled
Run-time option settings:
  opt.abort: false
  opt.lg_chunk: 21
  opt.dss: "secondary"
  opt.narenas: 96
  opt.lg_dirty_mult: 1
  opt.stats_print: false
  opt.junk: false
  opt.quarantine: 0
  opt.redzone: false
  opt.zero: false
CPUs: 24
Arenas: 96
Pointer size: 8
Quantum size: 16
Page size: 4096
Min active:dirty page ratio per arena: 2:1
Chunk size: 2097152 (2ˆ21)
Allocated: 7574200736, active: 8860864512, mapped: 9013559296
Current active ceiling: 8963227648
chunks: nchunks   highchunks    curchunks
           4553         4298         4298
huge: nmalloc      ndalloc    allocated
           16           15     35651584

Merged arenas stats:
assigned threads: 79
dss allocation precedence: N/A
dirty pages: 2154593:0 active:dirty, 0 sweeps, 0 madvises, 0 purged
            allocated      nmalloc      ndalloc    nrequests
small:     7515054496     29540988      3552884     29540988
large:       23494656         1432            0         1432
total:     7538549152     29542420      3552884     29542420
active:    8825212928
mapped:    8973713408
bins:     bin  size regs pgs    allocated      nmalloc      ndalloc
newruns       reruns      curruns
            0     8  501   1          176           22
0           11            0           11
[1]
            2    32  126   1        68448         2187
48           22            0           21
            3    48   84   1    666243696     13880077            0
165272            0       165272
[4]
            5    80   50   1         1760           22
0           11            0           11
            6    96   84   2         2112           22
0           11            0           11
[7..12]
           13   320   63   5   2221154560      8717502      1776394
125156       701794       125156
[14..18]
           19   896   45  10   4627583744      6941156      1776442
135776       692084       135774
[20..27]
large:   size pages      nmalloc      ndalloc    nrequests      curruns
[1]
         8192     2           22            0           22           22
[1]
        16384     4         1408            0         1408         1408
[13]
        73728    18            1            0            1            1
[23]
       172032    42            1            0            1            1
[467]
--- End jemalloc statistics ---

Thanks,
Thom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jemalloc.net/mailman/jemalloc-discuss/attachments/20130507/d2bbd8b6/attachment.html>


More information about the jemalloc-discuss mailing list