What can lead to the fact that the execution process from the Windows service will run slower than starting from the command line (admin)?

What can cause a running process from a Windows service to run slower than starting from a command line? When I execute a process (another exe) from the command line with administrator privileges, it is four times faster than when the Windows service performs the same process. What could be the reason for this. Permissions on directories and files are appropriate for the account. It works successfully, only 4 times slower. Need ideas on what to research to find out the problem.

We used sysinternals processexplorer and do not see anything.

Where is the "Achievements" tab with the ability to change the "priority" to see if this causes a problem?

+3
source share
3 answers

In Windows background services, a lower priority may be given, and this is configured on the advanced properties tab of the computer.

+2
source

Assuming the priority of both applications is the same, you need an application profile and see which calls take the most time. This should at least give you enough detailed information to go back and ask “why this particular call is slow” and not “why my application is slow”.

+2
source

Download the sysinternals process monitoring tool from www.sysinternals.com, and then start tracking an application that shows you what the process does in terms of access to the registry / file, and can potentially show you what to look for when delays occur.

If you have debugging symbols, it can also give you the name of a function call in the called dll / app, but even knowing what happens when the delay occurs and which dlls are used, the user mode or kernel gives you a good idea of ​​where to start .

+1
source

Source: https://habr.com/ru/post/1721823/


All Articles