Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

IIS State - help appreciated

 
   Web Hosting Problem Solving Community! (Home) -> IIS RSS
Next:  URGENT: IIS and ASP.Net  
Author Message
ms_groups1

External


Since: Mar 03, 2004
Posts: 16



(Msg. 1) Posted: Sun Apr 04, 2004 12:08 am
Post subject: IIS State - help appreciated
Archived from groups: microsoft>public>inetserver>iis (more info?)

Dear All,

I've got three web servers, all running IIS 4 on NT 4. I'm experiencing a
locking situation by the look of it where all servers go up to 60% average
CPU usage and stay there.

I've done a IISState on one of the servers and get the following (in order
of my interpretation) :

Thread ID: 47
System Thread ID: 185
Kernel Time: 0:0:5.875
User Time: 0:0:46.453
Thread Status: Thread is in a WAIT state.
Other information: Thread is waiting for a lock to be released. Looking for
lock owner.
Owning thread System ID: 1d4
Thread Type: ASP
Executing Page: Either ASP.dll is not being called on this thread or symbol
file not available. Unable to locate ASP page.
Continuing with other analysis.

# ChildEBP RetAddr
00 0364f7c4 77f6cfe2 ntdll!NtWaitForSingleObject+0xb
01 0364f834 77f67646 ntdll!RtlpWaitForCriticalSection+0xa5
02 0364f83c 77f64e24 ntdll!RtlEnterCriticalSection+0x46
03 0364f860 77b2102c ntdll!RtlFreeHeap+0x94
04 0364f870 653415ae ole32!CRetailMalloc_Free+0x17
05 0364f890 65341554 OLEAUT32!APP_DATA::FreeCachedMem+0x85
06 0364f8a0 653422e5 OLEAUT32!SysFreeString+0x57
07 0364f8b4 6b6010b3 OLEAUT32!VariantClear+0x72
WARNING: Stack unwind information not available. Following frames may be
wrong.
08 0364f8c8 6b601629 vbscript+0x10b3
09 01341c28 00000000 vbscript+0x1629


Several of these, all waiting on thread 1d4 - 1d4 is the following :

Thread ID: 29
System Thread ID: 1d4
Kernel Time: 0:0:4.359
User Time: 0:0:41.125
*** ERROR: Symbol file could not be found. Defaulted to export symbols for
vbscript.dll -
Thread Type: ASP
Executing Page: Either ASP.dll is not being called on this thread or symbol
file not available. Unable to locate ASP page.
Continuing with other analysis.

# ChildEBP RetAddr
00 01a5f9fc 77f65296 ntdll!RtlpInsertFreeBlock+0xdf
01 01a5fa3c 77f64e6f ntdll!RtlpDeCommitFreeBlock+0x2d4
02 01a5fa68 77b2102c ntdll!RtlFreeHeap+0xdf
03 01a5fa78 653415ae ole32!CRetailMalloc_Free+0x17
04 01a5fa98 65341554 OLEAUT32!APP_DATA::FreeCachedMem+0x85
05 01a5faa8 653422e5 OLEAUT32!SysFreeString+0x57
06 01a5fabc 6b6010b3 OLEAUT32!VariantClear+0x72
WARNING: Stack unwind information not available. Following frames may be
wrong.
07 01a5fad0 6b601629 vbscript+0x10b3
08 013147b0 00000000 vbscript+0x1629

Now to me that looks like a simple ASP page running through a VBScript - why
would it be causing all the others to wait for it to complete?

I can post the full IISState log if needs be, but it generally repeats the
above.

Any help appreciated.

Thanks,
Dan

 >> Stay informed about: IIS State - help appreciated 
Back to top
Login to vote
patfilot

External


Since: Aug 24, 2003
Posts: 1478



(Msg. 2) Posted: Sun Apr 04, 2004 12:08 am
Post subject: Re: IIS State - help appreciated [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

String concatenation. For every '+' and '&' vbscript allocates memory for a
new string and copies the old string + the additional string to the new
location, then free's the old locations. You can also do this if you have a
lot of variables declared on your pages (e.g. ADOVBS.inc).

So...You can get significantly better perf by:
1) minimizing the number of string concats
2) minimizing the use of unnecessary declares

Pat

"Dan" <ms_groups DeleteThis @crossdata.co.uk> wrote in message
news:OaMHDebGEHA.3064@tk2msftngp13.phx.gbl...
 > Dear All,
 >
 > I've got three web servers, all running IIS 4 on NT 4. I'm experiencing a
 > locking situation by the look of it where all servers go up to 60% average
 > CPU usage and stay there.
 >
 > I've done a IISState on one of the servers and get the following (in order
 > of my interpretation) :
 >
 > Thread ID: 47
 > System Thread ID: 185
 > Kernel Time: 0:0:5.875
 > User Time: 0:0:46.453
 > Thread Status: Thread is in a WAIT state.
 > Other information: Thread is waiting for a lock to be released. Looking
for
 > lock owner.
 > Owning thread System ID: 1d4
 > Thread Type: ASP
 > Executing Page: Either ASP.dll is not being called on this thread or
symbol
 > file not available. Unable to locate ASP page.
 > Continuing with other analysis.
 >
 > # ChildEBP RetAddr
 > 00 0364f7c4 77f6cfe2 ntdll!NtWaitForSingleObject+0xb
 > 01 0364f834 77f67646 ntdll!RtlpWaitForCriticalSection+0xa5
 > 02 0364f83c 77f64e24 ntdll!RtlEnterCriticalSection+0x46
 > 03 0364f860 77b2102c ntdll!RtlFreeHeap+0x94
 > 04 0364f870 653415ae ole32!CRetailMalloc_Free+0x17
 > 05 0364f890 65341554 OLEAUT32!APP_DATA::FreeCachedMem+0x85
 > 06 0364f8a0 653422e5 OLEAUT32!SysFreeString+0x57
 > 07 0364f8b4 6b6010b3 OLEAUT32!VariantClear+0x72
 > WARNING: Stack unwind information not available. Following frames may be
 > wrong.
 > 08 0364f8c8 6b601629 vbscript+0x10b3
 > 09 01341c28 00000000 vbscript+0x1629
 >
 >
 > Several of these, all waiting on thread 1d4 - 1d4 is the following :
 >
 > Thread ID: 29
 > System Thread ID: 1d4
 > Kernel Time: 0:0:4.359
 > User Time: 0:0:41.125
 > *** ERROR: Symbol file could not be found. Defaulted to export symbols
for
 > vbscript.dll -
 > Thread Type: ASP
 > Executing Page: Either ASP.dll is not being called on this thread or
symbol
 > file not available. Unable to locate ASP page.
 > Continuing with other analysis.
 >
 > # ChildEBP RetAddr
 > 00 01a5f9fc 77f65296 ntdll!RtlpInsertFreeBlock+0xdf
 > 01 01a5fa3c 77f64e6f ntdll!RtlpDeCommitFreeBlock+0x2d4
 > 02 01a5fa68 77b2102c ntdll!RtlFreeHeap+0xdf
 > 03 01a5fa78 653415ae ole32!CRetailMalloc_Free+0x17
 > 04 01a5fa98 65341554 OLEAUT32!APP_DATA::FreeCachedMem+0x85
 > 05 01a5faa8 653422e5 OLEAUT32!SysFreeString+0x57
 > 06 01a5fabc 6b6010b3 OLEAUT32!VariantClear+0x72
 > WARNING: Stack unwind information not available. Following frames may be
 > wrong.
 > 07 01a5fad0 6b601629 vbscript+0x10b3
 > 08 013147b0 00000000 vbscript+0x1629
 >
 > Now to me that looks like a simple ASP page running through a VBScript -
why
 > would it be causing all the others to wait for it to complete?
 >
 > I can post the full IISState log if needs be, but it generally repeats the
 > above.
 >
 > Any help appreciated.
 >
 > Thanks,
 > Dan
 >
 ><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: IIS State - help appreciated 
Back to top
Login to vote
user1580

External


Since: Apr 03, 2004
Posts: 367



(Msg. 3) Posted: Sun Apr 04, 2004 11:43 am
Post subject: Re: IIS State - help appreciated [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Pat [MSFT]" <patfilot RemoveThis @online.microsoft.com> wrote in message
news:%23Ol6f$cGEHA.3540@TK2MSFTNGP09.phx.gbl...
 > String concatenation. For every '+' and '&' vbscript allocates memory for
a
 > new string and copies the old string + the additional string to the new
 > location, then free's the old locations. You can also do this if you have
a
 > lot of variables declared on your pages (e.g. ADOVBS.inc).
 >
 > So...You can get significantly better perf by:
 > 1) minimizing the number of string concats


