Status: Assigned
Owner: erik.corry
CC: [email protected]
Labels: Type-Bug Priority-Medium NewGC
New issue 2121 by [email protected]: NewGC: sweeper can reclaim less
then estimation based on live bytes count promises
http://code.google.com/p/v8/issues/detail?id=2121
After GC if lazy sweeping is active we estimate used heap size to be
real_size_of_objects = size - unswept_free_bytes
where size includes unswept pages as fully used and unswept_free_bytes
compensates for that:
unswept_free_bytes = number_of_unswept_pages * page_size -
live_bytes_on_unswept_pages.
however (page_size - live bytes) is not necessarily equal to the amount of
memory that sweeper will free (it's an upper bound): we don't put
everything into free lists and conservative sweeper just skips 32-words
regions that are not completely free.
Thus as sweeper advances real_size_of_objects might grow. This might lead
to confusing memory measurements (e.g. heap size after scavenge can become
bigger as sweeper walks over fragmented parts of the heap).
There are two important questions we should consider:
1) Big difference between (page_size - live bytes) estimation and memory
actually freed by sweeper indicates page fragmentation and should be used
as a signal to compaction;
2) Used heap size growing after GC might confuse a) our own heuristics that
rely on heap sizes and b) embedders relying on GetHeapStatistics
Can we somehow alleviate this?
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev