473,387 Members | 1,664 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Simple Performance question

Hi

I have a simple ASP.NET web page with a single label control:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="default.aspx.vb"
Inherits="proj.TheTime" EnableViewState="false" EnableSessionState="false"%>
....
<p>
<asp:label id="Label1" runat="server">Label</asp:label></p>
....

The code behind file is compiled and contains:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Label1.Text = DateTime.Now.ToString
End Sub

I understand that the first time the web page is requested it is compiled
but it appears to be doing this every few hours. i.e. the first time takes a
couple of seconds then it refreshes very quickly. After a few hours it seems
to take the same amount of time as the first time. When I turn tracing on
(debug is off) I can see that the initial time is 0.110125 to finish page
rendering and subsequent times are about 0.000351.

This happens on 2 separate Windows 2003 Servers. I can't find anything in
the documentation about this. Can someone please let me know what I need to
do to stop the page recompiling itself so often? (If that's what it's doing)

Thanks
Andrew
Nov 18 '05 #1
3 1460
Andrew,
A possibility is that the ASP.Net worker process (aspnet_wp.exe) is
recycling itself. There are a number of reasons why this happens.

Open up your machine.config file, located in
C:\windows\Microsoft.NET\Framework\v1.1.4322\CONFI G\

do a search for <processModel you'll see a number of settings which can
cause a recycle (read the comments about the node). for example:
memoryLimit="[number]" - Represents percentage of physical memory process is
allowed to use before process is recycled

Karl

"Andrew Jocelyn" <an************@REMOVETHIS.empetus.co.uk> wrote in message
news:ev**************@TK2MSFTNGP11.phx.gbl...
Hi

I have a simple ASP.NET web page with a single label control:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="default.aspx.vb" Inherits="proj.TheTime" EnableViewState="false" EnableSessionState="false"%> ...
<p>
<asp:label id="Label1" runat="server">Label</asp:label></p>
...

The code behind file is compiled and contains:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Label1.Text = DateTime.Now.ToString
End Sub

I understand that the first time the web page is requested it is compiled
but it appears to be doing this every few hours. i.e. the first time takes a couple of seconds then it refreshes very quickly. After a few hours it seems to take the same amount of time as the first time. When I turn tracing on
(debug is off) I can see that the initial time is 0.110125 to finish page
rendering and subsequent times are about 0.000351.

This happens on 2 separate Windows 2003 Servers. I can't find anything in
the documentation about this. Can someone please let me know what I need to do to stop the page recompiling itself so often? (If that's what it's doing)
Thanks
Andrew

Nov 18 '05 #2
Hi Karl

Thanks for the pointers so far. I checked the memoryLimit which is set to 60
but I found this note in the machine.config file. Does it apply to me? I am
running IIS6 in the default mode.

"When ASP.NET is running under IIS 6 in native mode, the IIS 6 process model
is used and settings in this section are ignored."

Incidentally I checked the web application pool settings and noticed that
under the performance tab, there is an idle timeout setting of 20 minutes to
shut down the worker process. Could that be anything to do with my problem?
This is the only .NET web page I have running on the server so maybe the
inactivity is causing this?

It's quite scary that a web page which simply tells the time can take 5-10
seconds to display every 5th or so time it's called. What will happen when I
have 2 ASP.NET web pages running on the same server? How much memory and
CPUs I'm I going to need? (Sorry for the sarcasm but it's been bothering me
somewhat.)

Thanks again for your help.
Andrew
"Karl" <none> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
Andrew,
A possibility is that the ASP.Net worker process (aspnet_wp.exe) is
recycling itself. There are a number of reasons why this happens.

Open up your machine.config file, located in
C:\windows\Microsoft.NET\Framework\v1.1.4322\CONFI G\

do a search for <processModel you'll see a number of settings which can
cause a recycle (read the comments about the node). for example:
memoryLimit="[number]" - Represents percentage of physical memory process is allowed to use before process is recycled

Karl

"Andrew Jocelyn" <an************@REMOVETHIS.empetus.co.uk> wrote in message news:ev**************@TK2MSFTNGP11.phx.gbl...
Hi

I have a simple ASP.NET web page with a single label control:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="default.aspx.vb"
Inherits="proj.TheTime" EnableViewState="false"

EnableSessionState="false"%>
...
<p>
<asp:label id="Label1" runat="server">Label</asp:label></p>
...

The code behind file is compiled and contains:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Label1.Text = DateTime.Now.ToString
End Sub

I understand that the first time the web page is requested it is compiled but it appears to be doing this every few hours. i.e. the first time takes a
couple of seconds then it refreshes very quickly. After a few hours it

seems
to take the same amount of time as the first time. When I turn tracing

on (debug is off) I can see that the initial time is 0.110125 to finish page rendering and subsequent times are about 0.000351.

This happens on 2 separate Windows 2003 Servers. I can't find anything in the documentation about this. Can someone please let me know what I need

to
do to stop the page recompiling itself so often? (If that's what it's

doing)

