Subject: Re: Syscalls to set CPU affinity
To: Mindaugas R. <rmind@NetBSD.org>
From: Adam Hamsik <haaaad@gmail.com>
List: tech-kern
Date: 09/10/2007 10:41:50
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Sep 10, 2007, at 6:24 AM, Mindaugas R. wrote:

> Joerg Sonnenberger <joerg@britannica.bec.de> wrote:
>> Which of this applies to processes and which to threads?
>
> With these calls in Solaris you can bind processes, threads, tasks,  
> projects
> and zones according to the idtype. In our case it would be only  
> process and
> threads. Please see pset_bind(2) and processor_bind(2) man pages.
>
>> I don't think external setting of thread affinity is a good idea,  
>> that
>> should be the job of the application that cares.
>
No. Because administrator knows better then app developer what  
workload he has on his machine and how to get maximum performance  
from his system.

> Can you explain "external setting"?

> Please note, that there would be a schedctl(8) (or kind of such  
> tool), where
> administrator could bind the set of CPUs for application(s). Why do  
> you think
> it is a bad idea?
>
Sound good.

IMHO good idea is dedicate one cpu for aplication. e.g. in dual-core  
machine i can dedicate second core for mysql, httpd, whatever. And  
only that application/thread can run on this core/CPU.


Regards
- -----------------------------------------
Adam Hamsik
jabber: haad@jabber.org
icq: 249727910

Proud NetBSD user.

We program to have fun.
Even when we program for money, we want to have fun as well.
~ Yukihiro Matsumoto




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFG5QNOlIxPgX3Go0MRAmcUAKD2KAUdkRT7PP8W6R/Be6hN/7ioEACfSmw/
e5MMcvVYBfBFO6wdiXDpdp4=
=Rxtu
-----END PGP SIGNATURE-----