Hi there,

We've developed an application that reads xml from a database and
converts it to html using xslt. It works fine most of the time but the
users are experiencing a problem. Periodically, a single page can take
as long as 15 seconds to load and then everything will speed up again
and will work fine for a while before doing the same thing again.

At first i thought that maybe memory was leaking and that the process
was being recycled and the page recompiled but there is nothing in the
system logs to suggest this and the w3wp.exe process id remains the
same.

Because of the nature of the system I cannot provide configuration
info etc but advice about how to identify the problem would be very
helpful indeed. Take care and thank you for taking the time to read
this message.

Hugs, Peter

Re: iis 6.0 / asp.net application / slows down periodically by Kristofer

Kristofer
Fri Jan 30 16:07:18 CST 2004

Hello,

Use Tracing.

See:
http://www.asp.net/Tutorials/quickstart.aspx
(click on Tracing in the left menu)

for more information about this.

--
Regards,
Kristofer Gafvert - IIS MVP
Reply to newsgroup only. Remove NEWS if you must reply by email, but please
do not.
www.ilopia.com - FAQ and Tutorials for Windows Server 2003


"Peter" <lad4bear@hotmail.com> wrote in message
news:ed9b1810.0401301213.4937eec7@posting.google.com...
> Hi there,
>
> We've developed an application that reads xml from a database and
> converts it to html using xslt. It works fine most of the time but the
> users are experiencing a problem. Periodically, a single page can take
> as long as 15 seconds to load and then everything will speed up again
> and will work fine for a while before doing the same thing again.
>
> At first i thought that maybe memory was leaking and that the process
> was being recycled and the page recompiled but there is nothing in the
> system logs to suggest this and the w3wp.exe process id remains the
> same.
>
> Because of the nature of the system I cannot provide configuration
> info etc but advice about how to identify the problem would be very
> helpful indeed. Take care and thank you for taking the time to read
> this message.
>
> Hugs, Peter



Re: iis 6.0 / asp.net application / slows down periodically by peter

peter
Fri Jan 30 16:45:10 CST 2004

Thanks for the link. I have tracing switched on and am also outputting
timings on all of the main code sections. This shows that the page is being
processed in just under a second. The delay seems to occur between the
request and the response, which is why i'm wondering if it may be a
configuration/iis 6 issue.

Wish I was in a position to give more detail. Sorry about that.

Peter



"Kristofer Gafvert" <kgafvert@NEWSilopia.com> wrote in message
news:eHKpu135DHA.3004@tk2msftngp13.phx.gbl...
> Hello,
>
> Use Tracing.
>
> See:
> http://www.asp.net/Tutorials/quickstart.aspx
> (click on Tracing in the left menu)
>
> for more information about this.
>
> --
> Regards,
> Kristofer Gafvert - IIS MVP
> Reply to newsgroup only. Remove NEWS if you must reply by email, but
please
> do not.
> www.ilopia.com - FAQ and Tutorials for Windows Server 2003
>
>
> "Peter" <lad4bear@hotmail.com> wrote in message
> news:ed9b1810.0401301213.4937eec7@posting.google.com...
> > Hi there,
> >
> > We've developed an application that reads xml from a database and
> > converts it to html using xslt. It works fine most of the time but the
> > users are experiencing a problem. Periodically, a single page can take
> > as long as 15 seconds to load and then everything will speed up again
> > and will work fine for a while before doing the same thing again.
> >
> > At first i thought that maybe memory was leaking and that the process
> > was being recycled and the page recompiled but there is nothing in the
> > system logs to suggest this and the w3wp.exe process id remains the
> > same.
> >
> > Because of the nature of the system I cannot provide configuration
> > info etc but advice about how to identify the problem would be very
> > helpful indeed. Take care and thank you for taking the time to read
> > this message.
> >
> > Hugs, Peter
>
>



Re: iis 6.0 / asp.net application / slows down periodically by David

David
Fri Jan 30 20:00:59 CST 2004

Is this page being "cached" ? It sounds like it's cached and periodically
purged, and the page is expensive (15sec) to generate.


We are aware of a performance issue with IIS6 and scripts that were not
written to be performant (like ASP, PHP, Perl, etc).

It usually happens when you use a loop construct that is intensively
printing out something line-by-line. Basically, what's happening is that
the script is forcing IIS to directly write to the network every single line
in *individual* network packets instead of buffering them -- which ends up
wasting a huge amount of network bandwidth. A common cause of this is an
application looping through a database table and printing out hundreds of
rows of info.

Basically, the problems always been there within the script code; the
question is how the web server deals with it.

The following ASP will take a long time to complete, if ever, on IIS6. If
you sniff the network, you will see 100,000 packets with a single 'A' as the
data -- a 99.9% bandwidth waste.

<%
Response.Buffer = true

Response.Write ( "Start: " & Now & "<BR>" )

FOR i = 1 TO 100000
Response.Write( "A" )
Response.Flush()
NEXT

Response.Write ( "<BR>Stop: " & Now & "<BR>" )
%>


The interesting thing, of course, is that IIS6 is actually doing what you
told it to do -- literally -- instead of guessing what you are trying to do.
Prior IIS versions had buffering implemented at the Winsock layer, so it
wasn't actually doing what you were telling it to do...


--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Peter" <lad4bear@hotmail.com> wrote in message
news:ed9b1810.0401301213.4937eec7@posting.google.com...
Hi there,

