LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
LinkBack Search this Thread
Old 11-03-2008, 06:51 AM   #1
akring
LQ Newbie
 
Registered: Oct 2008
Posts: 7

Rep: Reputation: 0
Nice level set but process gets wrong priority


Hello all.

(I asked this question recently in 'Linux - General' and got a few answers, which I am very thankful for, but I will post the question once again in this forum to get some more input - hope this is ok).

At work we have a Linux server (Ubuntu server 7.10) with 8 CPUs for doing heavy calculations. There are several users on the server and we need to prioritize the jobs we run. We are trying to do this using the nice command, but it is not working the way it is supposed to. Below, a screenshot from 'top' is included in a situation where the users andreas and bruger2 are running jobs. Both users have set up their calculations to use all 8 CPUs simultaneously (using MPI or similar), but andreas' processes are set to nice=0 while bruger2 uses nice=19.

Why do andreas' processes (mdrun) only get 4 CPUs when the nice levels are set as above?

It should get all 8 CPUs and bruger2's processes should wait until andreas' are done...

Regards
Andreas

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6989 bruger2 39 19 4572m 2.8g 3132 R 400 72.2 1746:45 l914.exe
7294 andreas 25 0 641m 19m 13m R 100 0.5 0:46.27 mdrun
7295 andreas 25 0 641m 18m 12m R 100 0.5 0:45.40 mdrun
7297 andreas 25 0 641m 18m 12m R 100 0.5 0:45.50 mdrun
7298 andreas 25 0 641m 18m 12m R 100 0.5 0:45.53 mdrun
1 root 18 0 5144 140 68 S 0 0.0 0:03.88 init
2 root 11 -5 0 0 0 S 0 0.0 0:00.02 kthreadd
3 root RT -5 0 0 0 S 0 0.0 0:00.10 migration/0
4 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/0
5 root RT -5 0 0 0 S 0 0.0 0:00.00 watchdog/0

Regards
Andreas
 
Old 11-03-2008, 07:40 AM   #2
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,051
Blog Entries: 2

Rep: Reputation: 93
If you run one by itself will it use all 8 cpus?
 
Old 11-03-2008, 09:15 AM   #3
akring
LQ Newbie
 
Registered: Oct 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Yes.

Regards
Andreas
 
Old 11-03-2008, 09:20 AM   #4
akring
LQ Newbie
 
Registered: Oct 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Maybe I should provide a little more info...

If I run (when I'm the only user logged on to the server)

$ mpirun -np 8 mdrun_d

the output from top will look like

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1161 andreas 38 19 649m 12m 4900 R 100 0.3 0:03.15 mdrun_d
1162 andreas 38 19 649m 12m 4720 R 100 0.3 0:03.10 mdrun_d
1163 andreas 39 19 649m 12m 4704 R 100 0.3 0:03.07 mdrun_d
1164 andreas 39 19 648m 12m 4716 R 100 0.3 0:04.07 mdrun_d
1165 andreas 39 19 648m 12m 4712 R 100 0.3 0:03.16 mdrun_d
1166 andreas 38 19 649m 12m 4712 R 100 0.3 0:03.07 mdrun_d
1167 andreas 38 19 649m 12m 4744 R 100 0.3 0:03.13 mdrun_d
1168 andreas 39 19 648m 12m 4736 R 100 0.3 0:03.14 mdrun_d
1 root 18 0 5144 140 68 S 0 0.0 0:03.77 init
2 root 11 -5 0 0 0 S 0 0.0 0:00.27 kthreadd

Regards
Andreas
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nice level set but process gets wrong priority akring Linux - General 7 10-29-2008 04:25 AM
"ps" does not give nice value of process if realtime priority set... CJS Linux - General 1 07-16-2008 09:23 PM
process priority,nice -- small question regarding high/low priority values beeblequix Linux - Newbie 1 10-11-2006 10:22 AM
Nice vs Priority, how do I prioritise a cronjob? stefaandk Linux - General 5 08-11-2005 08:17 PM
Scheduling priority for the 'nice' command savoiu Linux - Newbie 2 05-18-2004 11:35 AM


All times are GMT -5. The time now is 12:41 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration