Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I run at 1xRAM. Seems that my problems went away after that.

Ubuntu by default sets it to 2GB even if you have something like 16GB RAM. Swap file can then fill up pretty quickly.



> Ubuntu by default

Yep, one of my systems got this treatment. It's annoying because OOM has been an issue ever since. I'm playing with EarlyOOM and trying to remember if it'll be a huge pain to resize the partition for more swap space. Thanks for your reply.


Thanks for the tip on EarlyOOM. Swap file is at least easier to handle than swap partition.

Some run their Linux without swap at all, however I think that is better for a server setup where you run a small set of specific set of binaries, thus you know your load.

That is not the case on a desktop where you running a variable set of binaries depending on your task.

I’m somewhat surprised how bad this works on Linux, I don’t think I ever experienced a swap problem on Windows (not even in the 9x days), I guess this is because "Year of the Linux desktop" never happened, Linux is primarily a server and embedded OS, not a desktop OS.


Unless one have the latest SSDs on a server to tolerate occasional spikes in memory zram makes more sense. Just configure it to use lz4 compressor. This way even with halve of the memory compressed the system remains somewhat responsive and if the compression no longer helps, then killing the memory hog is probably the right thing.


On my desktop I run with no swap, overcommit disabled, and earlyoom. I frequently do heavy work with it including such things as Chromium builds and it's trouble free. See above for the tweaks I've made to ensure perfect responsiveness under all loads.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: