Subject: Re: Syscalls to set CPU affinity
To: Mindaugas R. <rmind@NetBSD.org>
From: Adam Hamsik <firstname.lastname@example.org>
Date: 09/10/2007 10:41:50
-----BEGIN PGP SIGNED MESSAGE-----
On Sep 10, 2007, at 6:24 AM, Mindaugas R. wrote:
> Joerg Sonnenberger <email@example.com> wrote:
>> Which of this applies to processes and which to threads?
> With these calls in Solaris you can bind processes, threads, tasks,
> 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,
>> 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?
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.
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)
-----END PGP SIGNATURE-----