Subject: Re: [vserver] Trying to understand vserver memory
From: Dallas Kashuba <dallas@dreamhost.com>
Date: Thu, 24 Jan 2008 10:16:52 -0800

Here's my understanding:

If you want 256M of ram and 256M of swap, you want to set rss soft  
limit to 256MB and rss hard limit to 512MB (the sum of both ram and  
swap).  We also set the as limits adequately high.

Hopefully that helps,
	Dallas

On Jan 23, 2008, at 10:15 PM, Belinda Lawson wrote:

> Hi, I need a bit of help understanding how memory management works  
> inside a vserver.  My problem is that I would like to mimic the  
> behavior of a unix system with 256M ram and 256M swap.  I have read  
> the documentation on the wiki, but I am still not certain how to  
> mimic the behavior of swap.
>
> In my experiments, if I set the rss hard limit to 256M to reflect  
> the physical ram, it begins to kill processes (somewhat randomly?)  
> if more than 256M is requested, rather than allow swap to be used.   
> In fact, I never see swap used at all, which is very strange since  
> `free` reports that swap does exist inside the vserver.   Could you  
> help me understand how I can adjust the rss and as limits to get  
> behavior more in line with my goal?
>
> Thanks, in advance, for any enlightenment you can provide.
>
> Best regards,
> -Belinda