process binding

James Larkby-Lahet fatbasho at
Thu Jan 13 11:36:09 PST 2005

> I am looking for a way to bind processes to specific processors.  I am 
> first trying to find an opensource OS that will be able to do it.  It 
> seems that there
why not leave it to the scheduler?  It will manage things quite nicely 
(including the many other processes that are bound to run) and even 
tries to respect L(1/2/3) caching, w/ processor affinity.   For the 
most part you will see your programs running on separate processors, 
unless another process must run, in which case one process will sleep 
for a bit.

> I basically want to run a fairly simple perl script on each processor 
> of a two processor machine.  I am looking to this idea because running 
> two of these scripts on a single proc machine yields very poor 
> performance.    These run for about an hour, but take like 10 times 
> longer if more than one is running(single proc).  I am hoping that I 
> can find a way to achieve some good results by running one process per 
> proc on a dual proc machine.  I am getting ready to build a athlon MP 
> 2800+ if I can figure out a way to make this work.
your problems are likely due to cache contention between the two 
processes, so 2 processes on a two processor box will be fine, but if 
you up it to 4 processes, you'll have the same problem.  also, unless 
you are putting faster processors in the new MP box, you will not see a 
speed-up for a single process ;-)



More information about the freebsd-smp mailing list