Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have just set Ubuntu 12.04 64bit with Cinnamon desktop and 3.5.0-030500 kernel on my new laptop with IvyBridge i7.

I decided to test its performance by running a single threaded CPU-hungry program that I often use for camera calibration. Unfortunately, it ended up running much slower than I have ever expected. After some investigation it turned out that the program priority is automatically changed from normal to low which makes the program even slower.

I have also noticed that all user programs such as Skype and Firefox are set to low priority. I tried manually resetting the priority to normal or even very high using the renice command, which works temporary until the kernel scheduler (I guess) resets the priority to low.

Is this a normal behaviour and how can I overcome the slow execution problem?

P.S. I also tried with the 3.2 kernel, but the problem is still present.

share|improve this question
    
What is the priority value of your process?Type ps -le OR ps -l PID and check under NI column. –  IgnitE Sep 13 '12 at 2:27
    
Well, the process starts with Nice value of 0, but then it is changed to 4. I tried setting the nice value manually to -11 or even -20, but after 20-30 seconds it gets changed to 4 again. I know that the kernel scheduler can change the priority of the process, but only with 5 levels; not from -20 to 4. –  Svepe Sep 13 '12 at 9:42

1 Answer 1

You can set the default nice value of a particular user or group in the /etc/security/limits.conf file.

/etc/security/limits.conf

It uses this syntax: [username] [hard|soft] priority [nice value]

For you try to put your user in this file and set to the priority you wish.

share|improve this answer
1  
I added this to the limits.conf file: svepe - priority 0 , but the process priority that I start still gets changed to 4 after it runs for a minute. –  Svepe Oct 8 '12 at 20:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.