I’ve had one or two situations where swap might have helped a memory 
consumption problem, but others in which it would have *worsened* cluster 
performance.  Sometimes it’s better for the *cluster* for an OSD to die / 
restart / get OOMkilled than for it to limp along sluggishly.

In the past RAM capacity and cost were such that one had to compromise on the 
amount provisioned, today with a Ceph cluster if one can’t get CapEx to 
properly outfit OSD nodes, one has bigger problems than just RAM.  Eg. maybe 
one filled all DIMM slots with small-capacity modules and retrofitting would 
mean throwing a bunch of them away.   Anyone remember how the Sun 4/110 was 
shipped back in the day if ordered with minimum RAM?  Or the similar crap that 
NCD pulled?

So basically I agree that there’s little or no benefit to it.  Especially if 
only 5% of physmem as suggested below — a tiny amount of swap has a tiny 
benefit at best.  In other words, if you really do need swap, arguably what you 
REALLY need is more RAM.

I suggest that the OP has swap configured because NVMe is mentioned, perhaps 
there’s the idea that swap on NVMe is fast enough to be usable without horquing 
user experience.  But that was only slightly implied, in the OP’s deployment 
it’s still possible that the swap is on a SATA/SAS/etc. boot drive, not NVMe.

Swap on any kind of SSD is going to add unnecessary wear, esp. if you provision 
low-durability drives.


> Without reading the links:
> 
> from more then 20y Linux server and datacenter hosting environment, around 7y 
> of Ceph, and hundreds of different systems all configured without swap. I 
> never ever had a problem with noswap that would be solved using swap.

> > Swap is nothing you want to have in a Server as it is very slow and can 
> > cause long downtimes.
> 
> Given the commentary on this page advocating at least some swap to
> enable Linux to manage memory when under pressure:
> 
> https://utcc.utoronto.ca/~cks/space/blog/unix/NoSwapConsequence
> 
> is it worth modifying the advice to at least have some swap available
> (even if only say 5% of overall memory)?
> 
_______________________________________________
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io

Reply via email to