Thanks
Andrew


Nov 18 '05 #3
Andrew,
You should definitely play with those settings. From the brief explanation
you've given me, the idle time could definitely be the issue. I don't have
enough IIS 6.0 experience to answer your question definitively. I know
that in the properties of your application pool, there are a handful of
setting for worker process recycling ...this is only the case if you aren't
in IIS 5.0 compatible mode...also, if this is the case, your worker process
will be named w3svc.exe

There's a counter you can add to your machine to see if the worker process
is indeed recycling itself. That would at least give you an idea if that's
what the cause is. It's under "ASP.Net" --> "Worker process Restarts".

Finally, in asp.net 2.0, you'll be able to pre-compile everything, so worker
process recycling will hopefully not be as noticeable.

Karl

"Andrew Jocelyn" <an************@REMOVETHIS.empetus.co.uk> wrote in message
news:O7**************@TK2MSFTNGP11.phx.gbl...
Hi Karl

Thanks for the pointers so far. I checked the memoryLimit which is set to 60 but I found this note in the machine.config file. Does it apply to me? I am running IIS6 in the default mode.

"When ASP.NET is running under IIS 6 in native mode, the IIS 6 process model is used and settings in this section are ignored."

Incidentally I checked the web application pool settings and noticed that
under the performance tab, there is an idle timeout setting of 20 minutes to shut down the worker process. Could that be anything to do with my problem? This is the only .NET web page I have running on the server so maybe the
inactivity is causing this?

It's quite scary that a web page which simply tells the time can take 5-10
seconds to display every 5th or so time it's called. What will happen when I have 2 ASP.NET web pages running on the same server? How much memory and
CPUs I'm I going to need? (Sorry for the sarcasm but it's been bothering me somewhat.)

Thanks again for your help.
Andrew
"Karl" <none> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
Andrew,
A possibility is that the ASP.Net worker process (aspnet_wp.exe) is
recycling itself. There are a number of reasons why this happens.

Open up your machine.config file, located in
C:\windows\Microsoft.NET\Framework\v1.1.4322\CONFI G\

do a search for <processModel you'll see a number of settings which can
cause a recycle (read the comments about the node). for example:
memoryLimit="[number]" - Represents percentage of physical memory process
is
allowed to use before process is recycled

Karl

"Andrew Jocelyn" <an************@REMOVETHIS.empetus.co.uk> wrote in

message
news:ev**************@TK2MSFTNGP11.phx.gbl...
Hi

I have a simple ASP.NET web page with a single label control:

<%@ Page Language="vb" AutoEventWireup="false"

Codebehind="default.aspx.vb"
Inherits="proj.TheTime" EnableViewState="false"

EnableSessionState="false"%>
...
<p>
<asp:label id="Label1" runat="server">Label</asp:label></p>
...

The code behind file is compiled and contains:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Label1.Text = DateTime.Now.ToString
End Sub

I understand that the first time the web page is requested it is compiled but it appears to be doing this every few hours. i.e. the first time takes
a
couple of seconds then it refreshes very quickly. After a few hours it

seems
to take the same amount of time as the first time. When I turn tracing

on (debug is off) I can see that the initial time is 0.110125 to finish page rendering and subsequent times are about 0.000351.

This happens on 2 separate Windows 2003 Servers. I can't find anything in the documentation about this. Can someone please let me know what I

need to
do to stop the page recompiling itself so often? (If that's what it's

doing)

Thanks
Andrew



Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: freakyfreak | last post by:
Does anyone have any basic, simple scripts of sp's that I can give my computer operators to use to monitor for serious conditions on our sql servers? We are new in the ms-sql arena, a small shop...
10
by: Jason | last post by:
Hi, I have a few million data items being received by my program and I wish to store them in a list, with each item being inserted in any position in the list. Any performance tips so that my...
115
by: Mark Shelor | last post by:
I've encountered a troublesome inconsistency in the C-language Perl extension I've written for CPAN (Digest::SHA). The problem involves the use of a static array within a performance-critical...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
10
by: GeekBoy | last post by:
Okay, I have two identical web servers running Windows 2003 web server. I have an ASP.NET application which runs great on one of them. Dedicated IP address, behind our firewall, etc. Everyone's...
5
by: Byron | last post by:
I need to create an application that uses primarily a single form rather than an SDI that creates a new form for everythting. However, I don't want an MDI style application since the users I'm...
10
by: Sourcerer | last post by:
I wrote this very simple code in .NET VC++. I compiled it on my system, and tried to run it on my friend's computer (he doesn't have the compiler). We both have Windows XP Professional. I have .NET...
30
by: galiorenye | last post by:
Hi, Given this code: A** ppA = new A*; A *pA = NULL; for(int i = 0; i < 10; ++i) { pA = ppA; //do something with pA
7
by: CSharper | last post by:
Yesterday I had a heated discussion with my colleagues on what is a data centric application and having business logic in sql. I have group of people who wants to include all the business logic in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.