[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I provide a particular process with as much CPU time as possible?



In <[🔎] 20090712204714.GA2658@cat.rubenette.is-a-geek.com>, lee wrote:
>On Sun, Jul 12, 2009 at 10:25:40AM +0200, Siggy Brentrup wrote:
>> On Sun, Jul 12, 2009 at 07:38 +0000, Joel Roth wrote:
>> > 1. Start the program using 'nice':
>> >
>> > 	nice -20 command
>>
>> Sorry that's mildly spoken wrong.  A normal user can only reduce
>> his share of CPU time using nice and you don't want to propose
>> running a game as root I hope.
>
>I can start the game as user and then renice it as root. But renicing
>it doesn't seem to make a difference.
>
>> > 2. Don't run other CPU-intensive processes
>>
>> Correct
>
>I doesn't matter much if other processes are running. When the RAID-1
>is resyncing, it slows it down some, but I can compile a kernel while
>the game is running.

It sounds like your problem is I/O, not CPU.  You might use ionice to 
increase the I/O priority of the game as well.

You can't give a single process completely exclusive access to a CPU -- irqs 
and softirqs must be handled on the CPU that receives them.

Ignoring those, the only way I can think to do this would be to change the 
affinity of all other processes to not include the CPU in question.  Some of 
those realtime options you were looking at might be a better solution, but I 
haven't used them.
-- 
Boyd Stephen Smith Jr.           	 ,= ,-_-. =.
bss@iguanasuicide.net            	((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy 	 `-'(. .)`-'
http://iguanasuicide.net/        	     \_/

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: