Page 1 of 1
Run process at higher priority
Posted: Tue Sep 05, 2017 6:43 pm
by Jon8RFC
This would be very handy to have it as an option to setup, rather than remembering to manually change the process priority to above normal or high in Windows.
Maybe it's not as big of a deal for beefy computers, but it seems to smooth out minor hiccups in multiplayer for me on my old machine.
Re: Run process at higher priority
Posted: Tue Sep 05, 2017 9:58 pm
by Jap2.0
I don't think programs themselves can do that. Perhaps there is an option in Windows. I think it could be a major security flaw if that could happen.
Re: Run process at higher priority
Posted: Tue Sep 05, 2017 10:02 pm
by Zeblote
Programs can definitely do that. It would be completely pointless to even have the option if they couldn't...
Re: Run process at higher priority
Posted: Wed Sep 06, 2017 12:42 am
by Jap2.0
Sorry if I wasn't clear, I mean that the programs themselves can't change their priority. For example, if you set Factorio to a high priority it will run slightly better, but I don't think Factorio can set itself to high priority.
Re: Run process at higher priority
Posted: Thu Sep 07, 2017 9:36 am
by Jon8RFC
In the interim I've changed the shortcut for Factorio "target" to this:
Code: Select all
cmd.exe /c start "Factorio" /abovenormal "C:\Program Files\Factorio\bin\x64\factorio.exe"
@Jap2.0
https://msdn.microsoft.com/en-us/library/ms686219.aspx
Re: Run process at higher priority
Posted: Thu Sep 07, 2017 11:24 am
by Jap2.0
That's quite interesting. Is there a Linux equivalent?
Re: Run process at higher priority
Posted: Thu Sep 07, 2017 1:01 pm
by zx64
It's worth noting that Windows already gives a priority boost to the foreground window:
When a process that uses NORMAL_PRIORITY_CLASS is brought to the foreground, the scheduler boosts the priority class of the process associated with the foreground window, so that it is greater than or equal to the priority class of any background processes. The priority class returns to its original setting when the process is no longer in the foreground.
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
Re: Run process at higher priority
Posted: Thu Sep 07, 2017 1:03 pm
by Nidan
Jap2.0 wrote:Is there a Linux equivalent?
nice (or renice for a process that's already running)
But decreasing niceness (aka increasing the priority) usually requires root privileges.