7 ms·
Hint: disable or minimize overcommit and you're good to go.
by oshiar53-0 5y ago
Hint: disable or minimize overcommit and you're good to go.
- justsomehnguy 5y agoThat works for the systems I control. Most of the time I encounter OOM shenanigans on the systems which aren't mine.
- rrss 5y agoI dearly wish overcommit could be disabled per-cgroup, but AFAIK this is not possible. malloc failing seems like a much simpler indication of memory pressure than the alternatives like PSI.
- zozbot234 5y agoAIUI, you can always use plain old ulimit to restrict virtual memory usage per-process, which has the same outcome as disabling overcommit.
- rrss 5y agoyeah, for a single process. but I’m mostly interested in doing this for a process tree (like a browser), and I don’t think this would work well in that case, since the limit would apply to each process individually. this would work if there was a cgroup virtual address space controller, but I think those have been proposed but never merged.
- kasabali 5y agoIn my short experience you can't disable overcommit if you're using Linux on desktop because programs using gtk/glib freak out when they can't malloc.