Subject: Re: [vserver] vserver swap
From: Jon Bendtsen <jbendtsen@laerdal.dk>
Date: Fri, 4 Dec 2009 11:51:01 +0100

On 04/12/2009, at 10.01, Richard Lamboj wrote:

>
> Good morning,
>
> is there a setting or solution which disallows a vserver guest to use
> swap(something like swappiness in the sysctl)?
>
> We have three samba servers on one vserver host. Samba does not need  
> much of
> RAM: 50 - 250 MB. On the same maschine there are running a DNS, a  
> netboot
> server, mail server and so on. When the smb process went into swap,  
> then
> samba will be damn slow. So the netboot server should use swap, but  
> the samba
> guests should only use swap if the RAM is completely full.
>
> Is it possible to set swapiness in a vserver guest?

If you put enough memory in the machine, and then you limit each host  
to an amount of memory where the sum is lower than the total. Then you  
disable swap on your host.