Using swap even much free RAM available

dvb91

Member
Apr 29, 2023
21
1
8
Hi,

I built a new cluster with 3 nodes, each on identical hardware :

1722006522061.png
- Intel 13th 20 cores + 64 GB of DDR5 RAM + 2 x SSDs
- Proxmox on first SSD (and first SFP+ 10 Gb/s)
- Ceph on second SSD (and second SFP+ 10 Gb/s )

Despite a swappiness at 10, I noticed that PVE3 is using swap even I have that much free RAM available (RAM's consumption doesn't exceed about 50 GB), as reported by the system :



1722008104262.png

I would like to keep swap (in case of problem), but I don't want to use it continuously (to preserve ssd's life).

Perhaps I missed something.
Could you please give me some configuration advice ?

Best Regards.
 
Hi!
your 2GB of swap probably aren't used continuously, but it's more like a long-term outsourcing of pages. You can always decrease your swappiness to e.g., 1, but I wouldn't worry to much about this.
If you're interested you can also check out this blog: https://chrisdown.name/2018/01/02/in-defence-of-swap.html.
 
Hi,
I was worried that swap will wear out the ssd prematurely.
I am going to take a look to Chris Down's blog.

Thank you.