Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - IIS optimization

 
Thread Tools Search this Thread
Old 02-10-2009, 02:48 PM   #1
Default IIS optimization


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.a
  Reply With Quote
Old 02-10-2009, 03:36 PM   #2
m.a
 
Posts: n/a
Default Re: IIS optimization
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




> 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




m.a
  Reply With Quote
Old 02-10-2009, 03:53 PM   #3
Juan T. Llibre
 
Posts: n/a
Default Re: IIS optimization
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.a" <ma.@spamoff.com> wrote in message news:%...
> 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
>
>
>
>
>> 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
>
>





Juan T. Llibre
  Reply With Quote
Old 02-10-2009, 07:28 PM   #4
m.a
 
Posts: n/a
Default Re: IIS optimization
Hello,



Thank you so much for looking at this.



>>> 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.

>
> 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


>
>>> 2) How much RAM does it have?

>>
>> 1GB

>
> 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
>
>>> 3) How fast is / are its hard disk(s)?

>>
>> I don't know.

>
> 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.
>
>>> 7) How many concurrent users?

>>
>> 1 user is slow

>
> That's not actually what I asked...




What did you ask?


>
>
>>> 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.

>
> 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.a
  Reply With Quote
Old 02-10-2009, 08:18 PM   #5
m.a
 
Posts: n/a
Default Re: IIS optimization
Thanks so much.



>>>>> 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.
>>>
>>> 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

>
> 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.



>
>
>>>>> 2) How much RAM does it have?
>>>>
>>>> 1GB
>>>
>>> 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

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




How much do I need ?




>>>>> 7) How many concurrent users?
>>>>
>>>> 1 user is slow
>>>
>>> That's not actually what I asked...

>>
>> What did you ask?

>
> 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.




>>>>> 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.
>>>
>>> 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!

>
> 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




m.a
  Reply With Quote
Old 02-11-2009, 09:21 AM   #6
Andrew Morton
 
Posts: n/a
Default Re: IIS optimization
m.a wrote:
> 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




Andrew Morton
  Reply With Quote
Old 02-17-2009, 09:17 PM   #7
harborsparrow
 
Posts: n/a
Default Re: IIS optimization
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.

On Feb 10, 9:48*am, "m.a" <m...@spamoff.com> wrote:
> 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




harborsparrow
  Reply With Quote
Old 02-18-2009, 12:10 AM   #8
James Wilson
 
Posts: n/a
Default Re: IIS optimization
////////////////////////////////////////////////////////////////

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;
??

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

"harborsparrow" <> wrote in message
news:1f54c9f7-3fb1-4ea3-a989-...
> 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.
>
> On Feb 10, 9:48 am, "m.a" <m...@spamoff.com> wrote:
>> 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

>



James Wilson
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows XP optimization tips travolta010@gmail.com DVD Video 4 08-21-2007 01:50 AM
Windows XP optimization tricks travolta008@gmail.com DVD Video 0 08-04-2007 10:03 AM
Windows XP optimization tricks travolta003@gmail.com DVD Video 0 08-01-2007 02:00 PM
Windows XP optimization tricks travolta006@gmail.com DVD Video 0 07-25-2007 01:49 PM
Windows optimization tricks travolta008@gmail.com DVD Video 0 07-14-2007 05:45 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46