Thursday 15 January 2015

java - Allocations in new TLAB vs allocations outside TLAB -



java - Allocations in new TLAB vs allocations outside TLAB -

the java mission command tool in jdk provides statistics object allocation in new tlab , allocations outside tlab. (it's under memory/allocations). significance of these statistics, performance of application? should worried if objects allocated outside tlab , if yes, can it?

a tlab thread local allocation buffer. normal way objects allocated in hotspot within tlab. tlab allocations can done without synchronization other threads, since allocation buffer thread local, synchronization needed when new tlab fetched.

so, ideal scenario much possible of allocations done in tlabs.

some objects allocated outside tlabs, illustration big objects. nil worry long percentage of allocations outside tlabs vs allocations in new tlabs low.

the tlabs dynamically resized during execution each thread individually. so, if thread allocates much, new tlabs gets heap increment in size. if want can seek set flag -xx:mintlabsize set minimum tlab size, illustration -xx:mintlabsize=4k

answer provided colleague david lindholm :)

java performance garbage-collection jvm jmc

No comments:

Post a Comment