Confusing system for setting GPU process priority discrimination

Message boards : Questions and problems : Confusing system for setting GPU process priority discrimination
Message board moderation

To post messages, you must log in.

AuthorMessage
Nuno Dias

Send message
Joined: 7 Mar 16
Posts: 4
Portugal
Message 73142 - Posted: 8 Oct 2016, 21:44:14 UTC

I'm trying to do some optimizations in a system crunching with CPU and GPU. I'm running v7.6.32 on Ubuntu 14. I dig around a bit and tested a few combinations. There are 2 files that seem to be important: cc_config.xml and /etc/default/boinc-client.

If I just change the default -1 value in cc_config.xml for
<process_priority>N</process_priority>, <process_priority_special>N</process_priority_special>
to say 2 and 4, nothing happens (btw, -1 is not listed as an option in https://boinc.berkeley.edu/wiki/Client_configuration)

I would also need to edit /etc/default/boinc-client to something like this
BOINC_NICE_CLIENT=-10 (default was 10)
BOINC_NICE_CLIENT=-5 (default was 19)

This way I could see the CPU priority of processes using GPU having a higher priority, keeping CPU only processes at 'normal'.

If I just edit /etc/default/boinc-client without editing cc_config.xml nothing happens and priority for all boinc app processes remains 'very low'.

Could this be made more simple?

Also I haven't tested and I'm not sure if changing to SCHEDULE="0" would actually make any difference.

At this point it also seems that the priority level can change to some lower priority setting sometimes, but I haven't been able to find a pattern so far.

What I can say so far is that for Collatz GPU the performance seems to be pretty much the same in my system, after the change. On the other hand, the global CPU load goes down to around 85% from previous 95%. I'm testing with other longer GPU projects/tasks for a day or two to check if those other projects would benefit from this higher priority setting.

I was wondering if someone here could pitch in with any useful experience or information. Thanks.
ID: 73142 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15480
Netherlands
Message 73143 - Posted: 8 Oct 2016, 21:57:50 UTC - in response to Message 73142.  

If I just change the default -1 value in cc_config.xml for
<process_priority>N</process_priority>, <process_priority_special>N</process_priority_special>
to say 2 and 4, nothing happens (btw, -1 is not listed as an option in https://boinc.berkeley.edu/wiki/Client_configuration)

That's because -1 isn't an option. Only the values 0 to 5 are, with 0 being idle priority and 5 being realtime priority.

If a value change doesn't seem to do anything, exit the BOINC client and restart it.
Also check that you're running based on preferences, for if you have Activity set to run always, this is one of those options where that can matter.
The change will also only happen at science application start, it won't change in the middle of a run. Therefore, exit BOINC & restart it.
ID: 73143 · Report as offensive
Juha
Volunteer developer
Volunteer tester
Help desk expert

Send message
Joined: 20 Nov 12
Posts: 801
Finland
Message 73273 - Posted: 11 Oct 2016, 20:23:13 UTC - in response to Message 73142.  

To explain a bit of what's going on.

On Unixes normal users can only lower the priority (increase niceness) of the processes they own. Only root can increase the priority (lower niceness) of processes. Processes inherit their initial priority from their parents.

That means, if BOINC client is started with below normal priority then none of the science apps it runs can have higher priority.

Since BOINC is usually sold with the promise that it runs quietly in the background and doesn't interfere with the use of the machine in any way I think it's sensible to have the client started with below normal priority. If the client is running with normal priority it can be noticed when it's handling large files.
ID: 73273 · Report as offensive
Nuno Dias

Send message
Joined: 7 Mar 16
Posts: 4
Portugal
Message 73339 - Posted: 15 Oct 2016, 20:14:31 UTC - in response to Message 73273.  

Yes, that's a nice baseline explanation to have. Thanks.

In a crunching machine I don't mind if the Boinc processes have low priority, since the machine isn't doing anything else anyways.

What I would like is for GPU tasks to have higher CPU priority than CPU-only tasks. And at the same time keep the overall performance high, meaning without wasting idle CPU cycles just because one process needs to be prioritized. Is this possible?
ID: 73339 · Report as offensive
Juha
Volunteer developer
Volunteer tester
Help desk expert

Send message
Joined: 20 Nov 12
Posts: 801
Finland
Message 73376 - Posted: 17 Oct 2016, 20:45:40 UTC - in response to Message 73339.  

I think the client should already start CPU tasks with idle priority and GPU tasks a bit higher than idle.

You'd then want to configure the client to start at least at the same priority as GPU apps or normal priority.
ID: 73376 · Report as offensive

Message boards : Questions and problems : Confusing system for setting GPU process priority discrimination

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.