Re: [vserver] Assigning whole CPUs to contexts

From: Daniel Hokka Zakrisson <daniel_at_hozac.com>
Date: Thu 24 Apr 2008 - 00:28:51 BST
Message-ID: <47027.192.168.101.12.1208993331.squirrel@intranet>

James Miller wrote:
> Daniel Hokka Zakrisson wrote:
>> Jiri Denemark wrote:
>>
>>>> If this is what you want, using the scheduler parameters is just
>>>> unnecessary overhead. Setup cpusets instead, e.g.:
>>>> echo 0 > /etc/vservers/<guest0>/cpuset/cpus
>>>> echo 0 > /etc/vservers/<guest0>/cpuset/mems
>>>> echo cpu0 > /etc/vservers/<guest0>/cpuset/name
>>>>
>>> Well, that might help, but is it possible to change it in runtime? To
>>> change
>>> number of CPUs assigned to each context? And how scheduler interacts
>>> with
>>> cpusets, are parameters still global or only related to the particular
>>> cpuset?
>>>
>>
>> Yes, that can also be changed at run-time. Simply echo the new
>> CPUs/memory
>> banks to /dev/cpuset/<name>/{cpus,mems}, and you're set.
>>
>> Obviously parameters set for a cpuset only affect that cpuset.
>>
>>
> I'm a bit confused. I have a couple of Vserver hosts and none of them
> have /dev/cpuset/<guest0>/.....

The name above refers to what's put in the name file, so for those
examples, it'd be /dev/cpuset/cpu{0,1}.

> Would I have had to already defined a values for
> /etc/vservers/<guest0>/cpuset/[cpus,mems,name] for those values to show
> up under /dev/cpuset/<guest0>?

Yes. cpusets are only created if you specify that one should be used.

-- 
Daniel Hokka Zakrisson
Received on Fri Apr 25 03:01:05 2008
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Fri 25 Apr 2008 - 03:01:09 BST by hypermail 2.1.8