Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: How can I limit the number of Cores in multi-process programming

by Lennotoecom (Pilgrim)
on Nov 17, 2015 at 09:32 UTC ( #1147899=note: print w/replies, xml ) Need Help??


in reply to How can I limit the number of Cores in multi-process programming

oi mate
look into
taskset -cp 3,4 1234
where processors are 3 and 4
and 1234 is the process id
that's a power to control smp affinity mate

also I believe this will launch your script with the correct affinity
taskset -c 1,2 script.pl

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1147899]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2022-11-30 20:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?