Message boards : Number crunching : Bad thread priority
Message board moderation

To post messages, you must log in.

AuthorMessage
PovAddict
Avatar

Send message
Joined: 14 Jul 05
Posts: 275
Credit: 49,291
RAC: 0
Message 17470 - Posted: 21 Jul 2007, 0:22:14 UTC

I got an LHC workunit running, and my system started going sluggish. I noticed the LHC app had one thread running on Idle priority (probably the one doing the actual work), one on High, and one on Realtime. But there is one priority even lower than Idle, called Lowest! I set it to Lowest using a 3rd party program and my computer stopped being sluggish.

You should REALLY recompile the LHC app with the latest BOINC API (it's currently using a version from year 2005).
ID: 17470 · Report as offensive     Reply Quote
Lord Crc

Send message
Joined: 1 Dec 06
Posts: 13
Credit: 765,437
RAC: 0
Message 17473 - Posted: 21 Jul 2007, 0:36:12 UTC - in response to Message 17470.  

But there is one priority even lower than Idle, called Lowest! I set it to Lowest using a 3rd party program and my computer stopped being sluggish.


This doesn't make sense to me. First, Idle is most certainly the lowest priority class, and thread priority. You can read up on them here: http://msdn2.microsoft.com/en-us/library/ms685100.aspx

Second, ProcessExplorer shows SixTrack in the Idle priority class, and the worker thread as having a priority of 2, and as you can see from the table in the above link, that means Idle class + Lowest thread priority.

If you can reproduce this, dowload ProcessExplorer and check out the priority of the worker thread. I'm guessing a third party is messing things up though.
ID: 17473 · Report as offensive     Reply Quote
EclipseHA

Send message
Joined: 18 Sep 04
Posts: 47
Credit: 1,886,234
RAC: 0
Message 17474 - Posted: 21 Jul 2007, 1:50:30 UTC

"Sluggish" could also be due to more than the thread priority - for example, page faults. What's your memory usage look like?
ID: 17474 · Report as offensive     Reply Quote
PovAddict
Avatar

Send message
Joined: 14 Jul 05
Posts: 275
Credit: 49,291
RAC: 0
Message 17475 - Posted: 21 Jul 2007, 4:31:58 UTC - in response to Message 17474.  

"Sluggish" could also be due to more than the thread priority - for example, page faults. What's your memory usage look like?

I have had this problem with other projects, and I I'm absolutely sure it got working right after I manually changed the priority.
ID: 17475 · Report as offensive     Reply Quote
PovAddict
Avatar

Send message
Joined: 14 Jul 05
Posts: 275
Credit: 49,291
RAC: 0
Message 17476 - Posted: 21 Jul 2007, 4:33:31 UTC - in response to Message 17473.  
Last modified: 21 Jul 2007, 4:42:09 UTC

But there is one priority even lower than Idle, called Lowest! I set it to Lowest using a 3rd party program and my computer stopped being sluggish.


This doesn't make sense to me. First, Idle is most certainly the lowest priority class, and thread priority. You can read up on them here: http://msdn2.microsoft.com/en-us/library/ms685100.aspx

Second, ProcessExplorer shows SixTrack in the Idle priority class, and the worker thread as having a priority of 2, and as you can see from the table in the above link, that means Idle class + Lowest thread priority.

SetPriority v0.2   by: Jeff Gilchrist
                   http://gilchrist.ca/jeff/


Usage: setpriority [-g] [-p#] [-t#] [-lowest] <PID>

 -g  : get process information only then exit
 -h  : this help screen
 -p# : where # is new process priority class (default: 64 [IDLE])
 -t# : where # is new thread priority (default: -15 [Lowest])
 -lowest : sets lowest possible priority

Example: setpriority -p32 -t-2 342
         setpriority -lowest 342
         setpriority -g 342


              Process      Thread
              -------      ------
RealTime   :  256          15
High       :  128          2
AboveNormal:  32768        1
Normal     :  32           0
BelowNormal:  16384        -1
Idle       :  64           -2
Lowest     :  N/A          -15


LHC had one thread on priority 15, another on 2, another on -2 (if I remember correctly). Changed all threads to -15 and no more computer lag. (SetPriority doesn't let me change priority of individual threads) Maybe this app got Lowest and Idle names swapped, but there you can see the numbers... It was -2, should be -15.
ID: 17476 · Report as offensive     Reply Quote
Lord Crc

Send message
Joined: 1 Dec 06
Posts: 13
Credit: 765,437
RAC: 0
Message 17488 - Posted: 21 Jul 2007, 22:12:50 UTC - in response to Message 17476.  
Last modified: 21 Jul 2007, 22:19:03 UTC

LHC had one thread on priority 15, another on 2, another on -2 (if I remember correctly). Changed all threads to -15 and no more computer lag. (SetPriority doesn't let me change priority of individual threads) Maybe this app got Lowest and Idle names swapped, but there you can see the numbers... It was -2, should be -15.


The terminology used by that program does not correspond to the terminology used by MS. It seems like "lowest" actually means THREAD_PRIORITY_IDLE. In which case it's 1 step down from what it currently uses (IDLE_PRIORITY_CLASS + THREAD_PRIORITY_LOWEST). If that really makes such a difference, my money is on a third party application/driver/voodoo.
ID: 17488 · Report as offensive     Reply Quote
EclipseHA

Send message
Joined: 18 Sep 04
Posts: 47
Credit: 1,886,234
RAC: 0
Message 17490 - Posted: 22 Jul 2007, 3:36:55 UTC - in response to Message 17475.  
Last modified: 22 Jul 2007, 3:40:33 UTC

"Sluggish" could also be due to more than the thread priority - for example, page faults. What's your memory usage look like?

I have had this problem with other projects, and I I'm absolutely sure it got working right after I manually changed the priority.


Do you know the tool you're using is giving you the right information? (I REALLY doubt that any BOINC related thread is running at "realtime" under windows)

Do you understand what changing the priority really means to your whole system?

Why are you the only one having this problem with LHC and other projects?

Sounds like there's something weird with your system, and you're just using a bandaid.....


Just my opinion
ID: 17490 · Report as offensive     Reply Quote
PovAddict
Avatar

Send message
Joined: 14 Jul 05
Posts: 275
Credit: 49,291
RAC: 0
Message 17491 - Posted: 22 Jul 2007, 3:46:37 UTC

Many people had similar problems on BURP, the admin fixed the wrapper to set the correct thread priority to the worker app and everybody's problems went away.
http://burp.boinc.dk/forum_thread.php?id=677
ID: 17491 · Report as offensive     Reply Quote
Profile KSMarksPsych
Avatar

Send message
Joined: 15 Oct 05
Posts: 43
Credit: 18,018
RAC: 0
Message 17495 - Posted: 22 Jul 2007, 9:17:43 UTC

David A also checked in a change to the wrapper.

I'll save you all the effort of looking :)


Author: davea
Date: 2007-06-13 09:42:36 -0700 (Wed, 13 Jun 2007)
New Revision: 12927

Modified:
trunk/boinc_samples/checkin_notes
trunk/boinc_samples/uppercase/upper_case.C
trunk/boinc_samples/wrapper/wrapper.C
Log:
- wrapper: set thread priority of worker processes
to IDLE class (Win);
set prior of worker processes to PROCESS_IDLE_PRIORITY (Unix)

uppercase/
upper_case.C
wrapper/
wrapper.C

Kathryn :o)
The BOINC FAQ Service
The Unofficial BOINC Wiki
The Trac System
More BOINC information than you can shake a stick of RAM at.
ID: 17495 · Report as offensive     Reply Quote
PovAddict
Avatar

Send message
Joined: 14 Jul 05
Posts: 275
Credit: 49,291
RAC: 0
Message 17497 - Posted: 22 Jul 2007, 18:12:43 UTC

LHC doesn't even use a wrapper, that's why it's strange its priority is wrong.
ID: 17497 · Report as offensive     Reply Quote
Profile Keck_Komputers

Send message
Joined: 1 Sep 04
Posts: 275
Credit: 2,652,452
RAC: 0
Message 17507 - Posted: 23 Jul 2007, 5:48:34 UTC - in response to Message 17497.  

LHC doesn't even use a wrapper, that's why it's strange its priority is wrong.

It is a very old app. If I remember correctly the app we were testing on the alpha side was better behaved, however the alpha project ended before it had passed all the tests.
BOINC WIKI

BOINCing since 2002/12/8
ID: 17507 · Report as offensive     Reply Quote
Profile pschoefer

Send message
Joined: 14 Jul 05
Posts: 21
Credit: 3,486,046
RAC: 0
Message 17514 - Posted: 23 Jul 2007, 9:01:21 UTC - in response to Message 17490.  

Why are you the only one having this problem with LHC and other projects?

Sounds like there's something weird with your system, and you're just using a bandaid.....

He's not the only one... I had the same problem but did not check the priority, because I thought it was a problem of the newest BOINC client. But after the LHC WU was completed, everything came back to the normal speed.
ID: 17514 · Report as offensive     Reply Quote

Message boards : Number crunching : Bad thread priority


©2024 CERN