|
Message boards :
Number crunching :
Windows Task Manager - Automatically set higher priority für CPDN
Message board moderation
Author | Message |
---|---|
![]() Send message Joined: 22 Jan 05 Posts: 40 Credit: 4,390,001 RAC: 5,115 |
Hello, I recently had a problem with CPDN WU taking an extremely long time. That was resolved, thanks to help in this forum (reduce number of WU per computer, prevent hyper-threading by limiting the number of CPUS9. However, I noticed that CPDN WU have the lowest priority ("low") when checking in the Windows task manager. When I manually increase the priority, CPDN gets much more done in the same time frame. It just becomes more efficient. Is there a way to tell BOINC or CPDN to start the WU with a higher priority (e.g. "lower than normal" instead of "low"). I did not find anything on this subject here in the forums or elsewhere. Thank you very much! Friedrich I love CPDN! -- ![]() |
![]() Send message Joined: 15 May 09 Posts: 4444 Credit: 17,929,339 RAC: 29,974 |
I don't think there is. The problem is I think, the big difference between the time taken for the CPDN tasks along with the longer deadlines, though many tasks recently have had a deadline of one month rather than a year. The year long deadlines were a hangover from the days when on the machines I had then could take seven months or longer to complete a task. The longest tasks I have had in the past couple of years have taken about 20 days to complete. The ones from testing branch I am currently running (WAH2ri) will take about six days, albeit on a slightly faster machine than the one that started playing up recently. |
Send message Joined: 1 Jan 07 Posts: 1014 Credit: 35,788,735 RAC: 25,438 |
BOINC gives CPU tasks the lowest possible priority - in effect, everything gets a higher priority than BOINC tasks. That's because the earliest idea of BOINC was "to use idle time on home computers": that dates from the time of single-core processors, and that CPU was either working for you, or for science. You won, and science lost. BOINC doesn't provide any way of changing that situation, but there are third-party applications which do. I use one called 'Process Lasso' - https://bitsum.com/. It's free for personal use, at the cost of putting up with nag screens urging you to 'go pro' at every restart. You might think it's overkill, because a has a very complicated management screen which shows you details of every single process running on the machine, and allows you to set whatever priority you want, either temporally or every time that program is run. So take it carefully... But in normal daily running, it just sits quietly in the notification area and looks after everything for you. |
![]() Send message Joined: 22 Jan 05 Posts: 40 Credit: 4,390,001 RAC: 5,115 |
|
Send message Joined: 29 Oct 17 Posts: 944 Credit: 15,193,000 RAC: 23,306 |
In Windows you can change a process priority using Task Manager. Start it up, select the process in question, right mouse menu -> Details -> Select priority and change from Low to High. It's also possible to set the cpu affinity here as well but in practise I've found the changes don't stick for that. I have not tested whether raising the priority makes any real difference to the runtime. I suspect very little since most of the time BOINC is running I'm not using it. |
Send message Joined: 29 Oct 17 Posts: 944 Credit: 15,193,000 RAC: 23,306 |
Appreciate task manager is not 'automatic' but as a test I used it to change the priority from 'Low' to 'High' for the regional model process for two tasks I have running. The regional model can be ~3-5x more expensive to run than the global model and is the one to really focus on. Since doing that this morning the average secs per model step (as reported by the task in the stdout_mon.txt file found in the project directory) has decreased by 2%. Since this is a long term average computed from the model start, it's likely the speedup is more. The PC has only been computing boinc tasks. Anyway, certainly seems worth a few mouse clicks for long running tasks. --- CPDN Visiting Scientist |
Send message Joined: 29 Oct 17 Posts: 944 Credit: 15,193,000 RAC: 23,306 |
Richard's suggestion of 'Process Lasso' was rather heavyweight for me, so after a bit of online searching it's possible to reset the priorities with a powershell two-liner: get-process -processname "wah2rm3m2t_um_8.31_windows_intelx86" | foreach { $_.PriorityClass = "Normal" } get-process -processname "wah2am3m2_um_8.31_windows_intelx86" | foreach { $_.PriorityClass = "Normal" }Execute this in a powershell with Admin privilege. Note 'Normal' is case-sensitive and first letter must be capital. Choice is 'Normal', 'Above normal', 'High' (or 'Below normal' which is higher than 'Low' the boinc default). The '.exe' extension is not needed. Change the process name as required. TaskManager can be used to verify the process priority has changed. It's certainly improved my runtimes by a small percentage. To make it even easier as a powershell script: .\set-ProcessPriority where the script is: function set-ProcessPriority { param($processName = $(throw "Enter process name"), $priority = "Normal") get-process -processname $processname | foreach { $_.PriorityClass = $priority } echo "`"$($processName)`"'s priority is set to `"$($priority)`"" } set-ProcessPriority "wah2am3m2_um_8.31_windows_intelx86" "High" set-ProcessPriority "wah2rm3m2t_um_8.31_windows_intelx86" "High"Save this to a file 'set-ProcessPriority.ps1'. Change 'High' to your preference. If the script does not run, the execution policy may need to be changed: Set-ExecutionPolicy RemoteSigned -Scope Processwhich only changes it for the current session. Credit to: https://monadblog.blogspot.com/2006/03/msh-how-to-change-processs-priority.html --- CPDN Visiting Scientist |
![]() Send message Joined: 15 May 09 Posts: 4444 Credit: 17,929,339 RAC: 29,974 |
and in Linux renice n -p process_idProcess_id is the number of the process. (you can find this by executing the command topin a terminal. n is an integer between -20 and 19. Negative numbers are a higher priority and need sudo in Ubuntu to run or another way of gaining root privileges in other distributions. |
©2024 climateprediction.net