Running in file mode will have quite a bit of overhead because you got a timer polling for incoming requests. The default timer tick is 200ms so your varience most likely comes from that (fractions thereof). Also running in debug mode is slower and you by default all logging and the server display are on by default. Performance can be improved a lot by turning those options off or running without a UI entirely - but some things like compiled code and COM compilation can't be done with the
COM operation removes the timer and requests are immediately picked up. In my tests on my fairly powerful laptop (I7 4 core) I get about 63 req/sec for a hello world type request with two instances with logging and UI turned on.
Microsoft Windows [Version 6.2.9200] (c) 2012 Microsoft Corporation. All rights reserved. c:\>ab -n200 -c10 http://localhost/wconnect/testpage.wwd This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient) Completed 100 requests Completed 200 requests Finished 200 requests Server Software: Microsoft-IIS/8.0 Server Hostname: localhost Server Port: 80 Document Path: /wconnect/testpage.wwd Document Length: 3877 bytes Concurrency Level: 10 Time taken for tests: 3.169 seconds Complete requests: 200 Failed requests: 0 Write errors: 0 Total transferred: 843181 bytes HTML transferred: 775400 bytes Requests per second: 63.10 [#/sec] (mean) Time per request: 158.471 [ms] (mean) Time per request: 15.847 [ms] (mean, across all concurrent requests) Transfer rate: 259.80 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.3 0 1 Processing: 9 143 476.1 26 3168 Waiting: 9 143 476.1 26 3168 Total: 9 143 476.2 26 3168 Percentage of the requests served within a certain time (ms) 50% 26 66% 34 75% 36 80% 38 90% 130 95% 726 98% 2828 99% 3031 100% 3168 (longest request)
I talk more about the test process here:
http://www.west-wind.com/weblog/posts/2012/Sep/04/ASPNET-Frameworks-and-Raw-Throughput-Performance
although that's strictly for ASP.NET, but the same thing applies and you can grab ab.exe out of the GIT repository.
The example is stock Web Connection so you can duplicate this setup for yourself (ie. the TEstPage.wwd). It's not quite a hello world type request as it reads a lot of the request data back. A true do-nothing request would probably double the throughput.
Actually there's one in the box:
c:\>ab -n200 -c10 http://localhost/wconnect/wc.wc?wwmaint~fasthit This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient) Completed 100 requests Completed 200 requests Finished 200 requests Server Software: Microsoft-IIS/8.0 Server Hostname: localhost Server Port: 80 Document Path: /wconnect/wc.wc?wwmaint~fasthit Document Length: 784 bytes Concurrency Level: 10 Time taken for tests: 0.507 seconds Complete requests: 200 Failed requests: 0 Write errors: 0 Total transferred: 220783 bytes HTML transferred: 156800 bytes Requests per second: 394.50 [#/sec] (mean) Time per request: 25.349 [ms] (mean) Time per request: 2.535 [ms] (mean, across all concurrent requests) Transfer rate: 425.29 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.3 0 1 Processing: 2 18 66.3 3 506 Waiting: 2 18 66.3 3 505 Total: 2 18 66.4 3 506 Percentage of the requests served within a certain time (ms) 50% 3 66% 4 75% 4 80% 4 90% 5 95% 103 98% 305 99% 405 100% 506 (longest request)
which actually bumps the throughput to almost 400 requests a second.
Remember the throughput and request time is not the limiting performance factor - the limiting factor is always the actual request processing and CPU load on the system (which FoxPro is not very good at balancing).
+++ Rick ---