IIS optimization

M

m.a

Hello,

I have an ASP.NET application which hosted on an IIS 6 (windows 2003 64
bit) It is very slow and my task is to find its bottleneck. I have no idea
where to start, Is there any tutorial or any good book in this subject? What
tools do I need?



Any information is very appreciated.



Best regards
 
M

m.a

Here is the answers:


1) How old is the server?
I could not get the question. It is under development and the server is up
for some month now, but I upgrade the asp.net code regularly.



2) How much RAM does it have?


1GB


3) How fast is / are its hard disk(s)?



I don't know.

4) Is your web app the only one running on this IIS box?


yes


5) Does performance vary at different times of the day?


No.


6) If you reboot the machine, does performance pick up noticably but then
deteriorate over time?



I don't think so.

7) How many concurrent users?



1 user is slow



8) Does the web app use an RDBMS? If so, what make and model, same machine
or different machine?



Yes. Access database, but the size of database is small (8MByte). The
databse is on the same machine.

9) Has performance always been bad, or has it got worse over time?



It was better but now it is very bad.





Here is more information:



If I use iexplorer on the server, I am getting the same response. The cpu
doesn't show a lot of activity during a request. It took around 10 sec for a
response and the size of requested page is around 100Kbyte.



Regards
 
J

Juan T. Llibre

re:
!>> 2) How much RAM does it have?
!> 1GB

That's your biggest problem right there.

You need to upgrade to at least 2GB, preferably to 4GB.



Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
=========================
 
M

m.a

Hello,



Thank you so much for looking at this.


Is the machine recently purchased, or have you had it for years...



I am using a server from a hosting company and I belive it is around one or
two years old

Almost no point in going any further with this - that is a ridiculously
small amount of RAM for a web server. Nothing's going to improve until you
sort this out...



By checking again, the server has dual processor and 2G RAM
Why don't you know? Don't you have access to the machine...?



Yes I have access but how can I check? I can check their capacity but not
their speed.
That's not actually what I asked...



What did you ask?

That's your second problem. Jet databases (there's actually no such thing
as an "Access database" per se) are completely unsuitable as backends for
web applications...



I agree with you, but the database speed is good. If I run the application
on local machine and look at the time that takes to process data, It is very
quick, less than a sec, but the web server response is 10 sec!





Best regards
 
M

m.a

Thanks so much.


And you're certain that the hosting company is not renting out the server
to other customers...?

It is a dedicated server and I should assume that it is my server and nobody
else using it.


2GB RAM is better, but still very small...



How much do I need ?



I asked how many concurrent users of the application there are...



There is only one user and it is slow. When more than one server is there,
it should be much slower.



But it's the speed of your application on the remote server that is at
fault... When you're running the app locally, you're the only user.

Jet databases simply aren't designed for web applications - see the
following Microsoft article: http://support.microsoft.com/kb/299973



There is not a lot of data in database and it is there to get query data. In
fact I check the cpu activity during a web request and it is very small,
only 10% of CPU power is used during a web request. So the server is not
heavily loaded. For this reason, I think there should be a problem in IIS
configuration.

What do you think?



Best regards
 
A

Andrew Morton

m.a said:
I have an ASP.NET application which hosted on an IIS 6 (windows
2003 64 bit) It is very slow and my task is to find its bottleneck. I
have no idea where to start, Is there any tutorial or any good book
in this subject? What tools do I need?

How quickly does a simple html page come from the server?

Have you tried adding Trace="true" in the <%@ Page....%> directive to see if
anything stands out as taking a long time on the server as opposed to on the
test machine?

Andrew
 
H

harborsparrow

Without running a profiler on your code, it is impossible to say for
sure. But the very first thing to look for, in my experience, is
using a lot of string concatenation.

Change any significant amount of concatenations to use StringBuilder
instead (especially it it's happening within a loop).

Might help a lot.

Second thing to check is whether scarce resources (files, database
connections, etc) are being disposed correctly.
 
J

James Wilson

////////////////////////////////////////////////////////////////

one option to find the bottleneck is to place a operation timer statement
between each line/statement

first declare some variables

??
private string OperationTimer = string.empty;
private int Counter = 0;
??

now in the code blocks itself you can place the below code in between each
statement

??
OperationTimer+= (Counter++).toString() + "\r\n" + DateTime.Now().toString()
+ "\r\n \r\n";
----line of code/operation
OperationTimer+= (Counter++).toString() + "\r\n" + DateTime.Now().toString()
+ "\r\n \r\n";
----line of code/operation
OperationTimer+= (Counter++).toString() + "\r\n" + DateTime.Now().toString()
+ "\r\n \r\n";
----line of code/operation
??

after you have completed building the string of Times pass it back to a
Textbox or Panel like this

??
Textbox1.Text = OperationTimer;
??

//////////////////////////////////////////////////////////////
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,286
Latest member
ChristieSo

Latest Threads

Top