LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-02-2007, 01:44 PM   #1
Dria
LQ Newbie
 
Registered: Oct 2006
Distribution: Slackware, Mandriva, and Fedora when I must
Posts: 27

Rep: Reputation: 15
How to throttle a single process?


I want to run a distributed computing grid client on a box, but it takes all the CPU it can get and there is no throttle option for the Linux client yet. It's not having scheduling issues, and it gracefully lets other needy processes take over, but after that it eats all the CPU. I wouldn't have a problem with this if the box in question had more than basic cooling (and additional cooling isn't an option). Running the CPU at 100% all the time would quickly overheat things. I'm looking for a way to throttle the CPU usage of just that particular process, without impacting the performance of the rest of the machine.

Thanks in advance
 
Old 03-02-2007, 05:31 PM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
Do you have access to the source code for the client?

If so, you can use the select() function call to wait for things to happen, rather than spinning while repeatedly checking.

Hope this helps.
 
Old 03-02-2007, 06:28 PM   #3
Dria
LQ Newbie
 
Registered: Oct 2006
Distribution: Slackware, Mandriva, and Fedora when I must
Posts: 27

Original Poster
Rep: Reputation: 15
It's meant to eat CPU, actually, it's not an optimization problem -- the box does very little and I figure it would be great to let it crunch data for World Community Grid.
 
Old 03-02-2007, 07:48 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I have just started testing some code that went up on lkml in the last couple of weeks.
Given that a couple of patch sets regress each other I don't think you'll want to try it just yet ...
However, it is in the forseeable future.

This is the result of several projects (slowly) coming together, and this time looks pretty hopeful.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A lot of processes run automatically when I run a single process. dalvirgautam Linux - Enterprise 4 12-01-2006 06:10 PM
kill process in a single command vbseeker Linux - General 4 09-16-2006 10:06 AM
how do you throttle bandwidth? wincen Linux - Networking 1 05-15-2005 12:58 PM
Addressing 36-bits of memory from single process using Xeon processor clustopher Slackware 1 02-24-2005 10:37 AM
What is a single thing or process that gives you the biggest productivity gains? krystianownz Programming 1 08-20-2004 05:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration