iis >> Need help with 'possible' Context Switch Issue - on IIS6

by livin » Thu, 10 Nov 2005 04:45:43 GMT

I'm new to IIS (but very enterprise windows experienced) so please bear with
me...

Situation:
(4) IIS6 servers using WLBS
- running the same set of web sites (6 virtual sites per)
- same core code behind each site (only chages are the images - I know
there are better ways but I did not create the sites)

Using PerfMon (see info on 1 server below) I found that the context switches
jump direcly inline with the CPU hitting 100%...
this occurs constantly. I logged on 7 second intervals.

I logged all the IIS related process threads and it looks like all the
threads have the problem, different ones at different times, no noticable
pattern.

How can I isolate what process is causing the problem?

I was thinking of taking several IISstate logs but what should I focus it
on? I've never used IISstate, how do I know what processes to target?

Thank you in advance for the help!!!

info from one server:

CPU utilization
- spikes to 100% on a regular intervals, ave is under 2%
- this corresponds with user and kernel activity spiking at the same exact
times.
Pages per Second
- spikes to over 450 quite often, average is approx 1
Disk transfers/sec
- ave is 6 but it often spikes much higher and up to 125.
DPC (Deferred procedure calls)
- corresponding to CPU being maxed at the same times DPC occurs
Context Switches
- spikes on regular intervals, min is 194, ave is 276 and max up to 6524.
Processor Queue Length
- jumps from 0 to 30.






iis >> Need help with 'possible' Context Switch Issue - on IIS6

by David Wang [Msft] » Thu, 10 Nov 2005 05:19:53 GMT


Since you are running the same core code behind each site, I would start by
assuming that the context switch is triggered by something within the user
code that you are running on each site. Hence it reproduces itself across
various w3wp.exe because the same code is running and just images are
changed.

You will need to identify what sort of code is running on these websites
(CGI, ISAPI, ASP, ASP.Net, Perl, PHP, JSP, etc) because that may affect the
analysis options available.

Debuggers like IIS State is unlikely to help with the sort of analysis you
want to do. I know what tool we use to identify and analyze code doing
context switches, but I do not know if you have that tool or not. Doing a
quick search of microsoft.com shows that the tool is mentioned a few times
but not available for download.

FYI:
I know that from your perspective, you can only identify that there are
context switch issues and it looks to be within IIS processes -- hence you
say "possible" contexts witch issue on IIS6 -- but from my perspective, this
is most likely performance issues within user code running on the website so
it is really not an IIS issue. You just need to be able to point the finger
back at the site developers to fix their code.

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//

I'm new to IIS (but very enterprise windows experienced) so please bear with
me...

Situation:
(4) IIS6 servers using WLBS
- running the same set of web sites (6 virtual sites per)
- same core code behind each site (only chages are the images - I know
there are better ways but I did not create the sites)

Using PerfMon (see info on 1 server below) I found that the context switches
jump direcly inline with the CPU hitting 100%...
this occurs constantly. I logged on 7 second intervals.

I logged all the IIS related process threads and it looks like all the
threads have the problem, different ones at different times, no noticable
pattern.

How can I isolate what process is causing the problem?

I was thinking of taking several IISstate logs but what should I focus it
on? I've never used IISstate, how do I know what processes to target?

Thank you in advance for the help!!!

info from one server:

CPU utilization
- spikes to 100% on a regular intervals, ave is under 2%
- this corresponds with user and kernel activity spiking at the same exact
times.
Pages per Second
- spikes to over 450 quite often, average is approx 1
Disk transfers/sec
- ave is 6 but it often spikes much higher and up to 125.
DPC (Deferred procedure calls)
- corresponding to CPU being maxed at the same times DPC occurs
Context Switches
- spikes on regular intervals, min is 194, ave is 276 and max up to 6524.
Processor Queue Length
- jumps from 0 to 30.

Similar Threads

1. IIS6: troubleshooting context switches

I'm new to IIS so please bear with me...

Situation:
set of four servers (using WLBS) running the same set of web sites (about 6
sites on each)
same core code behind each site (only chages are the images - I know there
are better ways but I did not create the sites)

While doing some baselining (using perfmon) I found that the context
switches jump to heaven while direcly inline with the CPU hitting 100%...
this occurs constantly. I logged on 7 second intervals.

I logged all the threads and it looks like all the threads have the problem, 
at different time, no pattern is seen.

How can I isolate what process is causing the problem?

Will taking several random IISstate logs possibly find the issue? (I've 
never used IISstate).

thanks! 


2. iis6 sluggish / lots of context switches in wp and high thread count

3. i need help it is possible or not!!

Hi; 

I want to ask  you something very important for me .. 

how can i Create daynamic pages or static pages Automatic .??????????!!! 

i have a problem with my website i want Create page asp classic  to every member 
The page name equal the member name 

www.Micrsoft.com/Ashraf.asp 

If i have 3000 members in my website it's possible to generate  3000 pages for everymember Automatic and if it is possible how can i do this ?? 

my Tec. are ASp classic and java script .. 
thank you

4. Need help reviewing code please ASAP is possible - ASP

5. IIS6 Issued - Registry keys needed..

Hi,

I have a problem with my IIS not starting since i removed Project
Server. I've located the problem but need 4 registry keys from a
working server to fix it. I was hoping someone would be kind enough to
export them, zip them and put them online somewhere for me to download?

The keys I need are:

[HKEY_CLASSES_ROOT\Interface\{B196B284-BAB4-101A-B69C-00AA00341D07}]

[HKEY_CLASSES_ROOT\Interface\{B196B285-BAB4-101A-B69C-00AA00341D07}]

[HKEY_CLASSES_ROOT\Interface\{B196B286-BAB4-101A-B69C-00AA00341D07}]

[HKEY_CLASSES_ROOT\Interface\{B196B287-BAB4-101A-B69C-00AA00341D07}]


Any help would be great!

Thanks,
Adam

6. FrontPage, IIS 5, and Search Issues- More Help Needed

7. need help with ecommerce design issue

Hi everyone:

I have started an ecommerce application that involves allowing participants
being allowed to register and pay for games that they play online.  I have
proceeded on to the point where a cart can be created that allows for the
addition and removal of games that they select to play. I use a database to
keep track of state during the application as well as for the cart itself.
I have come to the point now where I have to handle checking out.  My design
calls for a url (used to hit the credit card handling institution) that
identifies the participant as well as the cost of the games being registered
for.  What I am not sure how to handle is coming up with a unique identifier
for the particular registration (could be for more than 1 game)
Presently, I have a table, gameRegistrations, that has a primary key called
gameRegId (an autonumber),  a field called playerId (used to uniquely
identify the registrant), and a field called gameId (used to uniquey
identify the game being registered for).  I am wondering  how I could
identify the whole batch of games that a player might be registering for. I
don't think that the url that I create should have a number representing
each game being registered for but rather one number or value that
represents that particular batch registration.
I have thought of using a timestamp to represent the particular batch
registration.

I would really appreciate it if anyone could suggest to me the best way to
handle the situation.  Perhaps, my idea is a good one. If that is case
please let me know.

P.S I am not using Session variables or a Global.asa file.

Thanks in advance

Terry


8. Security Issues - help needed please - ASP