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

redjohn

Well-Known Member
Apr 22, 2016
132
4
58
27
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
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!