On Wed, Jan 11, 2006 at 04:38:58PM -0800, Robin Lee Powell wrote: > I want my VServer to not be able to choke my real server by using up > all the RAM, so I set an RSS limitation. As you can see, it's not > working very well: > > PROC: 72 142 -1 0 > VM: 104883 223551 -1 0 > VML: 0 0 -1 0 > RSS: 56597 131072 131072 356
well, as we see it is working very well ... hard limit is hard limit, so once you reach it, game over for the the processes consuming memory ... > The problem I'm having is that instead of swapping things out, > processes simply get killed, even when there's lots of swap left. as I explained many times (here and on IRC) you do not really want a swap-out behaviour, but once again here is a simple example ... just consider 10 guests, all set to 128MB of 'memory' and the same amount as 'swap' ... now let's assume the guests are slightly above the memory limit, because the customer (as usual) pushes the limits and uses roughly 200MB of memory+swap ... what will happen on a box with 3GB of ram in this case? it will trash to death, because all 10 guests would continuously swap in and out stuff, while the system memory is half free ... and all guests could live and run quite well on that machine ... > So, I'm wondering: > > What do RSS and AS actually *mean* when applied to the whole > VServer? RSS means Resident Set Size (i.e. the amount of memory which is actually 'present' in RAM), and AS means Adress Space, which is an artificial limit which 'could' be compared to swap space, but does not necessarily end up in swap ... > Is fork_rss on be default? If so, how do I turn it off? should not be on by default, unless that changed recently ... > How do I limit RAM usage on the VServer *and* let it use up swap > before it starts killing things? the real solution will be (a to be implemented) soft limit for RSS, which basically penalizes the guest for being over the limit, but does not do the very expensive swapping, unless the memory is really low, in which case memory of guests which are over limit get preference to the swapout ... for now, I would suggest to do what you actually said, and use the RSS hard limit for preventing customers from using up all your memory ... (i.e. make it large enough so that it doesn't hurt the friendly customer, but small enough, so that your system will keep running when somebody is excessive) HTH, Herbert > Thanks! > > -Robin > > -- > http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/ > Reason #237 To Learn Lojban: "Homonyms: Their Grate!" > Proud Supporter of the Singularity Institute - http://singinst.org/ > _______________________________________________ > Vserver mailing list > [email protected] > http://list.linux-vserver.org/mailman/listinfo/vserver _______________________________________________ Vserver mailing list [email protected] http://list.linux-vserver.org/mailman/listinfo/vserver
