-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
OOM despite --heap-size-hint
#50658
Comments
Could you post a small example that leads to the error? This would help a lot in narrowing the issue down |
I happens reproducible with my production code, but I am not allowed to share it... So far it did not happen with the smaller code examples I tried, I will continue to try to create an MWE... |
Indeed, if manually running GC stops the OOM killer bumping your process off, then the problem is likely not failing to return freed memory to the system, but how GC knows that OOM is approaching and so can work harder to collect unreferenced memory. IIRC there are several Julia issues about that, but of course my search for them is failing just now. |
What is |
And I have 32 G memory. |
It would be good to see if this is happening on recent julia nightlies. @gbaraldi's recent GC logic changes should have fixed this. |
Just a note that the OOM killer is activated by the total memory of your cgroup IIUC, not just the parent, so would likely include any worker process memory usage as well as the parent process. Does |
How big is
|
@oscardssmith can you link the PRs you mentioned? |
and in ps aux 16 times:
and
|
We have updated the heuristics more, so the GC should try harder to avoid exceeding this memory limit. We, however, don't control how much memory is required by external libraries (e.g. LLVM) so we expect precompile to take substantial amounts of memory and only possible to do on large build machines as a requirement for building (but not running). |
I often see that my code is killed due to out-of-memory. This happens when using pmap, but also when running single threaded single process code that allocates a lot repeatedly from the repl. I tried to add --heap-size-hint, but it did not help.
My workaround: I added the following code to all functions that allocate a lot:
This should not be needed, the garbage collector should do a full collection before the system runs out of memory on its own.
The text was updated successfully, but these errors were encountered: