How can I find out what's causing my application to run as High or Realtime priority

Marc Seguin 0 Reputation points
2023-06-08T12:12:37.5766667+00:00

I'm a bit of a loss on where to start with this. I work on a plugin for an application that's written by a different team within our company. The core application is a CAD type application written in C++ and uses OpenGL.

Shortly after the application starts, Windows (10 and 11) is setting the Base Priority of the application to High. In some cases it sets the priority to Realtime. This can cause Windows to become unresponsive while the application is running processes.

We are trying to understand why Windows would be setting the Base Priority to High or Realtime. The team that works on the core application has searched their codebase and haven't found anywhere that they are explicitly setting the process priority.

There must be something we are doing in our application that is making Windows think the process needs High or Realtime priority. I don't know what that "something" is, or where to start looking.

Any suggestions on how to debug this to understand why this is happening?

Windows for business | Windows Client for IT Pros | User experience | Other
Developer technologies | C++
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,776 Reputation points
    2023-06-09T12:09:13.9566667+00:00

    Hello Marc,

    Thank you for your question and for reaching out with your question today.

    Please try the following suggestions to try and determine where the prioritisation is being set from:

    1. Monitor System Activity: Use tools like Task Manager or Process Explorer to monitor the application's behaviour and resource usage during runtime. Look for any patterns or correlations when the base priority is set to High or Realtime.
    2. Analyse Application Dependencies: Determine if your plugin has any dependencies or interactions with other processes or system components that could be triggering the change in base priority. Check for any external libraries, APIs, or system calls that might be relevant.
    3. Review Plugin Code: Examine your plugin's codebase thoroughly for any sections that might affect process priority or make system calls related to priority. Look for any explicit calls to functions like SetPriorityClass or SetThreadPriority that could be modifying the priority inadvertently.
    4. Check for Configuration Options: Investigate if there are any configuration files or settings specific to your plugin that could be influencing process priority. Review the documentation or consult with the team responsible for the core application to ensure that you haven't missed any relevant configuration options.
    5. Test in Isolation: Consider testing your plugin in isolation, without any other plugins or extensions enabled, to see if the issue still occurs. This can help determine if the problem is specific to your plugin or if it is a more widespread issue.

    I used AI provided by ChatGPT to formulate part of this response. I have verified that the information is accurate before sharing it with you.

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

    Best regards.

    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.