We've developed an application that reads xml from a database and
converts it to html using xslt. It works fine most of the time but the
users are experiencing a problem. Periodically, a single page can take
as long as 15 seconds to load and then everything will speed up again
and will work fine for a while before doing the same thing again.

At first i thought that maybe memory was leaking and that the process
was being recycled and the page recompiled but there is nothing in the
system logs to suggest this and the w3wp.exe process id remains the
same.

Because of the nature of the system I cannot provide configuration
info etc but advice about how to identify the problem would be very
helpful indeed. Take care and thank you for taking the time to read
this message.

Hugs, Peter



Re: iis 6.0 / asp.net application / slows down periodically by peter

peter
Sat Jan 31 05:09:58 CST 2004

Hi David, thanks for your reply.

Would be good to clarify things with you a little though. If I was to run
the script you provided would the performance be consistantly poor? For the
most part, each page loads in under a second but every 10 minutes or so one
page will take an excessively long time to load. The choice of page seems to
be arbitary so I'm unsure where to start looking. We use a single xsl
transformation to create the html, and only have one response.write
statement at the very end but we don't flush it - is this important?

Look forward to hearing from you again :)

Take care, Peter



"David Wang [Msft]" <someone@online.microsoft.com> wrote in message
news:eVHeU655DHA.1020@tk2msftngp13.phx.gbl...
> Is this page being "cached" ? It sounds like it's cached and periodically
> purged, and the page is expensive (15sec) to generate.
>
>
> We are aware of a performance issue with IIS6 and scripts that were not
> written to be performant (like ASP, PHP, Perl, etc).
>
> It usually happens when you use a loop construct that is intensively
> printing out something line-by-line. Basically, what's happening is that
> the script is forcing IIS to directly write to the network every single
line
> in *individual* network packets instead of buffering them -- which ends up
> wasting a huge amount of network bandwidth. A common cause of this is an
> application looping through a database table and printing out hundreds of
> rows of info.
>
> Basically, the problems always been there within the script code; the
> question is how the web server deals with it.
>
> The following ASP will take a long time to complete, if ever, on IIS6. If
> you sniff the network, you will see 100,000 packets with a single 'A' as
the
> data -- a 99.9% bandwidth waste.
>
> <%
> Response.Buffer = true
>
> Response.Write ( "Start: " & Now & "<BR>" )
>
> FOR i = 1 TO 100000
> Response.Write( "A" )
> Response.Flush()
> NEXT
>
> Response.Write ( "<BR>Stop: " & Now & "<BR>" )
> %>
>
>
> The interesting thing, of course, is that IIS6 is actually doing what you
> told it to do -- literally -- instead of guessing what you are trying to
do.
> Prior IIS versions had buffering implemented at the Winsock layer, so it
> wasn't actually doing what you were telling it to do...
>
>
> --
> //David
> IIS
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> //
> "Peter" <lad4bear@hotmail.com> wrote in message
> news:ed9b1810.0401301213.4937eec7@posting.google.com...
> Hi there,
>
> We've developed an application that reads xml from a database and
> converts it to html using xslt. It works fine most of the time but the
> users are experiencing a problem. Periodically, a single page can take
> as long as 15 seconds to load and then everything will speed up again
> and will work fine for a while before doing the same thing again.
>
> At first i thought that maybe memory was leaking and that the process
> was being recycled and the page recompiled but there is nothing in the
> system logs to suggest this and the w3wp.exe process id remains the
> same.
>
> Because of the nature of the system I cannot provide configuration
> info etc but advice about how to identify the problem would be very
> helpful indeed. Take care and thank you for taking the time to read
> this message.
>
> Hugs, Peter
>
>



Re: iis 6.0 / asp.net application / slows down periodically by David

David
Sat Jan 31 17:53:04 CST 2004

The script I provided would be poor performance 100% of the time. Based on
your description, I do not think that issue is affecting you.

I think you may want to try to instrument some of these pages with
transforms to see whether it's:
1. the transform that takes a long time every once in a while
2. the request handling that takes a long time
3. the response writing that takes a long time

Are you sure that the w3wp process did not recycle. For example, default
configuration would idle-timeout a worker process in 15 minutes, and since
ASP.Net has about a 10-15 second startup cost, it means that seemingly
random ASP.Net pages would have a 10-15 second delay if the application pool
containing the worker process is accessed infrequently.

Also, are you running in IIS6 native worker process mode or in IIS5
compatibility mode.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"peter x" <lad4bear@boltblue.com> wrote in message
news:bvg2b1$lf5$1@news.boltblue.com...
Hi David, thanks for your reply.

Would be good to clarify things with you a little though. If I was to run
the script you provided would the performance be consistantly poor? For the
most part, each page loads in under a second but every 10 minutes or so one
page will take an excessively long time to load. The choice of page seems to
be arbitary so I'm unsure where to start looking. We use a single xsl
transformation to create the html, and only have one response.write
statement at the very end but we don't flush it - is this important?

Look forward to hearing from you again :)

Take care, Peter



