-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Fix heapsize hint and use a line for max memory #48747
Conversation
so that large machines utilize more of their ram
Is the equation correct? double percent = ngigs * 0.00703125 + 0.6; // 60% at 0 gigs and 90% at 128 to For |
Oops, It's not correct at all :). Thanks |
expose the max heap size to Sys
Couldn't this lead us to OOM more frequently on large shared machines? |
You have more gigabytes to spare on a large machine than a small so I dont think that would be the case. |
A64FX has 32 GiB of memory for 48/50 cores |
I'm not sure there's a clean solution for something like that. Outside of using heap-size hint. |
Could you spell out the implications of this in this context for me? |
My understanding of your comment was that you wanted to suggest "large machines" have large memory, was that not the case? |
Our reasoning of large machine here is lots of total memory. Not cores specifically |
I meant, for a machine with a lot of memory the "slack" that the GC gives is larger than that for a machine with little memory. For shared machines you should probably set up some cgroup containerization to share resources between users. |
src/gc.c
Outdated
max_total_memory = total_mem / 10 * 6; | ||
uint64_t ngigs = total_mem / 10e9; | ||
if (ngigs < 128) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: align bracket with if condition
Minor comments. Overall makes sense to me. |
* Fix heapsize hint and use a line so that large machines utilize more of their ram (cherry picked from commit 51db8af)
The idea here is that there is a kinda fixed amount of background memory for OSs and other things, so on small machines we are more conservative, but if the user has a lot of ram we should try and use most of it.
Also fix heap-sizehint since it got broken on the last change.