Hello,
i've got 6 Proxmox nodes in a cluster. 5 of them do not use swap space at all. One node uses all its swap space even when enough RAM is free.
root@pm-04:~# free -m
total used free shared buff/cache available
Mem: 385591 133802 250179 404 1609 249156
Swap: 8191 6070 2121
So i run:
root@pm-04:~# find /proc -maxdepth 2 -path "/proc/[0-9]*/status" -readable -exec awk -v FS=":" '{process[$1]=$2;sub(/^[ \t]+/,"",process[$1]);} END {if(process["VmSwap"] && process["VmSwap"] != "0 kB") printf "%10s %-30s %20s\n",process["Pid"],process["Name"],process["VmSwap"]}' '{}' \;
1 systemd 268 kB
4351 systemd-journal 328 kB
18245 pmxcfs 2908 kB
18561 pvestatd 33456 kB
18562 pve-firewall 49200 kB
18694 pve-ha-crm 75164 kB
18778 pve-ha-lrm 28572 kB
20021 kvm 3121576 kB
21263 kvm 1143880 kB
23190 kvm 1148764 kB
32384 kvm 114908 kB
32416 kvm 164856 kB
34684 kvm 129356 kB
34694 kvm 549484 kB
34745 kvm 1384544 kB
50348 dsm_sa_datamgrd 11868 kB
51278 kvm 231728 kB
51370 dsm_om_connsvcd 480 kB
51371 dsm_om_connsvcd 134092 kB
To find out which processes use swap space. The fun part about those kvm processes is that the VM itself does not use any swap at all. And the RAM usage of the VM was like 2GB of 32GB. Now when i migrate one of the VMs that uses swap on the host it will use swap on the node i migrated it to.
I migrated one VM to pm-01, after migration:
root@pm-01:~# free -m
total used free shared buff/cache available
Mem: 386931 251155 126834 3256 8941 129936
Swap: 8191 443 7748
Before it was 0. Look at all the free RAM on that host.
Does anyone know why the swap is full on one node and not on others? On every host i have enough free RAM.
Does anyone know why the new process on the new host uses swap after migration?
Thanks & Cheers,
Daniel
i've got 6 Proxmox nodes in a cluster. 5 of them do not use swap space at all. One node uses all its swap space even when enough RAM is free.
root@pm-04:~# free -m
total used free shared buff/cache available
Mem: 385591 133802 250179 404 1609 249156
Swap: 8191 6070 2121
So i run:
root@pm-04:~# find /proc -maxdepth 2 -path "/proc/[0-9]*/status" -readable -exec awk -v FS=":" '{process[$1]=$2;sub(/^[ \t]+/,"",process[$1]);} END {if(process["VmSwap"] && process["VmSwap"] != "0 kB") printf "%10s %-30s %20s\n",process["Pid"],process["Name"],process["VmSwap"]}' '{}' \;
1 systemd 268 kB
4351 systemd-journal 328 kB
18245 pmxcfs 2908 kB
18561 pvestatd 33456 kB
18562 pve-firewall 49200 kB
18694 pve-ha-crm 75164 kB
18778 pve-ha-lrm 28572 kB
20021 kvm 3121576 kB
21263 kvm 1143880 kB
23190 kvm 1148764 kB
32384 kvm 114908 kB
32416 kvm 164856 kB
34684 kvm 129356 kB
34694 kvm 549484 kB
34745 kvm 1384544 kB
50348 dsm_sa_datamgrd 11868 kB
51278 kvm 231728 kB
51370 dsm_om_connsvcd 480 kB
51371 dsm_om_connsvcd 134092 kB
To find out which processes use swap space. The fun part about those kvm processes is that the VM itself does not use any swap at all. And the RAM usage of the VM was like 2GB of 32GB. Now when i migrate one of the VMs that uses swap on the host it will use swap on the node i migrated it to.
I migrated one VM to pm-01, after migration:
root@pm-01:~# free -m
total used free shared buff/cache available
Mem: 386931 251155 126834 3256 8941 129936
Swap: 8191 443 7748
Before it was 0. Look at all the free RAM on that host.
Does anyone know why the swap is full on one node and not on others? On every host i have enough free RAM.
Does anyone know why the new process on the new host uses swap after migration?
Thanks & Cheers,
Daniel