T
Tony Proctor
Hi everyone
We're experiencing some serious anomalies with the scheduling of ASP
threads. I'd be interested to hear if anyone knows what algorithm is used
(e.g. simple round-robin, or something more sophisticated), and what
situations might perturb it. Even a hint as to what would be considered
normal scheduling might help.
The root of our problem is that we observed a normally well-behaved web
application suddenly limit itself to a single ASP thread. The application
consists mainly of a VB6 DLL instantiated via an ASP page. Note that the
application does not store STA objects in Session/Application, and normally
exhibits no thread affinities at all. The previous post asking for advice
about this is at:
http://www.google.ie/groups?safe=off&[email protected]&lr=lang_en&hl=en.
As that previous post says, we eventually found that the switch of all
incoming requests (irrespective of their Session ID) to a single ASP thread
occurred when one thread just happened to destroy a Collection of MSXML DOM
objects. Hah!, we thought, a bug in MSXML 3.0, probably connected with its
new free-threaded capability (which we don't use). We then created a much
cut-down version of our server application with a view to reporting it to
Microsoft. Unfortunately, the cut-down version didn't show the same results.
Interestingly, though, its ASP thread scheduling was markedly different from
that in our real application.
The problem has only been observed under IIS 6, and so it could well be an
IIS/ASP difference rather than the fault of MSXML. Running the same simple,
single-client (with an auto-refreshed HTML page at 1 sec intervals) test
against our 2 servers (the real one and the cut-down one), we observe the
following strange thread behaviour. Any explanations here would be very
welcome:
IIS 6 (configured with 20 ASP threads):
Real server:
All 20 threads used in perfect round-robin fashion, until one
destroys
a Collection of MSXML DOM objects. After that, all incoming
requests
are handed to this one thread (sometimes to a pair of threads if
they
happen to have cleared their Collections down at the same time)
Cut-down server:
One thread handles the initial request. All subsequent requests
oscillate
evenly between just 2 ASP threads
IIS 5 (configured with 20 ASP threads):
Real server:
All 20 threads are used. However, the first 8 are scheduled
sequentially.
After that it gets more and more random which ASP thread is
used. No
affinity every arises though.
Cut-down server:
Only 8 ASP threads are ever used, and these are scheduled in
perfect
round-robin fashion
I can't explain these observations as the 2 servers are handling the same
requests. There seems to be more involved than simple round-robin
scheduling. Hence, I though if I understood the algorithm better, I might
have a clue as to the initial problem we encountered (which is now being
considered serious)
Tony Proctor
We're experiencing some serious anomalies with the scheduling of ASP
threads. I'd be interested to hear if anyone knows what algorithm is used
(e.g. simple round-robin, or something more sophisticated), and what
situations might perturb it. Even a hint as to what would be considered
normal scheduling might help.
The root of our problem is that we observed a normally well-behaved web
application suddenly limit itself to a single ASP thread. The application
consists mainly of a VB6 DLL instantiated via an ASP page. Note that the
application does not store STA objects in Session/Application, and normally
exhibits no thread affinities at all. The previous post asking for advice
about this is at:
http://www.google.ie/groups?safe=off&[email protected]&lr=lang_en&hl=en.
As that previous post says, we eventually found that the switch of all
incoming requests (irrespective of their Session ID) to a single ASP thread
occurred when one thread just happened to destroy a Collection of MSXML DOM
objects. Hah!, we thought, a bug in MSXML 3.0, probably connected with its
new free-threaded capability (which we don't use). We then created a much
cut-down version of our server application with a view to reporting it to
Microsoft. Unfortunately, the cut-down version didn't show the same results.
Interestingly, though, its ASP thread scheduling was markedly different from
that in our real application.
The problem has only been observed under IIS 6, and so it could well be an
IIS/ASP difference rather than the fault of MSXML. Running the same simple,
single-client (with an auto-refreshed HTML page at 1 sec intervals) test
against our 2 servers (the real one and the cut-down one), we observe the
following strange thread behaviour. Any explanations here would be very
welcome:
IIS 6 (configured with 20 ASP threads):
Real server:
All 20 threads used in perfect round-robin fashion, until one
destroys
a Collection of MSXML DOM objects. After that, all incoming
requests
are handed to this one thread (sometimes to a pair of threads if
they
happen to have cleared their Collections down at the same time)
Cut-down server:
One thread handles the initial request. All subsequent requests
oscillate
evenly between just 2 ASP threads
IIS 5 (configured with 20 ASP threads):
Real server:
All 20 threads are used. However, the first 8 are scheduled
sequentially.
After that it gets more and more random which ASP thread is
used. No
affinity every arises though.
Cut-down server:
Only 8 ASP threads are ever used, and these are scheduled in
perfect
round-robin fashion
I can't explain these observations as the 2 servers are handling the same
requests. There seems to be more involved than simple round-robin
scheduling. Hence, I though if I understood the algorithm better, I might
have a clue as to the initial problem we encountered (which is now being
considered serious)
Tony Proctor