Indeed,

Response.Write "<td>"
Response.Write Field("price")
Response.Write "</td>"

is quicker than

Response.Write "<td>" + Field("price") + "</td>"

 > 2) minimizing the use of unnecessary declares


ADOVBS can be replaced by a metadata tag in global.asa. But I've never seen
performance difference.

 > Pat<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: IIS State - help appreciated 
Back to top
Login to vote
ms_groups1

External


Since: Mar 03, 2004
Posts: 16



(Msg. 4) Posted: Sun Apr 04, 2004 11:43 am
Post subject: Re: IIS State - help appreciated [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Egbert Nierop (MVP for IIS)" <egbert_nierop DeleteThis @nospam.invalid> wrote in
message news:uqALxMhGEHA.3032@TK2MSFTNGP09.phx.gbl...
  > > String concatenation. For every '+' and '&' vbscript allocates memory
for
 > a
  > > new string and copies the old string + the additional string to the new
  > > location, then free's the old locations. You can also do this if you
have
 > a
  > > lot of variables declared on your pages (e.g. ADOVBS.inc).
  > >
  > > So...You can get significantly better perf by:
  > > 1) minimizing the number of string concats

 > Indeed,

 > Response.Write "<td>"
 > Response.Write Field("price")
 >
 > is quicker than
 >
 > Response.Write "<td>" + Field("price") + "</td>"
 >
  > > 2) minimizing the use of unnecessary declares
 >
 >
 > ADOVBS can be replaced by a metadata tag in global.asa. But I've never
seen
 > performance difference.

Thanks Pat and Egbert - would you expect to see this behaviour as load
increases as opposed to all the time?

Also, why does it cause a lock - I can understand lots of concatenations
causing CPU and memory to go up, but why the lock?
I would have thought it would have just slowed down - the behaviour I'm
seeing is :
1) Start website
2) 0-10% CPU usage for approximately 30-60 seconds - if used in this time,
very fast response.
3) immediate jump to 60%+ with an iisstate result like I originally posted -
slow response - request queue grows like mad in perf. mon.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: IIS State - help appreciated 
Back to top
Login to vote
user1580

External


Since: Apr 03, 2004
Posts: 367



(Msg. 5) Posted: Sun Apr 04, 2004 1:42 pm
Post subject: Re: IIS State - help appreciated [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Dan" <ms_groups.TakeThisOut@crossdata.co.uk> wrote in message
news:u9mpHYhGEHA.3096@TK2MSFTNGP11.phx.gbl...
 >
 > "Egbert Nierop (MVP for IIS)" <egbert_nierop.TakeThisOut@nospam.invalid> wrote in
 > message news:uqALxMhGEHA.3032@TK2MSFTNGP09.phx.gbl...
 > seen
  > > performance difference.
 >
 > Thanks Pat and Egbert - would you expect to see this behaviour as load
 > increases as opposed to all the time?
 >
 > Also, why does it cause a lock - I can understand lots of concatenations
 > causing CPU and memory to go up, but why the lock?

This would happen *only* if you store VB6 com objects in the session or in
the application.
Also, it is possible that your SQL statements are badly optimized (regarding
indexes and so)...

What about above? Do you use any of them?

 > I would have thought it would have just slowed down - the behaviour I'm
 > seeing is :
 > 1) Start website
 > 2) 0-10% CPU usage for approximately 30-60 seconds - if used in this
time,
 > very fast response.
 > 3) immediate jump to 60%+ with an iisstate result like I originally
posted -
 > slow response - request queue grows like mad in perf. mon.

Typically happens with thread affinity loving COM objects...<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: IIS State - help appreciated 
Back to top
Login to vote
ms_groups1

External


Since: Mar 03, 2004
Posts: 16



