-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect collection_pages calculation in mem balancer #918
Comments
Alternatively, we can count non-empty pages during the release stage. This can avoid introducing cost during the transitive closure. |
We have reserved pages, which is non-empty pages. But that does not always equal to pages we traversed in a GC. There are memory that is alive and reserved, but is not traversed in a GC. Like unreachable objects in immortal spaces, or mature objects in a nursery GC. |
Can you point to the page in the paper which mentions it's traversed bytes and not collected bytes? |
In Fig 4 of the paper, when it refers to 'bytes collected during collection', it means 'bytes traversed by the GC' rather than 'bytes freed by the GC' (we checked with the author). |
Ah right. This is just a heuristic anyway, so maybe it's fine to just use live bytes instead of traversed bytes. |
This PR fixes #918. We misinterpreted 'bytes collected during collection' in the paper, and used reclaimed pages for it. It actually means 'bytes that are traversed during collection'. We now use live pages to estimate the value.
The mem balancer paper uses a metric called 'bytes collected during GC'. I interpreted as 'bytes reclaimed'. But it turned out to be incorrect. It should actually be 'bytes traversed during GC'.
Basically our calculation for the following field is wrong. We should fix this.
mmtk-core/src/util/heap/gc_trigger.rs
Line 188 in 9175e68
As we use pages for our calculation (such as live pages, and allocation pages), the question for us is that how we can get the number of pages traversed by the GC. Earlier we added a way to count traversed bytes (#768), but it counts bytes not pages. We probably can calculate traversed pages from live pages and promoted pages.
The text was updated successfully, but these errors were encountered: