Problem Description
I have a WPF Application that is usually running under a local user account with Administrator rights. However, in certain scenarios, the process is started by a service or script that is running under SYSTEM
account and the process is therefore also running under the SYSTEM
account.
The issue is that when the process is running under SYSTEM
account, there are some noticeable lags (the UI is not very responsive).
I did some digging using perfmon and didn't see anything suspicious (CPU is not overloaded, no unusual exceptions are thrown, no memory leaks, etc ...). I also checked the Event log and didn't find anything usefull (no Warnings / Errors, only unrelated information about the system).
I first thought it was due to the process being executed in an Impersonated context, but even without impersonation (I used PsExec.exe -i -s
to start it under SYSTEM account), the lags still persists.
Any idea where this would come from ?
Do not hesitate to ask if you need more information, I'm mostly looking for some ideas that would help find the root cause (the obvious workaround for this is to not start the process under SYSTEM account but it is not really a fix).
Also, note that the application is running under a customized version of Windows Embedded Standard (XP SP3) and on a device with a capacitive touch screen.
My Question
My question is not "how can I solve this problem ?" but "why is the application running with low performance when under SYSTEM account.
Update 1
I tried to change Windows's performance optimization settings as @Sander suggested, nothing changed (http://support.microsoft.com/kb/308417).
Update 2
I also did a test using this application: http://www.kynosarges.org/WpfPerformance.html#Application
When running the app under each account, I consistently get running time about twice longer under SYSTEM account for the first GDI+ test (it basically draws a bunch of triangles), which leads me to think this is not strictly WPF limited. Again, I didn't change anything except the account under which the process is executed.