views:

644

answers:

2

I've deployed a .NET website to a 2008 (IIS7) server and the site seems to fly for up to 30-50 concurrent users. When load testing it the site comes to a grinding halt sometime after 100 concurrent users. Page loads go from 1.5 seconds to 90+

w3wp hits 100% and stays that way until I stop the load test. SQL on the other hand idles at about 2-3%.

I took a trace with debug diag and the report points to one of the threads that is taking up 11.358 cpu time vs 0.687 for the closest runner up. It's great that I've found the culprit, however I have no idea what to make of the info that I've been given. Here's the report output.

Thread 19 - System ID 4016 Entry point 0x00000000 Create time 7/8/2009 9:28:53 PM Time spent in user mode
0 Days 00:00:11.187 Time spent in kernel mode 0 Days 00:00:00.171

Function Source ntdll!KiFastSystemCallRet
ntdll!NtWaitForSingleObject+c
kernel32!WaitForSingleObjectEx+be
mscorwks!PEImage::LoadImage+1af
mscorwks!CLREvent::WaitEx+117
mscorwks!CLREvent::Wait+17
mscorwks!ThreadpoolMgr::SafeWait+73
mscorwks!ThreadpoolMgr::WorkerThreadStart+11c mscorwks!Thread::intermediateThreadProc+49 kernel32!BaseThreadInitThunk+e ntdll!__RtlUserThreadStart+23

ntdll!_RtlUserThreadStart+1b

Any help is appreciated!

+4  A: 

I recommend you use a higher-level profiler. Here's a list:

John Saunders
+1 dotTrace ftw
Nader Shirazie
ANTS is pretty good, too.
Steven Sudit
I just downloaded the dotTrace demo and it's helped me narrow it down some. Here's a screenshot of the culprit node expanded. Hopefully someone can shed some light on this. http://www.imgur.com/Xhoka.png It seems to be originating from the ToolkitScriptManager. Is this a known heavyweight? Am I better off sticking to a regular ol' ScriptManager?
Focus
Looks like it could be. Seems to be reflecting over (all loaded assemblies?) looking for an attribute. Could be expensive.
John Saunders
I ended up ripping out just about all of the AJAX Control Toolkit and the site is running like a champ now. Thanks!
Focus
A: 

Check the performance monitor to see how many exceptions are being thrown, that uses a lot of cpu.

jvanderh
Just checked and no errors are thrown.
Focus