"David Wang [Msft]" <someone@online.microsoft.com> wrote in message
news:eVHeU655DHA.1020@tk2msftngp13.phx.gbl...
> Is this page being "cached" ? It sounds like it's cached and periodically
> purged, and the page is expensive (15sec) to generate.
>
>
> We are aware of a performance issue with IIS6 and scripts that were not
> written to be performant (like ASP, PHP, Perl, etc).
>
> It usually happens when you use a loop construct that is intensively
> printing out something line-by-line. Basically, what's happening is that
> the script is forcing IIS to directly write to the network every single
line
> in *individual* network packets instead of buffering them -- which ends up
> wasting a huge amount of network bandwidth. A common cause of this is an
> application looping through a database table and printing out hundreds of
> rows of info.
>
> Basically, the problems always been there within the script code; the
> question is how the web server deals with it.
>
> The following ASP will take a long time to complete, if ever, on IIS6. If
> you sniff the network, you will see 100,000 packets with a single 'A' as
the
> data -- a 99.9% bandwidth waste.
>
> <%
> Response.Buffer = true
>
> Response.Write ( "Start: " & Now & "<BR>" )
>
> FOR i = 1 TO 100000
> Response.Write( "A" )
> Response.Flush()
> NEXT
>
> Response.Write ( "<BR>Stop: " & Now & "<BR>" )
> %>
>
>
> The interesting thing, of course, is that IIS6 is actually doing what you
> told it to do -- literally -- instead of guessing what you are trying to
do.
> Prior IIS versions had buffering implemented at the Winsock layer, so it
> wasn't actually doing what you were telling it to do...
>
>
> --
> //David
> IIS
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> //
> "Peter" <lad4bear@hotmail.com> wrote in message
> news:ed9b1810.0401301213.4937eec7@posting.google.com...
> Hi there,
>
> We've developed an application that reads xml from a database and
> converts it to html using xslt. It works fine most of the time but the
> users are experiencing a problem. Periodically, a single page can take
> as long as 15 seconds to load and then everything will speed up again
> and will work fine for a while before doing the same thing again.
>
> At first i thought that maybe memory was leaking and that the process
> was being recycled and the page recompiled but there is nothing in the
> system logs to suggest this and the w3wp.exe process id remains the
> same.
>
> Because of the nature of the system I cannot provide configuration
> info etc but advice about how to identify the problem would be very
> helpful indeed. Take care and thank you for taking the time to read
> this message.
>
> Hugs, Peter
>
>




Re: iis 6.0 / asp.net application / slows down periodically by David

David
Mon Feb 02 03:19:28 CST 2004

Recycling with the same PID is possible but not likely -- the PID is
controlled by Windows when a new process is created.

In-page timing would only say the code tooks a second to run -- it doesn't
say whether IIS took 1 second to both receive the request and send the
response but CLR took 10 seconds to JIT the page prior to ASP.Net running it
in 1 seconds...

I don't really have anything more to offer. My suspicion is that your 10-15
second slowdown corresponds with some JIT activity -- what's triggering
that, I don't know. Process recycling is one way to cause that, and to
eliminate it as a cause, you can try turning off all the IIS6 health
monitoring features for the AppPool and turn off Pinging -- IIS6 should not
recycle any processes anymore.

If this stops the 10-15 second slowdown, you will need to evaluate what code
you're running which triggers the process recycling (should be easy process
of elimination), and then decide whether you're going to fix your code or
tune your IIS settings.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"peter x" <lad4bear@boltblue.com> wrote in message
news:bvio7l$7po$1@news.boltblue.com...
I have implemented in-page timing and the everything completes in about a
second. In fact I'm very impressed with the speed. :)

IIS 6.0 is running in native worker process mode and has its own application
pool. The application pool has the default setting apart from the fact that
it is set to recycle when the virtual memory usage reaches 500MB. I figured
it was worth a shot :) If I remember correctly I have increased the idle
time-out to 30 minutes but it happens whenever I am idle or not. I checked
the process before and after the the slow page and its the same. Is it
possible for the w3wp.exe process to recycle with the same process id? I do
not find any record of a recycle in the event logs. I've run out of ideas
and now I don't know what to do next. Any suggestions?

Cheers, Peter

