The gc in this output means that the line was printed during GC; the thread itself is a regular
application thread. The size of this thread's TLAB is 221 KB. Since the last young collec-
tion, it allocated eight objects from the heap ( slow allocs ); that was 1.6% (0.01613) of the
total amount of allocation done by this thread, and it amounted to 11,058 KB. 0.1% of the
TLAB was “wasted,” which comes from three things: 10,336 bytes were free in the TLAB
when the current GC cycle started; 2,112 bytes were free in other (retired) TLABs, and 0
bytes were allocated via a special “fast” allocator.
After the TLAB data for each thread has been printed, the JVM provides a line of summary
TLAB totals: thrds: 66 refills: 3234 max: 105
slow allocs: 406 max 14 waste: 1.1% gc: 7519856B
max: 211464B slow: 120016B max: 4808B fast: 0B max: 0B
In this case, 66 threads performed some sort of allocation since the last young collection.
Among those threads, they refilled their TLABs 3,234 times; the most any particular thread
refilled its TLAB was 105. Overall there were 406 allocations to the heap (with a maximum
of 14 done by one thread), and 1.1% of the TLABs were wasted from the free space in re-
In the per-thread data, if threads show a large number of allocations outside of TLABs, con-
sider resizing them.
Applications that spend a lot of time allocating objects outside of TLABs will benefit from
changes that can move the allocation to a TLAB. If there are only a few specific object types
that are always allocated outside of a TLAB, then programmatic changes are the best solu-
Otherwise—or if programmatic changes are not possible—you can attempt to resize the
TLABs to fit the application use case. Because the TLAB size is based on the size of eden,
adjusting the new size parameters will automatically increase the size of the TLABs.
The size of the TLABs can be set explicitly using the flag -XX:TLABSize= N (the default
value, 0, means to use the dynamic calculation previously described). That flag sets only the
initial size of the TLABs; to prevent resizing at each GC, add -XX:-ResizeTLAB (the default
for that flag is true on most common platforms). This is the easiest (and, frankly, the only
really useful) option for exploring the performance of adjusting the TLABs.