SMP system advices

Hi.

Sorry, it's not really an orocos related question. But i would like to know your opinion.

On a system with multiple cpus, i would like to segregate the system (daemon, network stuff like CORBA etc) to the first cpu for example, and have other cpu availaible for the application...

I found at least three way to do that :

  - use taskset once the system is loaded -> very boring
  - use isolcpu kernel parameter -> not tested
  - use maxcpu kernel parameter + 'echo 1 > /sys/devices/system/cpu/cpuN/online' -> not tested 
So when i start the deployer, i hope to have the cpu affinity set to 1 by default, and all others cpu free to play with. Then we can put processes and their irq handler/tasklet on dedicated cpu...

What is your way of doing it ? Do you think it is a good way to do that (all on one cpu by default)?

Regards.

Paul.

SMP system advices

On Friday 21 October 2011 10:15:18 paul [dot] chavent [..] ... wrote:
> Hi.
>
> Sorry, it's not really an orocos related question. But i would like to know
> your opinion.
>
> On a system with multiple cpus, i would like to segregate the system
> (daemon, network stuff like CORBA etc) to the first cpu for example, and
> have other cpu availaible for the application...
>
> I found at least three way to do that :
> - use taskset once the system is loaded -> very boring
> - use isolcpu kernel parameter -> not tested
> - use maxcpu kernel parameter + 'echo 1 >
> /sys/devices/system/cpu/cpuN/online' -> not tested
>
>
> So when i start the deployer, i hope to have the cpu affinity set to 1 by
> default, and all others cpu free to play with. Then we can put processes
> and their irq handler/tasklet on dedicated cpu...
>
> What is your way of doing it ?
> Do you think it is a good way to do that (all on one cpu by default)?

Is this for plain Linux tasks ? For Xenomai tasks, moving Linux processes to
other CPU's is probably not worth the effort.

I have not yet tested SMP CPU task migrations... Isn't putting orocos
processes/threads in the fifo scheduler sufficient to get the cpu ?

>
> Regards.
>
> Paul.

Peter

SMP system advices

On 10/21/2011 02:44 PM, Peter Soetens wrote:
> On Friday 21 October 2011 10:15:18 paul [dot] chavent [..] ... wrote:
>> Hi.
>>
>> Sorry, it's not really an orocos related question. But i would like to know
>> your opinion.
>>
>> On a system with multiple cpus, i would like to segregate the system
>> (daemon, network stuff like CORBA etc) to the first cpu for example, and
>> have other cpu availaible for the application...
>>
>> I found at least three way to do that :
>> - use taskset once the system is loaded -> very boring
>> - use isolcpu kernel parameter -> not tested
>> - use maxcpu kernel parameter + 'echo 1>
>> /sys/devices/system/cpu/cpuN/online' -> not tested
>>
>>
>> So when i start the deployer, i hope to have the cpu affinity set to 1 by
>> default, and all others cpu free to play with. Then we can put processes
>> and their irq handler/tasklet on dedicated cpu...
>>
>> What is your way of doing it ?
>> Do you think it is a good way to do that (all on one cpu by default)?
>
> Is this for plain Linux tasks ? For Xenomai tasks, moving Linux processes to
> other CPU's is probably not worth the effort.
>
> I have not yet tested SMP CPU task migrations... Isn't putting orocos
> processes/threads in the fifo scheduler sufficient to get the cpu ?
When you "move one task to one cpu", you just say "this task should run on this cpu". So other task can use this cpu until you tell them to move to an other cpu.

So at system startup, all childs of init have a cpu mask of ~0. I have few process so i can shield them manually or with a script... but today i tried the isolcpu and it's a lot more easy way to do.

>
>>
>> Regards.
>>
>> Paul.
>
> Peter
>