"David Wang [Msft]" <someone@online.microsoft.com> wrote in message
news:eIM8GiF6DHA.2168@TK2MSFTNGP12.phx.gbl...
> The script I provided would be poor performance 100% of the time. Based
on
> your description, I do not think that issue is affecting you.
>
> I think you may want to try to instrument some of these pages with
> transforms to see whether it's:
> 1. the transform that takes a long time every once in a while
> 2. the request handling that takes a long time
> 3. the response writing that takes a long time
>
> Are you sure that the w3wp process did not recycle. For example, default
> configuration would idle-timeout a worker process in 15 minutes, and since
> ASP.Net has about a 10-15 second startup cost, it means that seemingly
> random ASP.Net pages would have a 10-15 second delay if the application
pool
> containing the worker process is accessed infrequently.
>
> Also, are you running in IIS6 native worker process mode or in IIS5
> compatibility mode.
>
> --
> //David
> IIS
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> //
> "peter x" <lad4bear@boltblue.com> wrote in message
> news:bvg2b1$lf5$1@news.boltblue.com...
> Hi David, thanks for your reply.
>
> Would be good to clarify things with you a little though. If I was to run
> the script you provided would the performance be consistantly poor? For
the
> most part, each page loads in under a second but every 10 minutes or so
one
> page will take an excessively long time to load. The choice of page seems
to
> be arbitary so I'm unsure where to start looking. We use a single xsl
> transformation to create the html, and only have one response.write
> statement at the very end but we don't flush it - is this important?
>
> Look forward to hearing from you again :)
>
> Take care, Peter
>
>
>
> "David Wang [Msft]" <someone@online.microsoft.com> wrote in message
> news:eVHeU655DHA.1020@tk2msftngp13.phx.gbl...
> > Is this page being "cached" ? It sounds like it's cached and
periodically
> > purged, and the page is expensive (15sec) to generate.
> >
> >
> > We are aware of a performance issue with IIS6 and scripts that were not
> > written to be performant (like ASP, PHP, Perl, etc).
> >
> > It usually happens when you use a loop construct that is intensively
> > printing out something line-by-line. Basically, what's happening is
that
> > the script is forcing IIS to directly write to the network every single
> line
> > in *individual* network packets instead of buffering them -- which ends
up
> > wasting a huge amount of network bandwidth. A common cause of this is
an
> > application looping through a database table and printing out hundreds
of
> > rows of info.
> >
> > Basically, the problems always been there within the script code; the
> > question is how the web server deals with it.
> >
> > The following ASP will take a long time to complete, if ever, on IIS6.
If
> > you sniff the network, you will see 100,000 packets with a single 'A' as
> the
> > data -- a 99.9% bandwidth waste.
> >
> > <%
> > Response.Buffer = true
> >
> > Response.Write ( "Start: " & Now & "<BR>" )
> >
> > FOR i = 1 TO 100000
> > Response.Write( "A" )
> > Response.Flush()
> > NEXT
> >
> > Response.Write ( "<BR>Stop: " & Now & "<BR>" )
> > %>
> >
> >
> > The interesting thing, of course, is that IIS6 is actually doing what
you
> > told it to do -- literally -- instead of guessing what you are trying to
> do.
> > Prior IIS versions had buffering implemented at the Winsock layer, so it
> > wasn't actually doing what you were telling it to do...
> >
> >
> > --
> > //David
> > IIS
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > //
> > "Peter" <lad4bear@hotmail.com> wrote in message
> > news:ed9b1810.0401301213.4937eec7@posting.google.com...
> > Hi there,
> >
> > We've developed an application that reads xml from a database and
> > converts it to html using xslt. It works fine most of the time but the
> > users are experiencing a problem. Periodically, a single page can take
> > as long as 15 seconds to load and then everything will speed up again
> > and will work fine for a while before doing the same thing again.
> >
> > At first i thought that maybe memory was leaking and that the process
> > was being recycled and the page recompiled but there is nothing in the
> > system logs to suggest this and the w3wp.exe process id remains the
> > same.
> >
> > Because of the nature of the system I cannot provide configuration
> > info etc but advice about how to identify the problem would be very
> > helpful indeed. Take care and thank you for taking the time to read
> > this message.
> >
> > Hugs, Peter
> >
> >
>
>
>




Re: iis 6.0 / asp.net application / slows down periodically by peter

peter
Mon Feb 02 16:51:14 CST 2004

Hi David,

I tried what you said and no joy. Looks like its not a code issue or if it
is, its happening somewhere which isn't obvious. The JiT angle is
interesting though. How would I go about checking this. I've used Perfmon to
see if the JiT counters highlight any anomolies. Is there another way?

Again, thankyou for trying to help. Any and all ideas are appreciated - this
problem is really really beginning to bug me! :)

Take care, Peter

