How to set default priority of processes from an executable

Matthieu Grivelet 1 Reputation point
2021-08-23T16:39:08.037+00:00

Hello,

At work, we're using a high performance server to run our simulations.
One of my simulations softwares run its solver with in "low" priority processes. Thus, when one of my colleagues run other simulations, my computing time grows tenfolds. If I manually set the priority to "normal" with the task monitor, the load is balanced and everyone is happy.

But this solutions is not perene and not suitable for batch jobs where the solver will stop and be run again several times.

So I'm trying to find a way to have the processes from "solver.exe" run at "normal" priority by default.

As I'm using a proprietary graphical interface to set my parameters and run the simulations, I cannot create a batch file launching the exe in normal priority.

Thank you for your time,

Matthieu

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 60,161 Reputation points
    2021-08-23T19:31:22.913+00:00

    Processes run at normal priority by default (there are a couple of exceptions). This is the default and cannot be changed directly. If a process is running as a
    different priority then it was explicitly changed. There are several ways to do this including starting the process using the various approaches that allow setting the priority (powershell, cmd prompt, Win32, etc), having the process change its own priority after it starts or by finding a process and changing its priority manually.

    Since you said you have no control over the process startup then your only option is to change the priority after the process is started. To do that you'll need to enumerate the running processes and find the one you care about. You can then change its priority. You didn't specify what you use to run your batch jobs so I cannot provide any example code. If you're using any programming or scripting language then they all should allow you to do this. You just have to find the process first.

    0 comments No comments

  2. Limitless Technology 39,921 Reputation points
    2021-08-24T10:03:32.477+00:00

    Hello Matthieu,

    Thank you for your question.

    Please follow these steps, it will help you.

    1 Open Task Manager in more details view.

    2 Click/tap on the Details tab, right click or press and hold on the process name (ex: "mspaint.exe"), click/tap on Set priority, and click/tap on the Realtime, High, Above normal, Normal, Below normal, or Low priority level you want to set for this process.

    3 Click/tap on Change priority to confirm.

    4 When finished, you can close Task Manager if you like.

    If the reply was helpful, please don't forget to upvote or accept as answer.

    Thanks,

    Bharti B

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.