Hacker News new | ask | show | jobs
by wolfgang42 2514 days ago
A 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.

2 comments

I 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.
> 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.

How recent? Did this happen back in the 4.x series or is it new to the 5.x series?
4.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.
>[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.

Yes, 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.
Are 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.
I'm sure the fast SSD helps to mitigate the relatively small amount of RAM, yes. I can't say to what extent.