Allocating Swap Space with KVM
5
votes
3
answers
17705
views
Consider 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 configuration, but just out of curiosity:
What is the optimal swap allocation strategy?
1. 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.)
2. 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?
Asked by countermode
(7764 rep)
Jun 17, 2014, 01:01 AM
Last activity: May 17, 2022, 02:13 AM
Last activity: May 17, 2022, 02:13 AM