My SolusVM graphs have been showing 8Gb Swap usage even though the RAM is never over 50% used. Is it possible that virtual machines going into swap will reduce the IO of the SSD?
1 Answer
If you're swapping to the SSD, yes. Swap uses IOs; even SSDs, while not seek limited, still have IO limits. Granted, pageins/pageouts from SSDs are going to be very quick, so unless a VM is thrashing, it's not likely to affect IO that much. A thrashing vm might do more than 1k IOPs. Your SSD is probably rated for >30k IOPs. Then again, your SSD also has a finite write durability, so even under limits, it's not preferable to allow that.
-
Is there any way to prevent/limit IO of OpenVZ virtual machines? I have an IOPriority of 4 set in SolusVM, but I do believe there are certain users completely abusing the IO.– user3180Sep 8, 2013 at 18:24
-
That's a completely different question, but depending on your kernel version, yes. Look into linux cgroups, specifically the blkio controller (linux kernel docs for cgroups blkio). I don't know openvz's particular mechanism for installing cgroup limits, but I know it enables them by default in newer userspaces (/proc/vz/{cgroupstuff}). To check where they are use
mount | grep cgroup
. You should be able to add a controller to a process in-flight, if needed, assuming it doesn't have that controller from another group. Sep 8, 2013 at 19:02