Hacker News new | ask | show | jobs
by seppel 748 days ago
> Swapping 32GB of memory in and out of an NVMe SSD is much faster than swapping 1GB out of a spinning disk so I really don't get that argument.

This is true, but it still takes time. What kind of workload do you have where you swap out 32GB of RAM? If you are in this situation you almost certainly need to buy these additional 32GB of RAM.

2 comments

What if I don't have no more free DIMM slots but I already have 1 TiB NVMe and I am fine with my workload being finished slightly (or even noticeably) slower as opposed to not being able to do at all?

As an example of such workload: a server, one of the many, that runs financial calculations from many web users. It's fine for it to become somewhat slower: we'll notice the performance degradation in the metrics and stop accepting new connections for a while. It is not fine for it to just die with OOM ― the users automatically will reconnect to other servers, leading to a sort of a thundering herd scenario.

> What if I don't have no more free DIMM slots but I already have 1 TiB NVMe and I am fine with my workload being finished slightly (or even noticeably) slower as opposed to not being able to do at all?

Then you obviously have a workload where having swap make sense (and you could even add swap on the fly in such a case). But that is not typical at all.

On a desktop/laptop, where most of the “used” RAM (browser tabs) isn't actually used at once.
Firefox (and I guess Chrome as well) throws aways memory of unused tabs.
You can't do that in all situations, since they could have important state.
Which is incredibly annoying and thankfully can be disabled.