[SOLVED] swappines = 0, VZ takes more than 100% swap

mannebk

Member
May 23, 2016
29
0
21
54
I run: Linux 4.15.18-9-pve #1 SMP PVE 4.15.18-30 (Thu, 15 Nov 2018 13:32:46 +0100) on a 8 x Intel(R) Xeon(R) CPU E3-1270 v3 @ 3.50GHz (1 Socket)

While I do use aobut 80% of RAM for the VMs there are still 6gb free.

But with the Mailserver VZ (Kapano) i see this

upload_2019-3-10_14-32-34.png
First I gave the VZ all the RAM she could want. (My zarafa machine had only 2GB, now the kapano has 6, but uses 1,3)

Then I set the swappines on the host step by step down to zero, rebooted the host every time. This slowed the prozess down a bit. Actually, between 60 and 1 there was no real difference, 1 to 0 did make an impression on the speed of growing SWAP.

swapoff -a && swapon -a runs the swap down (very slowly) then it starts building up again. And I dont think it is inteded to run this command twice per day.

my problem is, my IO delay jumps from 0,5-1% to 25% with SWAP build up. So my machines get realy sluggy. To the point where a login into the proxmox web interface takes about 4 minutes....

Anny further suggestions, short of getting an other host with 64GB of RAM instead of 32?
 

Attachments

  • upload_2019-3-10_14-33-38.png
    upload_2019-3-10_14-33-38.png
    13.3 KB · Views: 7
I just noticed, that whil waiting for swapoff -a && swapon -a to clean out the swap files, that my RAM consumption on the host went up to 94%.

This would account for the swap build up.

I just reduced the RAM on many of my VMs where I saw that the VM did not even use 50% of the allocated RAM. Now I am at 51% of RAM consumption on the host, while swap is below 10MB

Maybe I was just to genorus with the RAM on the VMs
 
so, after monitoring this closly the past (3) hours, my swap is building very very slowly now, currently at 130MB.

It semas, as my RAM is used at 52%, that still, the Kernel swaps stuff from an half empty RAM to SWAP. With swappiness = 0.

I just dont understand why or what I did wrong.

In the past my SWAP jumped up, while the PVE snapshots where run at night.

A big jump doing the 20GB kopano mailserver snapshot, and then while I transfer thos snapshots via ssh out from a "backup" VZ (just a simlpe headles VZ for ssh acess to my backup mountpoint), the swap does an other big jump up. To solfe this, I now have a cronjob doing swapoff -a && swapon -a at 6am every morning when thos 2 jobs are finished for sure.

So if you dont see any further things from me here, this did the trick for me, otherwise Ill be back :)

Anyway, Im thinking of swaping my server for an other machine with hardware raid and 4 discs, so I could use a raid 1+0 to konqurer my IO-Dealy as well as a machine with 64GB of ECC RAM. But alas, that would rise the rental fee by 300%, so I dont know jet. At the end fof the year, this is a big chunk of money I have to spend to gain exactly what? I guess, I will stay with my current machine some more :)

Cheers Manne
 

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!