Proxmox fängt an SWAP Speicher zu nutzen obwohl RAM nicht ausgelastet ist

redjohn

Renowned Member
Apr 22, 2016
132
4
83
28
Hallo,

ich habe gerade festgestellt, dass Proxmox anfängt SWAP-Speicher zu nutzen obwohl noch genügend RAM Speicher verfügbar ist! Wenn ich den Cache leere und SWAP einmal starte und wieder stoppe

swapoff -a
swapon -a
sync; echo 3 > /proc/sys/vm/drop_caches

Dann ist alles wieder frei, aber noch etwas Zeit fängt er wieder an den SWAP zu nutzen. Leider wird jedes mal die Betriebszeit der Container zurückgesetzt wenn ich den Cache leere. Woran liegt es das Proxmox den SWAP nutzt? Rechteproblem? Gibt es dazu eine Lösung?

Danke und Gruß,

Olli
 
Bitte schreibe deine Beiträge in Englisch, da dies hier ein englischsprachiges Forum ist!
Please write your posts in english, it is an english only forum!

To your question: It is not an problem with PVE. This is how swap is working. Please read the docs: https://wiki.ubuntuusers.de/Swap/#Swapnutzung-einstellen

Because I use zfs, so would like to swap only when ram is gone.

Edit "/etc/sysctl.conf" and set your swappiness:
Code:
vm.swappiness =0
And activate it:
Code:
sysctl vm.swappiness=0
Sync the SWAP and that's it
Code:
sync ; sync ; sync ; swapoff -a && swapon -a