* Run a Cygwin process with "higher" scheduler priority
@ 2023-08-11 15:44 Cedric Blancher
2023-08-11 17:14 ` Brian Inglis
0 siblings, 1 reply; 9+ messages in thread
From: Cedric Blancher @ 2023-08-11 15:44 UTC (permalink / raw)
To: cygwin
Good evening!
How can we set the scheduler priority for a Cygwin process to "higher"
than normal on start?
Basically we want a Cygwin compatible script version of the Windows
task manager feature Name/PID--->Details--->Set priority--->Higher
Ced
--
Cedric Blancher <cedric.blancher@gmail.com>
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Run a Cygwin process with "higher" scheduler priority
2023-08-11 15:44 Run a Cygwin process with "higher" scheduler priority Cedric Blancher
@ 2023-08-11 17:14 ` Brian Inglis
2023-10-14 11:39 ` Cedric Blancher
0 siblings, 1 reply; 9+ messages in thread
From: Brian Inglis @ 2023-08-11 17:14 UTC (permalink / raw)
To: cygwin; +Cc: Cedric Blancher
On 2023-08-11 09:44, Cedric Blancher via Cygwin wrote:
> How can we set the scheduler priority for a Cygwin process to "higher"
> than normal on start?
>
> Basically we want a Cygwin compatible script version of the Windows
> task manager feature Name/PID--->Details--->Set priority--->Higher
Pretend the system is BSD or Linux and web search e.g. SO for that capability,
facility, or feature, then check Cygwin with Search Packages or:
$ cygcheck -p usr/bin/nice
Found 6 matches for usr/bin/nice
coreutils-debuginfo-8.26-2 - coreutils-debuginfo: Debug info for coreutils
...
coreutils-9.0-1 - coreutils: GNU core utilities (includes fileutils, sh-utils
and textutils)
$ cygcheck -p usr/bin/renice
Found 6 matches for usr/bin/renice
util-linux-debuginfo-2.32.1-1 - util-linux-debuginfo: Debug info for util-linux
util-linux-debuginfo-2.33.1-1 - util-linux-debuginfo: Debug info for util-linux
util-linux-debuginfo-2.33.1-2 - util-linux-debuginfo: Debug info for util-linux
util-linux-2.32.1-1 - util-linux: Collection of basic system utilities
util-linux-2.33.1-1 - util-linux: Collection of basic system utilities
util-linux-2.33.1-2 - util-linux: Collection of basic system utilities
$ cygcheck -p usr/bin/chrt
Found 2 matches for usr/bin/chrt
util-linux-debuginfo-2.33.1-2 - util-linux-debuginfo: Debug info for util-linux
util-linux-2.33.1-2 - util-linux: Collection of basic system utilities
$ cygcheck -p usr/bin/taskset
Found 2 matches for usr/bin/taskset
util-linux-debuginfo-2.33.1-2 - util-linux-debuginfo: Debug info for util-linux
util-linux-2.33.1-2 - util-linux: Collection of basic system utilities
so you may need to install util-linux (coreutils is already installed as a base
package for Cygwin) then:
$ man nice renice taskset chrt
You may need to run these from an elevated admin shell for other user ids,
unowned processes, or higher (negative) priority.
It has been years since I tried these so can no longer remember if -20
corresponds to Windows "RealTime" or if you need to use PowerShell to set that e.g.
$proc = Get-Process -ProcessName "..."
$proc.PriorityClass = "RealTime"
and that needs to be done from an elevated admin (Power)Shell.
Of course, never set that on any system except on a very idle, very I/O bound,
well tested process, such as ntpd, that needs stably fast interrupt service and
non-preemptible cpu access for ms every few seconds, preferably on a single or
few cpus to which affinity is set.
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Run a Cygwin process with "higher" scheduler priority
2023-08-11 17:14 ` Brian Inglis
@ 2023-10-14 11:39 ` Cedric Blancher
2023-10-14 13:47 ` Eliot Moss
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Cedric Blancher @ 2023-10-14 11:39 UTC (permalink / raw)
To: cygwin
On Fri, 11 Aug 2023 at 19:14, Brian Inglis <Brian.Inglis@shaw.ca> wrote:
>
> On 2023-08-11 09:44, Cedric Blancher via Cygwin wrote:
> > How can we set the scheduler priority for a Cygwin process to "higher"
> > than normal on start?
> >
> > Basically we want a Cygwin compatible script version of the Windows
> > task manager feature Name/PID--->Details--->Set priority--->Higher
>
> Pretend the system is BSD or Linux and web search e.g. SO for that capability,
> facility, or feature, then check Cygwin with Search Packages or:
>
> $ cygcheck -p usr/bin/nice
> Found 6 matches for usr/bin/nice
I know about nice and renice, but I don't see whether it is working or not.
> coreutils-debuginfo-8.26-2 - coreutils-debuginfo: Debug info for coreutils
> ...
> coreutils-9.0-1 - coreutils: GNU core utilities (includes fileutils, sh-utils
> and textutils)
> $ cygcheck -p usr/bin/renice
> Found 6 matches for usr/bin/renice
> util-linux-debuginfo-2.32.1-1 - util-linux-debuginfo: Debug info for util-linux
> util-linux-debuginfo-2.33.1-1 - util-linux-debuginfo: Debug info for util-linux
> util-linux-debuginfo-2.33.1-2 - util-linux-debuginfo: Debug info for util-linux
> util-linux-2.32.1-1 - util-linux: Collection of basic system utilities
> util-linux-2.33.1-1 - util-linux: Collection of basic system utilities
> util-linux-2.33.1-2 - util-linux: Collection of basic system utilities
> $ cygcheck -p usr/bin/chrt
> Found 2 matches for usr/bin/chrt
> util-linux-debuginfo-2.33.1-2 - util-linux-debuginfo: Debug info for util-linux
> util-linux-2.33.1-2 - util-linux: Collection of basic system utilities
> $ cygcheck -p usr/bin/taskset
> Found 2 matches for usr/bin/taskset
> util-linux-debuginfo-2.33.1-2 - util-linux-debuginfo: Debug info for util-linux
> util-linux-2.33.1-2 - util-linux: Collection of basic system utilities
>
> so you may need to install util-linux (coreutils is already installed as a base
> package for Cygwin) then:
>
> $ man nice renice taskset chrt
chrt does not work, the syscalls for realtime seem to be not implemented.
>
> You may need to run these from an elevated admin shell for other user ids,
> unowned processes, or higher (negative) priority.
>
> It has been years since I tried these so can no longer remember if -20
> corresponds to Windows "RealTime" or if you need to use PowerShell to set that e.g.
>
> $proc = Get-Process -ProcessName "..."
> $proc.PriorityClass = "RealTime"
>
> and that needs to be done from an elevated admin (Power)Shell.
>
> Of course, never set that on any system except on a very idle, very I/O bound,
> well tested process, such as ntpd, that needs stably fast interrupt service and
> non-preemptible cpu access for ms every few seconds, preferably on a single or
> few cpus to which affinity is set.
Is there anything in /proc which can tell me the current *Windows*
scheduler priority level? Or a command line tool?
Ced
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Run a Cygwin process with "higher" scheduler priority
2023-10-14 11:39 ` Cedric Blancher
@ 2023-10-14 13:47 ` Eliot Moss
2023-10-15 3:55 ` Brian Inglis
2023-10-14 22:52 ` Mark Geisert
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Eliot Moss @ 2023-10-14 13:47 UTC (permalink / raw)
To: Cedric Blancher, cygwin
On 10/14/2023 7:39 AM, Cedric Blancher via Cygwin wrote:
> On Fri, 11 Aug 2023 at 19:14, Brian Inglis <Brian.Inglis@shaw.ca> wrote:
>>
>> On 2023-08-11 09:44, Cedric Blancher via Cygwin wrote:
>>> How can we set the scheduler priority for a Cygwin process to "higher"
>>> than normal on start?
>>>
>>> Basically we want a Cygwin compatible script version of the Windows
>>> task manager feature Name/PID--->Details--->Set priority--->Higher
>>
>> Pretend the system is BSD or Linux and web search e.g. SO for that capability,
>> facility, or feature, then check Cygwin with Search Packages or:
>>
>> $ cygcheck -p usr/bin/nice
>> Found 6 matches for usr/bin/nice
>
> I know about nice and renice, but I don't see whether it is working or not.
>
>> coreutils-debuginfo-8.26-2 - coreutils-debuginfo: Debug info for coreutils
>> ...
>> coreutils-9.0-1 - coreutils: GNU core utilities (includes fileutils, sh-utils
>> and textutils)
>> $ cygcheck -p usr/bin/renice
>> Found 6 matches for usr/bin/renice
>> util-linux-debuginfo-2.32.1-1 - util-linux-debuginfo: Debug info for util-linux
>> util-linux-debuginfo-2.33.1-1 - util-linux-debuginfo: Debug info for util-linux
>> util-linux-debuginfo-2.33.1-2 - util-linux-debuginfo: Debug info for util-linux
>> util-linux-2.32.1-1 - util-linux: Collection of basic system utilities
>> util-linux-2.33.1-1 - util-linux: Collection of basic system utilities
>> util-linux-2.33.1-2 - util-linux: Collection of basic system utilities
>> $ cygcheck -p usr/bin/chrt
>> Found 2 matches for usr/bin/chrt
>> util-linux-debuginfo-2.33.1-2 - util-linux-debuginfo: Debug info for util-linux
>> util-linux-2.33.1-2 - util-linux: Collection of basic system utilities
>> $ cygcheck -p usr/bin/taskset
>> Found 2 matches for usr/bin/taskset
>> util-linux-debuginfo-2.33.1-2 - util-linux-debuginfo: Debug info for util-linux
>> util-linux-2.33.1-2 - util-linux: Collection of basic system utilities
>>
>> so you may need to install util-linux (coreutils is already installed as a base
>> package for Cygwin) then:
>>
>> $ man nice renice taskset chrt
>
> chrt does not work, the syscalls for realtime seem to be not implemented.
>
>>
>> You may need to run these from an elevated admin shell for other user ids,
>> unowned processes, or higher (negative) priority.
>>
>> It has been years since I tried these so can no longer remember if -20
>> corresponds to Windows "RealTime" or if you need to use PowerShell to set that e.g.
>>
>> $proc = Get-Process -ProcessName "..."
>> $proc.PriorityClass = "RealTime"
>>
>> and that needs to be done from an elevated admin (Power)Shell.
>>
>> Of course, never set that on any system except on a very idle, very I/O bound,
>> well tested process, such as ntpd, that needs stably fast interrupt service and
>> non-preemptible cpu access for ms every few seconds, preferably on a single or
>> few cpus to which affinity is set.
>
> Is there anything in /proc which can tell me the current *Windows*
> scheduler priority level? Or a command line tool?
I recall getting taskset going in util-linux a while back, but I don't
recall working on priority related things. You could look into the
cygwin source code to see how Windows priorities relate to the priority
values in Cygwin. Then you may be able just to use /proc/[pid]/stat
read out what you want.
Best - EM
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Run a Cygwin process with "higher" scheduler priority
2023-10-14 11:39 ` Cedric Blancher
2023-10-14 13:47 ` Eliot Moss
@ 2023-10-14 22:52 ` Mark Geisert
2023-10-30 6:09 ` Chris Wagner
2023-10-30 7:43 ` Backwoods BC
3 siblings, 0 replies; 9+ messages in thread
From: Mark Geisert @ 2023-10-14 22:52 UTC (permalink / raw)
To: cygwin
Cedric Blancher via Cygwin wrote:
> On Fri, 11 Aug 2023 at 19:14, Brian Inglis <Brian.Inglis@shaw.ca> wrote:
>>
>> On 2023-08-11 09:44, Cedric Blancher via Cygwin wrote:
>>> How can we set the scheduler priority for a Cygwin process to "higher"
>>> than normal on start?
>>>
>>> Basically we want a Cygwin compatible script version of the Windows
>>> task manager feature Name/PID--->Details--->Set priority--->Higher
>>
>> Pretend the system is BSD or Linux and web search e.g. SO for that capability,
>> facility, or feature, then check Cygwin with Search Packages or:
>>
>> $ cygcheck -p usr/bin/nice
>> Found 6 matches for usr/bin/nice
>
> I know about nice and renice, but I don't see whether it is working or not.
OFGS Why not try the command? If it doesn't seem to do anything then try the
command with the '-h' or '--help' option. Or maybe try the canonical doc 'man
nice'. You shouldn't always need our help with stuff like this.
..mark
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Run a Cygwin process with "higher" scheduler priority
2023-10-14 13:47 ` Eliot Moss
@ 2023-10-15 3:55 ` Brian Inglis
2023-10-15 13:04 ` Christian Franke
0 siblings, 1 reply; 9+ messages in thread
From: Brian Inglis @ 2023-10-15 3:55 UTC (permalink / raw)
To: cygwin; +Cc: Cedric Blancher
On 2023-10-14 07:47, Eliot Moss via Cygwin wrote:
> On 10/14/2023 7:39 AM, Cedric Blancher via Cygwin wrote:
>> On Fri, 11 Aug 2023 at 19:14, Brian Inglis wrote:
>>> On 2023-08-11 09:44, Cedric Blancher via Cygwin wrote:
>>>> How can we set the scheduler priority for a Cygwin process to "higher"
>>>> than normal on start?
>>>> Basically we want a Cygwin compatible script version of the Windows
>>>> task manager feature Name/PID--->Details--->Set priority--->Higher
>>> Pretend the system is BSD or Linux and web search e.g. SO for that capability,
>>> facility, or feature, then check Cygwin with Search Packages or:
>>> $ cygcheck -p usr/bin/nice
>>> Found 6 matches for usr/bin/nice
>> I know about nice and renice, but I don't see whether it is working or not.
>>> coreutils-debuginfo-8.26-2 - coreutils-debuginfo: Debug info for coreutils
>>> ...
>>> coreutils-9.0-1 - coreutils: GNU core utilities (includes fileutils, sh-utils
>>> and textutils)
>>> $ cygcheck -p usr/bin/renice
>>> Found 6 matches for usr/bin/renice
>>> util-linux-debuginfo-2.32.1-1 - util-linux-debuginfo: Debug info for util-linux
>>> util-linux-debuginfo-2.33.1-1 - util-linux-debuginfo: Debug info for util-linux
>>> util-linux-debuginfo-2.33.1-2 - util-linux-debuginfo: Debug info for util-linux
>>> util-linux-2.32.1-1 - util-linux: Collection of basic system utilities
>>> util-linux-2.33.1-1 - util-linux: Collection of basic system utilities
>>> util-linux-2.33.1-2 - util-linux: Collection of basic system utilities
>>> $ cygcheck -p usr/bin/chrt
>>> Found 2 matches for usr/bin/chrt
>>> util-linux-debuginfo-2.33.1-2 - util-linux-debuginfo: Debug info for util-linux
>>> util-linux-2.33.1-2 - util-linux: Collection of basic system utilities
>>> $ cygcheck -p usr/bin/taskset
>>> Found 2 matches for usr/bin/taskset
>>> util-linux-debuginfo-2.33.1-2 - util-linux-debuginfo: Debug info for util-linux
>>> util-linux-2.33.1-2 - util-linux: Collection of basic system utilities
>>> so you may need to install util-linux (coreutils is already installed as a base
>>> package for Cygwin) then:
>>> $ man nice renice taskset chrt
>> chrt does not work, the syscalls for realtime seem to be not implemented.
>>> You may need to run these from an elevated admin shell for other user ids,
>>> unowned processes, or higher (negative) priority.
>>> It has been years since I tried these so can no longer remember if -20
>>> corresponds to Windows "RealTime" or if you need to use PowerShell to set
>>> that e.g.
>>> $proc = Get-Process -ProcessName "..."
>>> $proc.PriorityClass = "RealTime"
>>> and that needs to be done from an elevated admin (Power)Shell.
>>> Of course, never set that on any system except on a very idle, very I/O bound,
>>> well tested process, such as ntpd, that needs stably fast interrupt service and
>>> non-preemptible cpu access for ms every few seconds, preferably on a single or
>>> few cpus to which affinity is set.
>> Is there anything in /proc which can tell me the current *Windows*
>> scheduler priority level? Or a command line tool?
> I recall getting taskset going in util-linux a while back, but I don't
> recall working on priority related things. You could look into the
> cygwin source code to see how Windows priorities relate to the priority
> values in Cygwin. Then you may be able just to use /proc/[pid]/stat
> read out what you want.
ISTR testing nice/renice, and found it was a simple priority mapping to/from
Unix to Windows Idle to RealTime (at the time, process Affinity was not
supported, so went with a PowerShell startup script instead); see:
https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/sched.cc#l107
https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/sched.cc#l234
https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/sched.cc#l277
They are documented in proc(5) /proc/PID/stat fields 18 priority and 19 nice
typically 20 and 0, as shown by `top` PR and NI, shown by `procps -l` as 80 and
0, and not shown by Cygwin `ps`.
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Run a Cygwin process with "higher" scheduler priority
2023-10-15 3:55 ` Brian Inglis
@ 2023-10-15 13:04 ` Christian Franke
0 siblings, 0 replies; 9+ messages in thread
From: Christian Franke @ 2023-10-15 13:04 UTC (permalink / raw)
To: cygwin
Brian Inglis via Cygwin wrote:
> On 2023-10-14 07:47, Eliot Moss via Cygwin wrote:
>> On 10/14/2023 7:39 AM, Cedric Blancher via Cygwin wrote:
>>> On Fri, 11 Aug 2023 at 19:14, Brian Inglis wrote:
>>>> ...
>>>
>>>> ...
>>>> $ cygcheck -p usr/bin/chrt
>>>> Found 2 matches for usr/bin/chrt
>>>> util-linux-debuginfo-2.33.1-2 - util-linux-debuginfo: Debug info
>>>> for util-linux
>>>> util-linux-2.33.1-2 - util-linux: Collection of basic system utilities
>>>> $ cygcheck -p usr/bin/taskset
>>>> Found 2 matches for usr/bin/taskset
>>>> util-linux-debuginfo-2.33.1-2 - util-linux-debuginfo: Debug info
>>>> for util-linux
>>>> util-linux-2.33.1-2 - util-linux: Collection of basic system utilities
>>>> so you may need to install util-linux (coreutils is already
>>>> installed as a base
>>>> package for Cygwin) then:
>>>> $ man nice renice taskset chrt
>>> chrt does not work, the syscalls for realtime seem to be not
>>> implemented.
These are partly implemented, but sched_setscheduler() always fails with
ENOSYS because scheduler policy (SCHED_*) cannot be changed on Windows.
Changing priority only with sched_setparam() would work, but this is not
used by chrt.
>>>> You may need to run these from an elevated admin shell for other
>>>> user ids,
>>>> unowned processes, or higher (negative) priority.
>>>> It has been years since I tried these so can no longer remember if -20
>>>> corresponds to Windows "RealTime" or if you need to use PowerShell
>>>> to set that e.g.
>>>> $proc = Get-Process -ProcessName "..."
>>>> $proc.PriorityClass = "RealTime"
>>>> and that needs to be done from an elevated admin (Power)Shell.
>>>> Of course, never set that on any system except on a very idle, very
>>>> I/O bound,
>>>> well tested process, such as ntpd, that needs stably fast interrupt
>>>> service and
>>>> non-preemptible cpu access for ms every few seconds, preferably on
>>>> a single or
>>>> few cpus to which affinity is set.
>>> Is there anything in /proc which can tell me the current *Windows*
>>> scheduler priority level? Or a command line tool?
>> I recall getting taskset going in util-linux a while back, but I don't
>> recall working on priority related things. You could look into the
>> cygwin source code to see how Windows priorities relate to the priority
>> values in Cygwin. Then you may be able just to use /proc/[pid]/stat
>> read out what you want.
>
> ISTR testing nice/renice, and found it was a simple priority mapping
> to/from Unix to Windows Idle to RealTime (at the time, process
> Affinity was not supported, so went with a PowerShell startup script
> instead); see:
>
> https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/sched.cc#l107
>
>
> https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/sched.cc#l234
>
>
> https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/sched.cc#l277
>
The above maps priorities for sched_*() API. The mapping for nice() and
get/setpriority() is done here:
https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/miscfuncs.cc;h=767384f#l110
> They are documented in proc(5) /proc/PID/stat fields 18 priority and
> 19 nice typically 20 and 0, as shown by `top` PR and NI, shown by
> `procps -l` as 80 and 0, and not shown by Cygwin `ps`.
On Cygwin, field 18 is always equal to (field_19 + 20). The priority
value returned by sched_getparam() is different and could be shown with
'chrt -p PID'.
The output from the command 'nice' without parameter may differ from
/proc/PID/stat field 19 because the latter always reinterprets the
current Windows prio class.
This script prints a table of 'nice' outputs, /proc/PID/stat fields 19
and 18, result of sched_getparam() and corresponding Windows prio class
for different 'nice -n ...' commands:
#!/bin/bash
echo "COMMAND : NICE STAT STPRI RTPRI WINPRI"
for i in {-21..20}; do
nice -n $i sh -e -c '
n=$(nice)
s=$(cut -d" " -f19 /proc/$$/stat)
p=$(cut -d" " -f18 /proc/$$/stat)
r=$(LC_MESSAGES=C chrt -p $$ | sed -n "s,^.*priority: ,,p")
case $r in
3) c="IDLE_PRIORITY_CLASS" ;;
9) c="BELOW_NORMAL_PRIORITY_CLASS" ;;
15) c="NORMAL_PRIORITY_CLASS" ;;
21) c="ABOVE_NORMAL_PRIORITY_CLASS" ;;
27) c="HIGH_PRIORITY_CLASS" ;;
32) c="REALTIME_PRIORITY_CLASS" ;;
*) c="?" ;;
esac
printf "nice -n %3d:%5d %5d %5d %5d %s\\n" \
"'$i'" "$n" "$s" "$p" "$r" "$c"
'
done
--
Regards,
Christian
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Run a Cygwin process with "higher" scheduler priority
2023-10-14 11:39 ` Cedric Blancher
2023-10-14 13:47 ` Eliot Moss
2023-10-14 22:52 ` Mark Geisert
@ 2023-10-30 6:09 ` Chris Wagner
2023-10-30 7:43 ` Backwoods BC
3 siblings, 0 replies; 9+ messages in thread
From: Chris Wagner @ 2023-10-30 6:09 UTC (permalink / raw)
To: Cedric Blancher; +Cc: cygwin
On 2023-10-14 7:39 am, Cedric Blancher via Cygwin wrote:
>
> I know about nice and renice, but I don't see whether it is working or
> not.
>
> Is there anything in /proc which can tell me the current *Windows*
> scheduler priority level? Or a command line tool?
>
> Ced
Iarn's TaskInfo will show you the real Windows priority (and let you
change it and even suspend processes) along with a boatload of other
highly useful stats. That will let you validate anything Cygwin claims
it did.
https://www.iarsn.com/taskinfo.html
It's old but it still works and I run it continuously.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Run a Cygwin process with "higher" scheduler priority
2023-10-14 11:39 ` Cedric Blancher
` (2 preceding siblings ...)
2023-10-30 6:09 ` Chris Wagner
@ 2023-10-30 7:43 ` Backwoods BC
3 siblings, 0 replies; 9+ messages in thread
From: Backwoods BC @ 2023-10-30 7:43 UTC (permalink / raw)
To: cygwin
On Sat, Oct 14, 2023 at 4:41 AM Cedric Blancher via Cygwin
<cygwin@cygwin.com> wrote:
> Is there anything in /proc which can tell me the current *Windows*
> scheduler priority level? Or a command line tool?
'pslist' from Sysinternals (owned by MS) will tell you the Windows priority.
<https://learn.microsoft.com/en-ca/sysinternals/downloads/pslist>
As for mapping Cygwin priorities to Windows, I ran a test using
'renice' to change the priority of a job and found the follosing
non-linear mapping:
Cygwin priority 1-3 is Windows priority 8
Cygwin priority 4-11 is Windows priority 6
Cygwin priority 12-19 is Windows priority 4
I only tested priorities 1 to 19.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-10-30 7:43 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-11 15:44 Run a Cygwin process with "higher" scheduler priority Cedric Blancher
2023-08-11 17:14 ` Brian Inglis
2023-10-14 11:39 ` Cedric Blancher
2023-10-14 13:47 ` Eliot Moss
2023-10-15 3:55 ` Brian Inglis
2023-10-15 13:04 ` Christian Franke
2023-10-14 22:52 ` Mark Geisert
2023-10-30 6:09 ` Chris Wagner
2023-10-30 7:43 ` Backwoods BC
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).