Operating System - HP-UX
1825766 Members
2065 Online
109687 Solutions
New Discussion

Re: Force Processes where to run

 
SOLVED
Go to solution
Amiel Tutolo
Frequent Advisor

Force Processes where to run

Is there a way to force a process to execute on only one cpu? We have an L3000 that has 2 550mhz processors. I am being asked to try to pin a certain process to one cpu. I don't see a way to do this. Has anyone ever done this or seen this done? Thanks in advance for all your help.
Live, love and laugh
5 REPLIES 5
Pete Randall
Outstanding Contributor
Solution

Re: Force Processes where to run

There is a system call that will set processor affinity, though I can't remember the exact name of the call. You could search the forums and come up with it and possibly a little C program to make use of it. Search on "processor affinity".


Pete

Pete
Steven E. Protter
Exalted Contributor

Re: Force Processes where to run

That kind of intervention is likely to disrupt the general operation of your server.

If this is an attempt to meet license requirements it won't help. Oracle for example says if the CPU is present, oracle must be licensed on it.

IF its a performance issue, PRM might be used to manage performance and give good priority to the processes that need priority.

It is usually much better to let the system decide which cpu the process runs on.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Vijaya Kumar_3
Respected Contributor

Re: Force Processes where to run

And one more thing is to use this product if you have already installed

http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo.pl?productNumber=B3835DA

Anyway, i am checking a 'free' way of doing this as "pbind with solaris"


VJ
Known is a drop, unknown is ocean - visit me at http://vijay.theunixplace.com
A. Clay Stephenson
Acclaimed Contributor

Re: Force Processes where to run

The easist method is to purchase the PRM package. (Process Resource Management). If you know C then the mpctl system call will do the trick. Man 2 mpctl for details.
If it ain't broke, I can fix that.
Hazem Mahmoud_3
Respected Contributor

Re: Force Processes where to run

I believe PRM can do this for you, although I have not used it. You can get more information at:
http://www.software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B3835DATRY

-Hazem