0

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?

user3180
  • 337
  • 1
  • 4
  • 13
  • Your first action should be that you set the swappiness parameter to 0 - i.e. swap only on out-of-memory condition. Furtheron you should avoid swapping to ssd or any other flash device, because wear leveling will reduce the lifetime of your device. – ott-- Sep 08 '13 at 19:29

1 Answers1

3

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.

Andrew Domaszek
  • 5,103
  • 1
  • 14
  • 26
  • 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. – user3180 Sep 08 '13 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](https://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt)). 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. – Andrew Domaszek Sep 08 '13 at 19:02