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

This is important knowledge. My past misconception was that without swap system will be more efficient, programs will be killed when running out of memory instead of inefficiently running on hard disk-backed memory. In reality, Linux becomes totally unresponsive when running out of memory on systems without swap. This is because instead of swapping the least used parts of memory, it frees RAM by removing from it executable program code and shared libraries, because these things can be re-read from disk.


My experience is opposite.

Linux (long ago) always became unresponsive when running out of memory with swap. Removing the swap solved this problem and it remained perfectly responsive when running out of memory.

I have no longer used swap for many years, so I do not know the current behavior with swap, but I have seen out of memory cases on modern systems without swap and I have never seen again a case when the computer becomes unresponsive.


I wonder if there's knobs to fix that. One of the organizations I worked at had a very aggressive OOM killer.




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

Search: