Hi,
I found something strange in the tests that we are doing on our dlls concerning critical sections and CPU load.
Before we go on, I just want to make sure this is 'normal'. It seems strange...
As soon as I use critical section, the CPU goes directly to 100%. I know from more general tests (with more code) that CPU load is (very likely) one of the reasons that the amount of users that can be handled simulatious is low.
Configuration:
Server: NT4, SP6, IIS4
running a simple ASP page that creates an ActiveX object (VB ActiveX Dll, apartment-threaded).
The ActiveX is merely the web-interface for the PB Dll. It calls a function.
Test machine: NT4, SP6
running WCAT using 200 clients simulatious, no delay, 1.5 min.
Tests (description is info on PB Dll actions):
Test1: no LibMain, initialize vars
Test2: addition: add LibMain
Test3: addition: LibMain declares global critical section and initializes SQL Tools
Test4: addition: global array StmtNr() is added with function to fill it based on the incoming request.
Function is called: changes global data, so the critical section is used.
Results:
CPU Page results
Test1 2% 1600
Test2 2% 1600
Test3 3% 1600
Test4 100% 1600
The page results are the same but CPU maxes out for the full 1.5 minute. When adding more code, the test dlls using the critical section provide poorer results than the onces that don't use it (using the same code of course).
I this normal, or am I doing something wrong?
Hope someone can help.
Regards
Jeroen Brouwers
------------------
I found something strange in the tests that we are doing on our dlls concerning critical sections and CPU load.
Before we go on, I just want to make sure this is 'normal'. It seems strange...
As soon as I use critical section, the CPU goes directly to 100%. I know from more general tests (with more code) that CPU load is (very likely) one of the reasons that the amount of users that can be handled simulatious is low.
Configuration:
Server: NT4, SP6, IIS4
running a simple ASP page that creates an ActiveX object (VB ActiveX Dll, apartment-threaded).
The ActiveX is merely the web-interface for the PB Dll. It calls a function.
Test machine: NT4, SP6
running WCAT using 200 clients simulatious, no delay, 1.5 min.
Tests (description is info on PB Dll actions):
Test1: no LibMain, initialize vars
Test2: addition: add LibMain
Test3: addition: LibMain declares global critical section and initializes SQL Tools
Test4: addition: global array StmtNr() is added with function to fill it based on the incoming request.
Function is called: changes global data, so the critical section is used.
Results:
CPU Page results
Test1 2% 1600
Test2 2% 1600
Test3 3% 1600
Test4 100% 1600
The page results are the same but CPU maxes out for the full 1.5 minute. When adding more code, the test dlls using the critical section provide poorer results than the onces that don't use it (using the same code of course).
I this normal, or am I doing something wrong?
Hope someone can help.
Regards
Jeroen Brouwers
------------------
Comment