"David Wang [Msft]" <someone@online.microsoft.com> wrote in message
news:eNr4x2W6DHA.2404@TK2MSFTNGP12.phx.gbl...
> Recycling with the same PID is possible but not likely -- the PID is
> controlled by Windows when a new process is created.
>
> In-page timing would only say the code tooks a second to run -- it doesn't
> say whether IIS took 1 second to both receive the request and send the
> response but CLR took 10 seconds to JIT the page prior to ASP.Net running
it
> in 1 seconds...
>
> I don't really have anything more to offer. My suspicion is that your
10-15
> second slowdown corresponds with some JIT activity -- what's triggering
> that, I don't know. Process recycling is one way to cause that, and to
> eliminate it as a cause, you can try turning off all the IIS6 health
> monitoring features for the AppPool and turn off Pinging -- IIS6 should
not
> recycle any processes anymore.
>
> If this stops the 10-15 second slowdown, you will need to evaluate what
code
> you're running which triggers the process recycling (should be easy
process
> of elimination), and then decide whether you're going to fix your code or
> tune your IIS settings.
>
> --
> //David
> IIS
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> //
> "peter x" <lad4bear@boltblue.com> wrote in message
> news:bvio7l$7po$1@news.boltblue.com...
> I have implemented in-page timing and the everything completes in about a
> second. In fact I'm very impressed with the speed. :)
>
> IIS 6.0 is running in native worker process mode and has its own
application
> pool. The application pool has the default setting apart from the fact
that
> it is set to recycle when the virtual memory usage reaches 500MB. I
figured
> it was worth a shot :) If I remember correctly I have increased the idle
> time-out to 30 minutes but it happens whenever I am idle or not. I checked
> the process before and after the the slow page and its the same. Is it
> possible for the w3wp.exe process to recycle with the same process id? I
do
> not find any record of a recycle in the event logs. I've run out of ideas
> and now I don't know what to do next. Any suggestions?
>
> Cheers, Peter
>
> "David Wang [Msft]" <someone@online.microsoft.com> wrote in message
> news:eIM8GiF6DHA.2168@TK2MSFTNGP12.phx.gbl...
> > The script I provided would be poor performance 100% of the time. Based
> on
> > your description, I do not think that issue is affecting you.
> >
> > I think you may want to try to instrument some of these pages with
> > transforms to see whether it's:
> > 1. the transform that takes a long time every once in a while
> > 2. the request handling that takes a long time
> > 3. the response writing that takes a long time
> >
> > Are you sure that the w3wp process did not recycle. For example,
default
> > configuration would idle-timeout a worker process in 15 minutes, and
since
> > ASP.Net has about a 10-15 second startup cost, it means that seemingly
> > random ASP.Net pages would have a 10-15 second delay if the application
> pool
> > containing the worker process is accessed infrequently.
> >
> > Also, are you running in IIS6 native worker process mode or in IIS5
> > compatibility mode.
> >
> > --
> > //David
> > IIS
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > //
> > "peter x" <lad4bear@boltblue.com> wrote in message
> > news:bvg2b1$lf5$1@news.boltblue.com...
> > Hi David, thanks for your reply.
> >
> > Would be good to clarify things with you a little though. If I was to
run
> > the script you provided would the performance be consistantly poor? For
> the
> > most part, each page loads in under a second but every 10 minutes or so
> one
> > page will take an excessively long time to load. The choice of page
seems
> to
> > be arbitary so I'm unsure where to start looking. We use a single xsl
> > transformation to create the html, and only have one response.write
> > statement at the very end but we don't flush it - is this important?
> >
> > Look forward to hearing from you again :)
> >
> > Take care, Peter
> >
> >
> >
> > "David Wang [Msft]" <someone@online.microsoft.com> wrote in message
> > news:eVHeU655DHA.1020@tk2msftngp13.phx.gbl...
> > > Is this page being "cached" ? It sounds like it's cached and
> periodically
> > > purged, and the page is expensive (15sec) to generate.
> > >
> > >
> > > We are aware of a performance issue with IIS6 and scripts that were
not
> > > written to be performant (like ASP, PHP, Perl, etc).
> > >
> > > It usually happens when you use a loop construct that is intensively
> > > printing out something line-by-line. Basically, what's happening is
> that
> > > the script is forcing IIS to directly write to the network every
single
> > line
> > > in *individual* network packets instead of buffering them -- which
ends
> up
> > > wasting a huge amount of network bandwidth. A common cause of this is
> an
> > > application looping through a database table and printing out hundreds
> of
> > > rows of info.
> > >
> > > Basically, the problems always been there within the script code; the
> > > question is how the web server deals with it.
> > >
> > > The following ASP will take a long time to complete, if ever, on IIS6.
> If
> > > you sniff the network, you will see 100,000 packets with a single 'A'
as
> > the
> > > data -- a 99.9% bandwidth waste.
> > >
> > > <%
> > > Response.Buffer = true
> > >
> > > Response.Write ( "Start: " & Now & "<BR>" )
> > >
> > > FOR i = 1 TO 100000
> > > Response.Write( "A" )
> > > Response.Flush()
> > > NEXT
> > >
> > > Response.Write ( "<BR>Stop: " & Now & "<BR>" )
> > > %>
> > >
> > >
> > > The interesting thing, of course, is that IIS6 is actually doing what
> you
> > > told it to do -- literally -- instead of guessing what you are trying
to
> > do.
> > > Prior IIS versions had buffering implemented at the Winsock layer, so
it
> > > wasn't actually doing what you were telling it to do...
> > >
> > >
> > > --
> > > //David
> > > IIS
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > //
> > > "Peter" <lad4bear@hotmail.com> wrote in message
> > > news:ed9b1810.0401301213.4937eec7@posting.google.com...
> > > Hi there,
> > >
> > > We've developed an application that reads xml from a database and
> > > converts it to html using xslt. It works fine most of the time but the
> > > users are experiencing a problem. Periodically, a single page can take
> > > as long as 15 seconds to load and then everything will speed up again
> > > and will work fine for a while before doing the same thing again.
> > >
> > > At first i thought that maybe memory was leaking and that the process
> > > was being recycled and the page recompiled but there is nothing in the
> > > system logs to suggest this and the w3wp.exe process id remains the
> > > same.
> > >
> > > Because of the nature of the system I cannot provide configuration
> > > info etc but advice about how to identify the problem would be very
> > > helpful indeed. Take care and thank you for taking the time to read
> > > this message.
> > >
> > > Hugs, Peter
> > >
> > >
> >
> >
> >
>
>
>



Re: iis 6.0 / asp.net application / slows down periodically by David

David
Mon Feb 02 19:54:52 CST 2004

Maybe you have some .Net code that is manually starting Garbage Collection??

Well, if it doesn't look like the process is recycling but there is some
slowdown, you want to start looking at .Net, and I really don't have
anything more to add there.

You can try: microsoft.public.dotnet.framework.aspnet or www.asp.net
forums.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"peter x" <lad4bear@boltblue.com> wrote in message
news:bvmk5j$7v5$1@news.boltblue.com...
Hi David,

I tried what you said and no joy. Looks like its not a code issue or if it
is, its happening somewhere which isn't obvious. The JiT angle is
interesting though. How would I go about checking this. I've used Perfmon to
see if the JiT counters highlight any anomolies. Is there another way?

Again, thankyou for trying to help. Any and all ideas are appreciated - this
problem is really really beginning to bug me! :)

