Relates :
|
|
Relates :
|
|
Relates :
|
Anonymous metaspace has about 60% memory waste (See JDK-8187338 for details.) It turns out that current chunk allocation sizing algorithm is not optimized for anonymous metaspace, especially, its metadata space. The average occupancy size of metadata space is just a little over 1K. Current algorithm initializes metadata space with SpecializeChunk (1K), then immediately bumps up to SmallChunk (4K) once the initial chunk exhausted. Based on usage distribution, there is about 50% metadata spaces only use 1K - 2K memory, out of 5K of allocated space, which is the major contribution to about 60% total waste of anonymous metaspace. The enhancement purposes, for anonymous metadata space, to stay with SpecializedChunk, instead of jumping to SmallChunk, up to 4 limit. My experiment shows that it reduces total anonymous metaspace waste from ~60% to ~30%.
|