I've seen plenty of memory related questions on Ubuntu, and to be honest I really can't understand how it is still possible to struggle with such issues.
I have 8GB RAM. I've experimenting with/without swap without much differences.
The problem is that I frequently (up to once a day) have to hard reboot my laptop because it's entirely frozen (waiting does not help). It's most probably related to RAM usage of my web browsers. Appart from this, no high demanding process is running on the laptop.
In order to experiment/reproduce:
- I "fill" my memory with Python with an infinite loop that fill a list.
- I open my (web) browser (either Chrome / Firefox), with one or more tabs.
My observations are:
- Python cannot allocate memory infinitely: it will eventually raise a
- the browser in the other hand, does not give a f*** about it, and will, in my case, hang the system. I have to hard reboot the laptop then.
I'm do not understand:
- why the browser is allowed to allocate more and more memory (to the very last bit it seems)
- why does the system hangs instead of "just" killing a process.
I'm aware that swapping requires CPU, so it may hang the system for a while. That's why I disabled it, so I was thinking that the kernel would rapidly decide to kill a process.
I can't understand how such a basic usage (using browsers) could be a problem with a recent OS using 8GB RAM. Do I need to tweak my system in order to have a reliable one?
Thanks for any advice / explanation / tricks that would help.