Subject: Re: [vserver] make the host safe with 10% of ressources :)
From: ADNET Ghislain <gadnet@aqueos.com>
Date: Wed, 05 Sep 2007 10:14:10 +0200
Wed, 05 Sep 2007 10:14:10 +0200
thanks for the answers :)
> Let's see the settings for the vserver:
>
> My goal is to limit the physical ram to  something like 80/90% of the 
> ram , same thing for the swap so the host still got:
>
> - 10% of cpu
>   
>
>   
ok thanks i will remove the idle-time fair share, so i guess you cannot say:

9 guest, 1 host
- 10% of CPU for the host
- 10% of cpu per guest with idle time of 8/10 for the guests t share (so 
i allways keep 10% for host)

i have to choose between 10% per guest/host HARD LIMIT or 10%+ idle time 
for all host included. Understood thanks :)



 By the way i saw that if you make the mistake of doing:

 sudo vsched --xid 40134 --fill-rate 0 --interval 0


you will freeze the whole computer, not only the guest (this was an 
error i wanted to put the fillrate2 and interval2 at zero to have hard 
limit). Is it normal , it should only freeze the guest to make this 
error i guess ?


>   
>> - 10% of ram
>>     
>
> very hard to do, unless you switch off overcommitment
> (btw, this isn't terribly important, as ram can always
> be freed by discading buffers and read only mappings
>   
yes but the guest is consumming all the memory and then swap like crazy. 
I'd like to keep control of the host when the guest goes mad so i can 
stop or restart it or constrain it :)


>   
>> - 10% of swap
>>     
>
> not implemented yet, but having strict limits to the
> guest memory will automagically leave some of the swap
> space (swap+ram - Sum[guests]) unused by guest processes
>   
ok, does the RSS limit include swap size as well i was beleiving it was 
only a limit on the physical memory ?

the problem i face is that a guest (i have only 1 guest here) is taking 
all the memory. The host is therefor unreachable because the guest has 
all memory and swap like crazy. My goal is to keep 10% of the memory for 
the host so i still can launch a process there. How will you do that if 
this is possible ? turn off overcommitment and  restrict memory to 90% 
of the pages ?

 My try lead to a server where the swap seems disabled (i have nothing 
in the swap 0k since days so i wonder it allways had something before i 
limit RSS but perhaps this is not the case and the swap state is not a 
consequence of limiting my guest RSS.


> but if you really want absolute memory control and a
> guarantee that no process will get more memory than 
> available, then you have to turn off overcommitment
> on your linux system 
>
>   
hum i wonder how bad this will be, i guess that if this is on by default 
this is not a good idea to change it.  If anyone has experience on this 
i will be glad to hear it , how do you control the ram sharing between 
guests ?


-- 
Cordialement,
Ghislain


["application/x-pkcs7-signature" not shown]