First of all - the explanation:
I have a web app I have developed that "functions" properly, just not optimally. Whenever I activate a control that causes a postback, the CPU on the server spikes to about 30% (w3wp.exe) and retreats to nothing within a few seconds. This causes considerable performance issues in both the front-end and the server. Whether it's a drop-down box that causes a SQL query through it's "SelectedIndexChanged" event, or just postback that massages data already on the form without a SQL call.
In an attempt to provide useful information, here is what I have tried and the results so far:-- Looked at this, but I can already see what is causing my spikehttp://forums.asp.net/t/1181591.aspx/1?w3wp+processor+spikes-- Tried this URL, but I couldn't find anything out of the norm. I may just not know what to look for:http://blogs.msdn.com/b/webtopics/archive/2009/08/08/using-procdump-exe-to-monitor-w3wp-exe-for-cpu-spikes.aspx-- Went through all of my code to remove the old-style string concatenation and did it with StringBuilder instead.-- Set Compilation Debug to false (marginal front-end improvement, but no improvement on CPU)-- Tried installing and enabling the DynamicCompressionModule (compdyn.dll). That improved the front-end performance noticably, but did not affect the CPU utilization.-- There is currently no anti-virus on this machine because it is just a development server for now, but I did run a scanner on it with the latest definitions to make sure it was D&D free.
-- I don't have any additional httpmodules/handlers beyond the normal ones.
-- This is dealing with a data-bound page
I figure it will be easier if I make the code available to you. I have uploaded it -->to this ZIP file.
Contents of QuickEntry.ZIPQuickEntry.aspxQuickEntry.aspx.csAD.cs (Active Directory handler)Site.MasterSite.Master.csWeb.Config (with sensitive data replaced by xxxxxx)
Here are my server specs:Intel Xeon 3.4GHz Quad-Core4GB RAMIIS 7.0Windows Server 2008 R2 Enterprise 64-bit SP1Microsoft SQL Server 2008 Standard SP2ASP.NET 4.0
Can anyone point me in the right direction? If my CPU spikes at 30% with one user clicking on one item, surely it will crash if I release it to my users. Let me know if you need me to post anything else.
Attachment: quickentry.zip