spark

spark

95M Downloads

Correct the memory usage after GC

i0xHeX opened this issue ยท 1 comments

commented

Currently the data is incorrect (for example for old gen pool usage after last GC):
image

I suggest to make a workaround and make this calculation approximate, but actually to display what we want to see. Make a scheduled task every tick, or half a second, or even every second, and collect memory usage. Then, suppose we have next values:
{memory_used_prev} (previous call)
{memory_used}
{memory_used_after_gc} ( = {memory_used} on first call )

Each call, if {memory_used} is less than {memory_used_prev}, we do:
{memory_used_after_gc} = {memory_used}

P.S. Most probably I misunderstood the current purpose of showing memory at last GC, meaning it is the memory used BEFORE GC, but the feature suggestion is to show total memory used AFTER GC.

commented

P.S. Most probably I misunderstood the current purpose of showing memory at last GC, meaning it is the memory used BEFORE GC, but the feature suggestion is to show total memory used AFTER GC.

It would probably be useful to show both...