-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
A large number of non-referenced small objects results in runaway memory increase on 0.4, gradual increase on master #15543
Comments
Ram usage increasing in a runaway manner when allocating a lot of dead small object sounds like #13993 |
I'll test on the latest 0.4 commit. On master while the growth is much slower, it does keep growing and does not reach a steady state. |
Oh! I didn't realize that #13993 has not been merged. A point to note is that with the call to |
Not sure if this is helpful, but I did test it on 0.3.12. Explosive growth there as well, this seems a bit of a longstanding issue. |
Tagging this as 0.5 since it is a deal-breaker for long running programs. If we cannot have an automatic fix, we should at least provide a workaround of the type mentioned above. |
The issue seems to be that the allocation pattern (allocate a lot of live objects and throw them away at once) breaks the current full collection heuristics. Need to see how can we tweak the heuristic without introducing issues like #12632 .... |
Is the issue here that this memory is never reclaimed or that it is not reclaimed soon enough? |
Not soon enough |
In that case we need to improve the heuristic for when to do a full collect to handle this better. Perhaps this is stating the obvious, but hopefully it helps focus attention and energy for this issue. |
Yes. Thats my plan after I come back from this conference. |
The "when to do a full collect" is difficult to get right - depends on system configuration as well as load on the system. I still feel a simpler solution is to expose the total allocated amount and then do a full collect either a) at a pre-configured limit or b) the user can check the same and call |
* Delete `gc_bits` and `allocd` which are not enough to accurately record the necessary information. * Add `has_marked` and `has_young` to identify free pages and untouched pages. Fixes #15543
This turns out to be a similar issue with the one fixed by #13993 (I was confused by the GC pause count ....) and it seems that the sweep is somehow confused by the page metadata and misses the free pages. However it seems that the band-aid in #13993 doesn't really fix this case, so I end up using the scheme @carnaval and I put together for the bit swap GC, which fixes both cases and is surprisingly easy to implement on the current GC..... |
* Delete `gc_bits` and `allocd` which are not enough to accurately record the necessary information. * Add `has_marked` and `has_young` to identify free pages and untouched pages. Fixes #15543
* Delete `gc_bits` and `allocd` which are not enough to accurately record the necessary information. * Add `has_marked` and `has_young` to identify free pages and untouched pages. Fixes #15543
* Delete `gc_bits` and `allocd` which are not enough to accurately record the necessary information. * Add `has_marked` and `has_young` to identify free pages and untouched pages. Fixes #15543
* Delete `gc_bits` and `allocd` which are not enough to accurately record the necessary information. * Add `has_marked` and `has_young` to identify free pages and untouched pages. Fixes #15543
* Delete `gc_bits` and `allocd` which are not enough to accurately record the necessary information. * Add `has_marked` and `has_young` to identify free pages and untouched pages. Fixes #15543
* Delete `gc_bits` and `allocd` which are not enough to accurately record the necessary information. * Add `has_marked` and `has_young` to identify free pages and untouched pages. Fixes #15543
* Delete `gc_bits` and `allocd` which are not enough to accurately record the necessary information. * Add `has_marked` and `has_young` to identify free pages and untouched pages. Fixes #15543
* Delete `gc_bits` and `allocd` which are not enough to accurately record the necessary information. * Add `has_marked` and `has_young` to identify free pages and untouched pages. Fixes #15543
* Delete `gc_bits` and `allocd` which are not enough to accurately record the necessary information. * Add `has_marked` and `has_young` to identify free pages and untouched pages. Fixes #15543
* Delete `gc_bits` and `allocd` which are not enough to accurately record the necessary information. * Add `has_marked` and `has_young` to identify free pages and untouched pages. Fixes #15543
* Delete `gc_bits` and `allocd` which are not enough to accurately record the necessary information. * Add `has_marked` and `has_young` to identify free pages and untouched pages. Fixes #15543
* Delete `gc_bits` and `allocd` which are not enough to accurately record the necessary information. * Add `has_marked` and `has_young` to identify free pages and untouched pages. Fixes #15543
* Delete `gc_bits` and `allocd` which are not enough to accurately record the necessary information. * Add `has_marked` and `has_young` to identify free pages and untouched pages. Fixes #15543
* Delete `gc_bits` and `allocd` which are not enough to accurately record the necessary information. * Add `has_marked` and `has_young` to identify free pages and untouched pages. Fixes #15543
Issue and reduced code sample reported and provided by @kswietli in JuliaLang/Distributed.jl#36.
Have changed
pmap
in the original code tomap
.In 0.4, the above code results in RAM usage increasing in a runaway manner. On master it is is much slower but still increases fairly gradually.
The text was updated successfully, but these errors were encountered: