ASP.NET Application Deployment Problem
I have deployed an application written in ASP.NET 2.0 to production and it is experiencing some latency issues. Loading pages takes about 4-5 seconds. The GridView is updated approximately at the same time as loading.
The app works fine in the development window. I did the following investigation on the server
- Check available memory ... 80%.
- Processor minting ... 1%
- Perfmon tested disk IO, less than 15%
Server configuration
Windows Server 2003 Sp2 Dual 2.0 GZH RAM 2 GB
Running SQL Server 2005 only and IIS only
Is there anything else I can fix? I also checked the event log for errors, it is clean.
EDITED ~ The only difference I just picked is the DEV window. I am using IE7 and clients are using IE6. Could this be a problem?
UPDATE ~ I upgraded all clients to IE8 and noticed a 30% increase in performance. I finally found out that I left my debug = true in the web.config file. Setting that to flase returned the application to stable performance ... I still can't believe I did it.
a source to share
Double check that the application is not running in debug mode. In the file, web.config
make sure the B attribute debug
is system.web\compilation
set to false.
In addition to the application being slower and using more system memory, you will also experience slow page loading as the write is cached in debug mode.
a source to share
The first thing I would like to do is turn on tracing. (see: http://www.4guysfromrolla.com/webtech/081501-1.shtml )
then add tracepoints to the page generation code to give you an idea of how long each part of the page build takes:
System.Diagnostics.Trace.Write(
"Starting Page init",
"TraceCheck");
//Init page
System.Diagnostics.Trace.Write(
"End Page init",
"TraceCheck");
System.Diagnostics.Trace.Write(
"Starting Data Fetch",
"TraceCheck");
//Get Data
System.Diagnostics.Trace.Write(
"End Data Fetch",
"TraceCheck");
etc.
this way you can see exactly how long each stage passes and then target that area.
a source to share
Are you running the same SQL Server as in your tests or a different one?
To find out where the time comes from, you can add some trace instructions to the page load and then load the page with tracing enabled. This can help indicate the problem.
Also, what are the specifications of your development window? Same?
a source to share
Depending on the version of Visual Studio you have with Team Developer, there is a productivity wizard that you might want to look into.
Plus, if you're using IE 8, it has a Profiler that will let you see how long a site will take to load in the browser itself. One of the first things to determine is the time on the client or server side.
If client-side, start looking at what javascript you have and optimize / get rid of it.
If server side, you need to look at all performance counters (perfmon). For example, we had an application that was scanning on production servers due to the sheer amount of JIT.
You also need to look at the communication between the internet server and the database server. How long does the request take? Are the boxes breaking discs? and etc.
a source to share