Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-30-2007, 10:15 PM
|
#1
|
Member
Registered: Jan 2006
Location: Sri Lanka
Posts: 651
Rep:
|
allocate a CPU for a process out of 4 CPUS
I have a multi processor machine in ML589 HP running RedHat AS3, is ti possible to dedicate one CPU out of four for a particular process. As this process is running slow
Thank you
Last edited by procfs; 12-30-2007 at 11:12 PM.
|
|
|
12-30-2007, 10:20 PM
|
#2
|
Member
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896
Rep:
|
Look at the taskset command. In RedHat, it's in the schedutils package, I think.
|
|
|
12-30-2007, 11:13 PM
|
#3
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,416
|
Depends on what you mean by dedicate. Taskset will ensure the nominated task(s) will only run on the specified CPU(s). Other work can also run there.
To isolate workloads to given subsets of the CPUs I use cpusets. Also has the advantage of being able to classify future work entering the system. Works well.
|
|
|
12-30-2007, 11:36 PM
|
#4
|
Member
Registered: Jan 2006
Location: Sri Lanka
Posts: 651
Original Poster
Rep:
|
What I ment was by dedicate, is to assign one out of four cpus just to handle this particular process (say process 123). This particular processor should handle only 123 process and other three will continue to performs as normal.
By the way by doing this will there be any draw basks.
Thanks
And I could not find cpuset command on my system though its a full installation
|
|
|
12-31-2007, 12:00 AM
|
#6
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
If the task is CPU-bound, you might want to try decreasing the nice value before trying to dedicate it to a particular CPU. Note you'll need be root to set the nice value below 0 -- see the man pages of nice and renice for more information.
|
|
|
12-31-2007, 12:01 AM
|
#7
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,416
|
Thx - saved me finding links; I'd ignore that bull one now-adays. They are still heavily involved, but you should just use the code in the mainline kernel.
It's still a work in progress too - major changes (amalgamation of code) came through in the last couple of -rc kernels. Doesn't affect cpusets already defined, but the doco changes significantly, and things are now handled via containers.
Still seems to work the same.
|
|
|
12-31-2007, 12:28 AM
|
#8
|
Member
Registered: Jan 2006
Location: Sri Lanka
Posts: 651
Original Poster
Rep:
|
Thanks guys I'll try and update this
|
|
|
All times are GMT -5. The time now is 11:29 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|