delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org 280B83858C1F |
DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; |
s=default; t=1691774130; | |
bh=Udc/sac+5uCj9HQ+9mL8h7KhWkAwiGYqhmXNdaLjc4s=; | |
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: | |
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: | |
From; | |
b=tZTobLO7RX6GRAAELqRtAe10coEXi0f07MFQo4GTciX4JYvknS/1vhN5Mkuah4HGj | |
4BZN/USuE97N5Wgo0TD4kB8Fpba6IFyXu53JBzY4J75WDHewAVL17LakeUtrfTIfT5 | |
kdct+OMstQ4yryb/+bpbbMHyPvXw7+LI/BsqXtaY= | |
X-Original-To: | cygwin AT cygwin DOT com |
Delivered-To: | cygwin AT cygwin DOT com |
DMARC-Filter: | OpenDMARC Filter v1.4.2 sourceware.org E54A6385772B |
X-Authority-Analysis: | v=2.4 cv=e5oV9Il/ c=1 sm=1 tr=0 ts=64d66c8c |
a=DxHlV3/gbUaP7LOF0QAmaA==:117 a=DxHlV3/gbUaP7LOF0QAmaA==:17 | |
a=IkcTkHD0fZMA:10 a=30KeihfUasEDSKDPGhkA:9 a=QEXdDO2ut3YA:10 | |
Message-ID: | <cfbece04-40d6-566d-a4b8-f5334b1d453a@Shaw.ca> |
Date: | Fri, 11 Aug 2023 11:14:51 -0600 |
MIME-Version: | 1.0 |
User-Agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 |
Thunderbird/102.14.0 | |
Subject: | Re: Run a Cygwin process with "higher" scheduler priority |
To: | cygwin AT cygwin DOT com |
References: | <CALXu0UeiEH3gOYzwVjOqTgQ1OC8z=ZBOd4y4ky_-B0t5SrS9Pg AT mail DOT gmail DOT com> |
Organization: | Inglis |
In-Reply-To: | <CALXu0UeiEH3gOYzwVjOqTgQ1OC8z=ZBOd4y4ky_-B0t5SrS9Pg@mail.gmail.com> |
X-CMAE-Envelope: | MS4xfO3YvhIHpWnUvBqW4GBJorbOslK4uqdSCvfd41ycmfvTrAp2KmBbtXImMUyioUrlG9Na0ODSnNQf6Wfh/UymuXXkuavROwlU/JY9nr3PpgcrDz7ZG74O |
pXVen/xLoOT+w3aTQnnuaPE/W5EjpPYbvji41IRR3dlx0jMCi37vga2X3Tbqu3rnuRGf4o3uIzN9xJtqmooOg5pglUtvdaN6O6s/8dQI/Fb06Stzkl5Y7up6 | |
X-Spam-Status: | No, score=-3.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, |
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, | |
SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 | |
X-Spam-Checker-Version: | SpamAssassin 3.4.6 (2021-04-09) on |
server2.sourceware.org | |
X-BeenThere: | cygwin AT cygwin DOT com |
X-Mailman-Version: | 2.1.29 |
List-Id: | General Cygwin discussions and problem reports <cygwin.cygwin.com> |
List-Unsubscribe: | <https://cygwin.com/mailman/options/cygwin>, |
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe> | |
List-Archive: | <https://cygwin.com/pipermail/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-request AT cygwin DOT com?subject=help> |
List-Subscribe: | <https://cygwin.com/mailman/listinfo/cygwin>, |
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe> | |
From: | Brian Inglis via Cygwin <cygwin AT cygwin DOT com> |
Reply-To: | cygwin AT cygwin DOT com |
Cc: | Brian Inglis <Brian DOT Inglis AT Shaw DOT ca>, |
Cedric Blancher <cedric DOT blancher AT gmail DOT com> | |
Errors-To: | cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com |
Sender: | "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com> |
X-MIME-Autoconverted: | from base64 to 8bit by delorie.com id 37BHFWcT005367 |
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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |