Write caching for swap

bert64

Member
Aug 14, 2008
71
1
6
Currently i have a number of linux images running under KVM on proxmox, however i find that if any of these images start to swap then performance of the whole host is dragged down considerably...

As i use separate virtual disks for swap, is it possible, or would it be feasible to enable write caching and fake sync() calls on the swap volumes? Obviously this is usually a very bad thing to do due to the risk of data loss, but in the case of swap it shouldn't matter.
 
what kind of storage do you use, disk/raid controller? pls run pveperf and post results.
 
A mix... Some boxes use plain SATA disks, others use remote iSCSI storage which pveperf doesn't seem to test:

vps1:~# pveperf
CPU BOGOMIPS: 32000.75
REGEX/SECOND: 614997
HD SIZE: 57.09 GB (/dev/mapper/pve-root)
BUFFERED READS: 130.24 MB/sec
AVERAGE SEEK TIME: 10.59 ms
FSYNCS/SECOND: 1303.00
DNS EXT: 151.82 ms
DNS INT: 8.11 ms

proxmox:~# pveperf
CPU BOGOMIPS: 24532.08
REGEX/SECOND: 844739
HD SIZE: 94.49 GB (/dev/mapper/pve-root)
BUFFERED READS: 126.52 MB/sec
AVERAGE SEEK TIME: 7.97 ms
FSYNCS/SECOND: 1180.09
DNS EXT: 90.79 ms
DNS INT: 104.12 ms

Performance only seems to suffer when one or more images starts to swap heavily.
 
yes, thats clear. if the storage is too slow for the load its getting slow :).

use raid10 with a good raid controller with big cache, best would be 8 SAS disks with 15 krpm. but I assume you know that already. and configure your guests that they do not need to swap.

I have no better hint.
 
I would love to buy unlimited quantities of RAM, a big raid controller with lots of cache and 15k SAS disks...
But the fact is we don't have that kind of financial resources.

Also a similar setup with vmware seems to perform considerably better, in that the image which is swapping performs poorly as expected but other images are unaffected.

The problem is that one image is able to cause disproportionate levels of load when swapping, such that all the other images suffer too... If one image suffers its not so much of a problem.
 

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!