suppose the following scenario: a host with 2 GiB runs a few guests using KVM. Each guest does usually not need much memory, they are given 256 MiB each and run services that mostly twiddle their thumbs. However, occasionally the guests need more memory. Right now, each guest has little RAM but its own swap space. I noticed that a small portion of swap is used. I never had problems with that konfiguration, but just out of curiosity:
What is the optimal swap allocation strategy?
- Assign each guest its own swap space from their respective disks, and assign the guests only little memory from the host. (This is what I am doing now.)
- Assign the host a larger amount of swap space and none to the guests, and assign more memory to the guests.
Would memory ballooning help to improve memory performance?