[Discuss] How do I Set CPU affinity when running an application [RESOLVED]

pw p.willis at telus.net
Tue Apr 22 13:32:49 PDT 2008


Hello,

I'd like to thank Lloyd Budd for kicking the hamster that
runs the wheel inside my brain.

Although I have been using 'taskset' for changing
the affinity of processes using the PID, I neglected to
note that you can also run applications (with arguments)
with taskset as well.I should have read the man page
again sooner... ~:|

It works.

Peter


pw wrote:
> Hello,
> 
> I have a 2.6 SMP kernel on a redhat-ish variant
> but I'm not sure that 'nice' has been patched for affinity,
> (man page doesn't say so)
> and I'm not sure that is the valid way to set affinity anymore.
> 
> Setting affinity at runtime seems more reasonable
> (ie: IRIX 'pos' command) than messing with the
> process after startup...
> 
> Does anyone know how I can set the CPU affinity mask
> for a specific application (say a script) when I call
> the application?
> 
> Thanks
> 
> Peter
> 
> _______________________________________________
> Discuss mailing list
> Discuss at vlug.org
> http://ladybug.vlug.org/cgi-bin/mailman/listinfo/discuss
> 



More information about the Discuss mailing list