(Msg. 6) Posted: Sun Apr 04, 2004 5:04 pm
Post subject: Re: IIS State - help appreciated [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Egbert Nierop (MVP for IIS)" <egbert_nierop.RemoveThis@nospam.invalid> wrote in
message news:OG9WKDiGEHA.2768@tk2msftngp13.phx.gbl...

 > This would happen *only* if you store VB6 com objects in the session or in
 > the application.
 > Also, it is possible that your SQL statements are badly optimized
(regarding
 > indexes and so)...

We are running a web class application - this week we changed the front end
to use ASP that talks to the web classes in step 4 of a process, where
previously web classes managed it all.

Prior to the change, the websites handled literally ten times the load
without problem - as soon as we changed to the ASP based solution I'm seeing
this behaviour.

A Webclass reference is created in the Application_OnStart, however it was
created before as well. Previous misbehaviour was the occasional crashing of
the IIS process, but never locking like this.

The SQL is something I'm looking at, however overall the columns are indexed
correctly and performance wise SQL seems fine - it's certainly not working
very hard when I monitor the SQL server.

That said, I had to increase the max. connection limit on teh SQL server as
soon as we changed to the ASP app - previously the web classes never created
as
many connections.

  > > 3) immediate jump to 60%+ with an iisstate result like I originally
 > posted -
  > > slow response - request queue grows like mad in perf. mon.
 >
 > Typically happens with thread affinity loving COM objects...

Which is a possibility, though in this case we now use the COM objects LESS
then we did before.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: IIS State - help appreciated 
Back to top
Login to vote
user1580

External


Since: Apr 03, 2004
Posts: 367



(Msg. 7) Posted: Mon Apr 05, 2004 2:18 am
Post subject: Re: IIS State - help appreciated [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Dan" <ms_groups.RemoveThis@crossdata.co.uk> wrote in message
news:OxmQ9VkGEHA.3724@TK2MSFTNGP11.phx.gbl...
 >
 > "Egbert Nierop (MVP for IIS)" <egbert_nierop.RemoveThis@nospam.invalid> wrote in
 > message news:OG9WKDiGEHA.2768@tk2msftngp13.phx.gbl...
 >
  > > This would happen *only* if you store VB6 com objects in the session or
in
  > > the application.
  > > Also, it is possible that your SQL statements are badly optimized
 > (regarding
  > > indexes and so)...
 >
 > We are running a web class application - this week we changed the front
end
 > to use ASP that talks to the web classes in step 4 of a process, where
 > previously web classes managed it all.

To my experience, one does not -talk- to webclasses. They are instanced per
ASP page, but writing code around it, is possibly giving problems.

 > Prior to the change, the websites handled literally ten times the load
 > without problem - as soon as we changed to the ASP based solution I'm
seeing
 > this behaviour.
 >
 > A Webclass reference is created in the Application_OnStart, however it was

A VB class, cannot be stored in the application, I hope you are talking of
the specific library provided by Microsoft that is stored in the
application?

 > created before as well. Previous misbehaviour was the occasional crashing
of
 > the IIS process, but never locking like this.

A webclass has no affinity, normally. It's the C++ written dispatcher, that
instances a VB class, and releases the VB class after the page has ran.

 > The SQL is something I'm looking at, however overall the columns are
indexed
 > correctly and performance wise SQL seems fine - it's certainly not working
 > very hard when I monitor the SQL server.
 >
 > That said, I had to increase the max. connection limit on teh SQL server
as
 > soon as we changed to the ASP app - previously the web classes never
created
 > as
 > many connections.

If something goes slow, it will not release a connection soon as well Smile
this sounds logically.

   > > > 3) immediate jump to 60%+ with an iisstate result like I originally
  > > posted -
   > > > slow response - request queue grows like mad in perf. mon.
  > >
  > > Typically happens with thread affinity loving COM objects...
 >
 > Which is a possibility, though in this case we now use the COM objects
LESS
 > then we did before.

It can be something very silly, such as opening too many connections (thus
ignoring connection/resource pooling), or passing a huge array by value...
If you look at the W3SVC logs, you can log the CPU ticks used per page, this
gives you an indication, of which page might be causing this.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: IIS State - help appreciated 
Back to top
Login to vote
ms_groups1

External


Since: Mar 03, 2004
Posts: 16



(Msg. 8) Posted: Mon Apr 05, 2004 10:49 pm
Post subject: Re: IIS State - help appreciated [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Dan" <ms_groups.RemoveThis@crossdata.co.uk> wrote in message
news:OaMHDebGEHA.3064@tk2msftngp13.phx.gbl...

<snip problems>

Yup - it was the string concatenation.

Changed most of the pages today and CPU usage went down to <10% Smile

Thanks to Pat and Egbert for their assistance.
 >> Stay informed about: IIS State - help appreciated 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]