I’ve hosted a WCF app in IIS 7.5 with HTTPS, TCP and Named pipes bindings.
Currently working on a new version of the webservice, trying to get performance improvements, I’m testing it with client (VS console client) and server (IIS hosted) on the same server when I discover something strange:
When doing tests of 100-1000 calls to a method returning a simple string, a builtin account outperforms a custom ApplicatiolPool identity, a domain user, with about 3x the speed.
I need the AppPool identity to be an domain admin because of the things the service is required to do.
Anyone that can shed some light on this?
Seems like I have found the “problem”, even though I can’t quite understand it.
As I mentioned I used a VS console client, i.e. debugged in visual studio. After doing some analyzing with process monitor, running both with and without builtin AppPool user, I saw visual studio doing something funky.
When running the AppPool under a domain-admin, VS spawned an additional .vshost.exe process under a different user (couldn’t see due to seeing only SID that I didn’t bother hunting down) that shot to the roof with network load.
I built the console-project and ran the executable outside of VS, and behold, no noticeable difference between AppPool-users and many times faster than in VS.
No idea why this is.
My conclusion is “When in doubt, run Process Monitor!” and that I shouldn’t have relied on the visual studio debugger so heavily for performance testing.