4 ms·
I committed the grave mistake of purchasing a laptop with only 8GB ram and I constantly run out of memory as a result. When it happens, I just repeatedly mash a
by deepbreath 7y ago
I committed the grave mistake of purchasing a laptop with only 8GB ram and I constantly run out of memory as a result.
When it happens, I just repeatedly mash alt+sysrq+f until it kills off some chromium tabs and unfreezes my machine. It essentially behaves like one of those extensions that lets you unload tabs. If needed, you can get the tab back by just reloading the page.
The machine slows down to a crawl at 96% usage, and freezes at 97% usage (according to my i3 bar).
- wolfgang42 7y agoA few months ago I upgraded my system to 8GB RAM and I don't see the behavior you describe. It does require a little more care when choosing which programs to use[1], but not significantly so. However, you do need to make sure you have swap enabled to let the kernel efficiently manage its resources. It's not unusual for me to have 1-2 GB of stuff in swap; this doesn't affect performance significantly since it's parts of the system that don't need to run, but if you insisted that they all stay resident then it would put a considerable strain on the system in low memory conditions. [1] The big one for me is that I can't run the Atom text editor, Firefox, and a virtual machine all at the same time.
- kevin_thibedeau 7y agoI run 8GiB without swap. It kills processes off quite nicely when hitting OOM as there is no time wasted with paging out to slow storage.
- the8472 7y ago> slow storage Linux recently gained the ability to swap huge pages to NVMe without having to split them. Combined with THP this can be quite fast.
- eikenberry 7y agoHow recent? Did this happen back in the 4.x series or is it new to the 5.x series?
- the8472 7y ago4.14 contains some of the changes I read about. But the patch notes are different than what I originally read, I'm not sure whether this is the full feature or whether some of it stalled.
- foldr 7y ago>[1] The big one for me is that I can't run the Atom text editor, Firefox, and a virtual machine all at the same time. Is this on Linux? I have no problem with that workload on an 8GB Macbook Air (2019). I was apprehensive about going with the 8GB model, but I've not really had any issues. I wonder if memory compression on OS X helps here.
- wolfgang42 7y agoYes, this is Linux. I say "can't run" but what I really mean is that things start to get slower after a while until eventually it becomes annoying. This is probably in part due to my habit of accumulating open tabs and windows, and also because I run KDE which is pretty memory-hungry on its own. If you don't do this or you're the sort of person who shuts down your computer every night you might never see this problem so it's hard to compare just based on the list of programs.
- snazz 7y agoAre you swapping to the “VM” section of your APFS container on an insanely fast PCIe (NVMe?) SSD? That’s my guess. Although macOS does a great job of handling poorly behaved programs that use tons of RAM just to begin with.
- foldr 7y agoI'm sure the fast SSD helps to mitigate the relatively small amount of RAM, yes. I can't say to what extent.
- sus_007 7y agoAlmost every other laptop comes with an empty RAM slot nowadays, I bet you can plug in an extra few gigs into it.
- deepbreath 7y agoNot thinkpad x1 carbon
- codedokode 7y agoAnd I cannot install more than 4 Gb (thanks to Intel for planned obsolence) and have to use several Electron-based programs (each takes not less than 500 Mb). When there is not enough memory, the system can freeze to the point that I cannot even move a mouse pointer.
- saagarjha 7y ago> have to use several Electron-based programs Have you thought about running browser-based versions? I tend to find that these behave a lot better.
- codedokode 7y agoMaybe I will try it, but in my case I run them isolated under another user account so it means that I will have to run several instances of a browser (but I'll try to compare the memory usage). Because I don't want them to install cookies and track me across the Internet.
- rymate1234 7y agoFirefox Containers is a great way of doing this without having to run separate browsers https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/ https://addons.mozilla.org/en-US/firefox/addon/multi-account... Also incidentally electron apps afaik don't install cookies on your main browser, they should be separate anyway
- account42 7y agoHow do you manage with only 512 MB RAM?
- papaf 7y agoI committed the grave mistake of purchasing a laptop with only 8GB ram and I constantly run out of memory as a result. I recommend that you try ZRAM. It has made a difference in a 8GB laptop that I use: https://www.cnx-software.com/2018/05/14/running-out-of-ram-in-ubuntu-enable-zram/ https://www.cnx-software.com/2018/05/14/running-out-of-ram-i... For 8GB I run a 2GB ZRAM swap.
- snazz 7y agoHow much “extra” RAM does that translate to for your workload?
- el_isma 7y agohttps://github.com/rfjakob/earlyoom https://github.com/rfjakob/earlyoom will help you. It will kill those processes for you.