linux has had io priorities in the kernel scheduler since 2.6.13  They are
accessed from the command line using the ionice command.

ionice -c <class> -n <piority> <command>
ionice -c <class> -n <priority> -p <pid>

classes are 1 (realtime) 2(standard) 3(idle)
priorities are 0 (highest) to 7 (lowest)

Children inherit the settings of the parent.

In theory the io priorities effect paging, but I'm not sure that counts as
a memory priority.  I'm not sure a memory access priority makes sense apart
from I/O and CPU scheduling since memory access doesn't ususally involve a
system call.



On Mon, Sep 28, 2015 at 9:11 AM, David Anderson <[email protected]>
wrote:

> Those calls affect CPU priority.
> We're looking for something that changes I/O and memory priority.
> -- David
>
> On 9/28/2015 7:29 AM, Jon Sonntag wrote:
>
>> According to the MSDN documentation regarding SetThreadPriority:
>> "Sets the priority value for the specified thread. This value, together
>> with the priority class of the thread's process, determines the thread's
>> base priority level."
>>
>> To make sure that GPU apps get access to the CPU when required but still
>> run in the background, the Collatz apps use the following for Windows
>> versions:
>>
>> if (SetPriorityClass(GetCurrentProcess(),BELOW_NORMAL_PRIORITY_CLASS))
>> SetThreadPriority(worker_thread_handle, THREAD_PRIORITY_BELOW_NORMAL);
>>
>> I believe that boinc_init only allows idle or normal priority.Using the
>> above allows the GPU apps to run at a higher priority than the CPU apps
>> which is especially good when there are 8.5 cores (e.g. 8 CPU workunits and
>> 1 GPU workunit @ 0.5 CPUs) allocated on an 8 core host.
>>
>> Jon Sonntag
>>
>>
>> On Sun, Sep 27, 2015 at 12:18 AM, David Anderson <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>>     Windows has an API for reducing the priority of I/O and memory usage,
>>     namely SetPriorityClass():
>>
>> https://msdn.microsoft.com/en-us/library/windows/desktop/ms686219(v=vs.85).aspx
>> <
>> https://msdn.microsoft.com/en-us/library/windows/desktop/ms686219%28v=vs.85%29.aspx
>> >
>>     with the PROCESS_MODE_BACKGROUND_BEGIN**arg.
>>
>>     However - inexplicably - this arg can be used only by a process on
>> itself, not
>>     another process.
>>     So we could call this from boinc_init() on Win, but it wouldn't work
>> with
>>     existing apps.
>>     *
>>     *
>>     On 9/26/2015 2:13 AM, Christian Beer wrote:
>>
>>
>>         The main question here is: Is there a way to prioritize Memory
>> and I/O
>>         access? If yes is it available on all platforms (Windows, Mac,
>> Linux)? If
>>         not, is there a general way to get the load information from and
>> schedule
>>         accordingly?
>>
>>         You would still have to distinguish between BOINC generated
>> Memory and I/O
>>         operations and from other apps. This seems very tricky.
>>
>>         —
>>         Reply to this email directly or view it on GitHub
>>         <
>> https://github.com/BOINC/boinc/issues/1392#issuecomment-143414260>.
>>
>>
>>     _______________________________________________
>>     boinc_dev mailing list
>>     [email protected] <mailto:[email protected]>
>>     http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
>>     To unsubscribe, visit the above URL and
>>     (near bottom of page) enter your email address.
>>
>>
>>
> _______________________________________________
> boinc_dev mailing list
> [email protected]
> http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
> To unsubscribe, visit the above URL and
> (near bottom of page) enter your email address.
>
_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Reply via email to