Take care, Peter

"David Wang [Msft]" <someone@online.microsoft.com> wrote in message
news:eNr4x2W6DHA.2404@TK2MSFTNGP12.phx.gbl...
> Recycling with the same PID is possible but not likely -- the PID is
> controlled by Windows when a new process is created.
>
> In-page timing would only say the code tooks a second to run -- it doesn't
> say whether IIS took 1 second to both receive the request and send the
> response but CLR took 10 seconds to JIT the page prior to ASP.Net running
it
> in 1 seconds...
>
> I don't really have anything more to offer. My suspicion is that your
10-15
> second slowdown corresponds with some JIT activity -- what's triggering
> that, I don't know. Process recycling is one way to cause that, and to
> eliminate it as a cause, you can try turning off all the IIS6 health
> monitoring features for the AppPool and turn off Pinging -- IIS6 should
not
> recycle any processes anymore.
>
> If this stops the 10-15 second slowdown, you will need to evaluate what
code
> you're running which triggers the process recycling (should be easy
process
> of elimination), and then decide whether you're going to fix your code or
> tune your IIS settings.
>
> --
> //David
> IIS
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> //
> "peter x" <lad4bear@boltblue.com> wrote in message
> news:bvio7l$7po$1@news.boltblue.com...
> I have implemented in-page timing and the everything completes in about a
> second. In fact I'm very impressed with the speed. :)
>
> IIS 6.0 is running in native worker process mode and has its own
application
> pool. The application pool has the default setting apart from the fact
that
> it is set to recycle when the virtual memory usage reaches 500MB. I
figured
> it was worth a shot :) If I remember correctly I have increased the idle
> time-out to 30 minutes but it happens whenever I am idle or not. I checked
> the process before and after the the slow page and its the same. Is it
> possible for the w3wp.exe process to recycle with the same process id? I
do
> not find any record of a recycle in the event logs. I've run out of ideas
> and now I don't know what to do next. Any suggestions?
>
> Cheers, Peter
>
> "David Wang [Msft]" <someone@online.microsoft.com> wrote in message
> news:eIM8GiF6DHA.2168@TK2MSFTNGP12.phx.gbl...
> > The script I provided would be poor performance 100% of the time. Based
> on
> > your description, I do not think that issue is affecting you.
> >
> > I think you may want to try to instrument some of these pages with
> > transforms to see whether it's:
> > 1. the transform that takes a long time every once in a while
> > 2. the request handling that takes a long time
> > 3. the response writing that takes a long time
> >
> > Are you sure that the w3wp process did not recycle. For example,
default
> > configuration would idle-timeout a worker process in 15 minutes, and
since
> > ASP.Net has about a 10-15 second startup cost, it means that seemingly
> > random ASP.Net pages would have a 10-15 second delay if the application
> pool
> > containing the worker process is accessed infrequently.
> >
> > Also, are you running in IIS6 native worker process mode or in IIS5
> > compatibility mode.
> >
> > --
> > //David
> > IIS
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > //
> > "peter x" <lad4bear@boltblue.com> wrote in message
> > news:bvg2b1$lf5$1@news.boltblue.com...
> > Hi David, thanks for your reply.
> >
> > Would be good to clarify things with you a little though. If I was to
run
> > the script you provided would the performance be consistantly poor? For
> the
> > most part, each page loads in under a second but every 10 minutes or so
> one
> > page will take an excessively long time to load. The choice of page
seems
> to
> > be arbitary so I'm unsure where to start looking. We use a single xsl
> > transformation to create the html, and only have one response.write
> > statement at the very end but we don't flush it - is this important?
> >
> > Look forward to hearing from you again :)
> >
> > Take care, Peter
> >
> >
> >
> > "David Wang [Msft]" <someone@online.microsoft.com> wrote in message
> > news:eVHeU655DHA.1020@tk2msftngp13.phx.gbl...
> > > Is this page being "cached" ? It sounds like it's cached and
> periodically
> > > purged, and the page is expensive (15sec) to generate.
> > >
> > >
> > > We are aware of a performance issue with IIS6 and scripts that were
not
> > > written to be performant (like ASP, PHP, Perl, etc).
> > >
> > > It usually happens when you use a loop construct that is intensively
> > > printing out something line-by-line. Basically, what's happening is
> that
> > > the script is forcing IIS to directly write to the network every
single
> > line
> > > in *individual* network packets instead of buffering them -- which
ends
> up
> > > wasting a huge amount of network bandwidth. A common cause of this is
> an
> > > application looping through a database table and printing out hundreds
> of
> > > rows of info.
> > >
> > > Basically, the problems always been there within the script code; the
> > > question is how the web server deals with it.
> > >
> > > The following ASP will take a long time to complete, if ever, on IIS6.
> If
> > > you sniff the network, you will see 100,000 packets with a single 'A'
as
> > the
> > > data -- a 99.9% bandwidth waste.
> > >
> > > <%
> > > Response.Buffer = true
> > >
> > > Response.Write ( "Start: " & Now & "<BR>" )
> > >
> > > FOR i = 1 TO 100000
> > > Response.Write( "A" )
> > > Response.Flush()
> > > NEXT
> > >
> > > Response.Write ( "<BR>Stop: " & Now & "<BR>" )
> > > %>
> > >
> > >
> > > The interesting thing, of course, is that IIS6 is actually doing what
> you
> > > told it to do -- literally -- instead of guessing what you are trying
to
> > do.
> > > Prior IIS versions had buffering implemented at the Winsock layer, so
it
> > > wasn't actually doing what you were telling it to do...
> > >
> > >
> > > --
> > > //David
> > > IIS
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > //
> > > "Peter" <lad4bear@hotmail.com> wrote in message
> > > news:ed9b1810.0401301213.4937eec7@posting.google.com...
> > > Hi there,
> > >
> > > We've developed an application that reads xml from a database and
> > > converts it to html using xslt. It works fine most of the time but the
> > > users are experiencing a problem. Periodically, a single page can take
> > > as long as 15 seconds to load and then everything will speed up again
> > > and will work fine for a while before doing the same thing again.
> > >
> > > At first i thought that maybe memory was leaking and that the process
> > > was being recycled and the page recompiled but there is nothing in the
> > > system logs to suggest this and the w3wp.exe process id remains the
> > > same.
> > >
> > > Because of the nature of the system I cannot provide configuration
> > > info etc but advice about how to identify the problem would be very
> > > helpful indeed. Take care and thank you for taking the time to read
> > > this message.
> > >
> > > Hugs, Peter
> > >
> > >
> >
> >
> >
>
>
>




