IIS 5 & IIS 6
ISAPI extesion loads cli/clr which forces threads affinity to the 1st...
Last post Apr 01, 2011 05:50 AM by oritalul
Mar 30, 2011 04:15 PM|oritalul|LINK
We have an IIS running on 4 CPUs machine (4 cores).
We wrote code in the IIS extension which creates several threads which are spread evenly on all the 4 CPUs.
These threads executes (among other things) code of a cli/clr dll after this code is executed all the threads are set to run on one core (the 1st one).
Do you know what might be the cause to this strange phenomenon? And this can be avoid?
Apr 01, 2011 05:50 AM|oritalul|LINK
I found the problem! There was a bug in the code!
There was a CStopwatch class I used to measure the application performence.
This class's c'tor set the thread affinity to the 1st processor + performed sleep, which caused all the application threads to run on one CPU and sleep most of the time...