Re: iis 6.0 / asp.net application / slows down periodically by peter

peter
Mon Feb 09 16:46:54 CST 2004

Have switched back to Advanced Server 2000 with IIS 5 and everything is
fine. Am so excited at the thought of going through testing again. Thank you
Microsoft, this is why we love you.

Peter


"David Wang [Msft]" <someone@online.microsoft.com> wrote in message
news:u4FdOyf6DHA.3860@tk2msftngp13.phx.gbl...
> Maybe you have some .Net code that is manually starting Garbage
Collection??
>
> Well, if it doesn't look like the process is recycling but there is some
> slowdown, you want to start looking at .Net, and I really don't have
> anything more to add there.
>
> You can try: microsoft.public.dotnet.framework.aspnet or www.asp.net
> forums.
>
> --
> //David
> IIS
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> //
> "peter x" <lad4bear@boltblue.com> wrote in message
> news:bvmk5j$7v5$1@news.boltblue.com...
> Hi David,
>
> I tried what you said and no joy. Looks like its not a code issue or if it
> is, its happening somewhere which isn't obvious. The JiT angle is
> interesting though. How would I go about checking this. I've used Perfmon
to
> see if the JiT counters highlight any anomolies. Is there another way?
>
> Again, thankyou for trying to help. Any and all ideas are appreciated -
this
> problem is really really beginning to bug me! :)
>
> Take care, Peter
>
> "David Wang [Msft]" <someone@online.microsoft.com> wrote in message
> news:eNr4x2W6DHA.2404@TK2MSFTNGP12.phx.gbl...
> > Recycling with the same PID is possible but not likely -- the PID is
> > controlled by Windows when a new process is created.
> >
> > In-page timing would only say the code tooks a second to run -- it
doesn't
> > say whether IIS took 1 second to both receive the request and send the
> > response but CLR took 10 seconds to JIT the page prior to ASP.Net
running
> it
> > in 1 seconds...
> >
> > I don't really have anything more to offer. My suspicion is that your
> 10-15
> > second slowdown corresponds with some JIT activity -- what's triggering
> > that, I don't know. Process recycling is one way to cause that, and to
> > eliminate it as a cause, you can try turning off all the IIS6 health
> > monitoring features for the AppPool and turn off Pinging -- IIS6 should
> not
> > recycle any processes anymore.
> >
> > If this stops the 10-15 second slowdown, you will need to evaluate what
> code
> > you're running which triggers the process recycling (should be easy
> process
> > of elimination), and then decide whether you're going to fix your code
or
> > tune your IIS settings.
> >
> > --
> > //David
> > IIS
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > //
> > "peter x" <lad4bear@boltblue.com> wrote in message
> > news:bvio7l$7po$1@news.boltblue.com...
> > I have implemented in-page timing and the everything completes in about
a
> > second. In fact I'm very impressed with the speed. :)
> >
> > IIS 6.0 is running in native worker process mode and has its own
> application
> > pool. The application pool has the default setting apart from the fact
> that
> > it is set to recycle when the virtual memory usage reaches 500MB. I
> figured
> > it was worth a shot :) If I remember correctly I have increased the idle
> > time-out to 30 minutes but it happens whenever I am idle or not. I
checked
> > the process before and after the the slow page and its the same. Is it
> > possible for the w3wp.exe process to recycle with the same process id? I
> do
> > not find any record of a recycle in the event logs. I've run out of
ideas
> > and now I don't know what to do next. Any suggestions?
> >
> > Cheers, Peter
> >
> > "David Wang [Msft]" <someone@online.microsoft.com> wrote in message
> > news:eIM8GiF6DHA.2168@TK2MSFTNGP12.phx.gbl...
> > > The script I provided would be poor performance 100% of the time.
Based
> > on
> > > your description, I do not think that issue is affecting you.
> > >
> > > I think you may want to try to instrument some of these pages with
> > > transforms to see whether it's:
> > > 1. the transform that takes a long time every once in a while
> > > 2. the request handling that takes a long time
> > > 3. the response writing that takes a long time
> > >
> > > Are you sure that the w3wp process did not recycle. For example,
> default
> > > configuration would idle-timeout a worker process in 15 minutes, and
> since
> > > ASP.Net has about a 10-15 second startup cost, it means that seemingly
> > > random ASP.Net pages would have a 10-15 second delay if the
application
> > pool
> > > containing the worker process is accessed infrequently.
> > >
> > > Also, are you running in IIS6 native worker process mode or in IIS5
> > > compatibility mode.
> > >
> > > --
> > > //David
> > > IIS
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > //
> > > "peter x" <lad4bear@boltblue.com> wrote in message
> > > news:bvg2b1$lf5$1@news.boltblue.com...
> > > Hi David, thanks for your reply.
> > >
> > > Would be good to clarify things with you a little though. If I was to
> run
> > > the script you provided would the performance be consistantly poor?
For
> > the
> > > most part, each page loads in under a second but every 10 minutes or
so
> > one
> > > page will take an excessively long time to load. The choice of page
> seems
> > to
> > > be arbitary so I'm unsure where to start looking. We use a single xsl
> > > transformation to create the html, and only have one response.write
> > > statement at the very end but we don't flush it - is this important?
> > >
> > > Look forward to hearing from you again :)
> > >
> > > Take care, Peter
> > >
> > >
> > >
> > > "David Wang [Msft]" <someone@online.microsoft.com> wrote in message
> > > news:eVHeU655DHA.1020@tk2msftngp13.phx.gbl...
> > > > Is this page being "cached" ? It sounds like it's cached and
> > periodically
> > > > purged, and the page is expensive (15sec) to generate.
> > > >
> > > >
> > > > We are aware of a performance issue with IIS6 and scripts that were
> not
> > > > written to be performant (like ASP, PHP, Perl, etc).
> > > >
> > > > It usually happens when you use a loop construct that is intensively
> > > > printing out something line-by-line. Basically, what's happening is
> > that
> > > > the script is forcing IIS to directly write to the network every
> single
> > > line
> > > > in *individual* network packets instead of buffering them -- which
> ends
> > up
> > > > wasting a huge amount of network bandwidth. A common cause of this
is
> > an
> > > > application looping through a database table and printing out
hundreds
> > of
> > > > rows of info.
> > > >
> > > > Basically, the problems always been there within the script code;
the
> > > > question is how the web server deals with it.
> > > >
> > > > The following ASP will take a long time to complete, if ever, on
IIS6.
> > If
> > > > you sniff the network, you will see 100,000 packets with a single
'A'
> as
> > > the
> > > > data -- a 99.9% bandwidth waste.
> > > >
> > > > <%
> > > > Response.Buffer = true
> > > >
> > > > Response.Write ( "Start: " & Now & "<BR>" )
> > > >
> > > > FOR i = 1 TO 100000
> > > > Response.Write( "A" )
> > > > Response.Flush()
> > > > NEXT
> > > >
> > > > Response.Write ( "<BR>Stop: " & Now & "<BR>" )
> > > > %>
> > > >
> > > >
> > > > The interesting thing, of course, is that IIS6 is actually doing
what
> > you
> > > > told it to do -- literally -- instead of guessing what you are
trying
> to
> > > do.
> > > > Prior IIS versions had buffering implemented at the Winsock layer,
so
> it
> > > > wasn't actually doing what you were telling it to do...
> > > >
> > > >
> > > > --
> > > > //David
> > > > IIS
> > > > This posting is provided "AS IS" with no warranties, and confers no
> > > rights.
> > > > //
> > > > "Peter" <lad4bear@hotmail.com> wrote in message
> > > > news:ed9b1810.0401301213.4937eec7@posting.google.com...
> > > > Hi there,
> > > >
> > > > We've developed an application that reads xml from a database and
> > > > converts it to html using xslt. It works fine most of the time but
the
> > > > users are experiencing a problem. Periodically, a single page can
take
> > > > as long as 15 seconds to load and then everything will speed up
again
> > > > and will work fine for a while before doing the same thing again.
> > > >
> > > > At first i thought that maybe memory was leaking and that the
process
> > > > was being recycled and the page recompiled but there is nothing in
the
> > > > system logs to suggest this and the w3wp.exe process id remains the
> > > > same.
> > > >
> > > > Because of the nature of the system I cannot provide configuration
> > > > info etc but advice about how to identify the problem would be very
> > > > helpful indeed. Take care and thank you for taking the time to read
> > > > this message.
> > > >
> > > > Hugs, Peter
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> >
>
>
>



Re: iis 6.0 / asp.net application / slows down periodically by David

David
Mon Feb 09 17:19:08 CST 2004

I still suspect your problem is with unintended recycling of CLR based on
some health-monitoring metrics, like the 15 minute idle timeout and 29hour
periodic recyling (or your 500MB memory limit recycling). IIS5 does not do
health-monitoring, so ASP.Net gets to control it with its own process model
and tends to not recycle anything and only take the CLR startup perf hit
once instead of repeatedly.

Running IIS6 in IIS5 Compatibility mode should yield similar results to
IIS5. You can make IIS6 Worker Process Isolation Mode act similarly to IIS5
in terms of health-monitoring to verify.

Regarding OS upgrades -- if there isn't a compulsory reason to upgrade, I
wouldn't bother. OS upgrade is always going to change things, especially
something like W2K to WS03 where security precautions were cranked up
several notches, and many can break code that worked on W2K. You just have
to balance the tradeoffs, make decisions, and realize t