> >- IIS - 6M/sec > >- Apache - 0.9M/sec > >- Apache with SendFile disabled in httpd.conf - 6M/sec > > > >which striked me as odd. > > Most odd :-) But I had another question... > > I have some concerns about the APR_XTHREAD files (those opened for > overlapped I/O) behaving correctly when we start to use those in normal > operation - had you verified that these are actually going to apr_sendfile, > or do you have intervening read/transforms going on due to mod_includes > or other scripts? But if that was the case, then changing the code for apr_sendfile() shouldn't 'fix' the issue, would it?
I've ran some tests: Client: 1.4GHz, Compaq NC7780 Gigabit (intel), Windows 2000 Server SP3 Server: 666MHz Pentium, BCM57xx Gigabit. Windows Server 2003, Enterprise edition. Apache: Server version: Apache/2.0.47 Server built: Jul 8 2003 22:02:11 ------------------------------------------------------------- Testfile: W2K4SP_EN.EXE, 135.477.136 bytes. Test1: Stock IIS and Stock Apache. Apache: 20:28:13 (2.71 MB/s) - `w2ksp4_en.exe.3' saved [135477136/135477136] IIS: 20:33:29 (18.67 MB/s) - `w2ksp4_en.exe.4' saved [135477136/135477136] Test2: Stock IIS, and Apache with libapr.dll from first proposed patch. IIS: 20:35:10 (18.67 MB/s) - `w2ksp4_en.exe.5' saved [135477136/135477136] Apache: 20:36:06 (17.05 MB/s) - `w2ksp4_en.exe.6' saved [135477136/135477136] Test3: Stock IIS, and Stock Apache with "EnableSendFile Off" in httpd.conf IIS: 20:39:48 (18.25 MB/s) - `w2ksp4_en.exe.7' saved [135477136/135477136] Apache: 20:40:14 (18.92 MB/s) - `w2ksp4_en.exe.8' saved [135477136/135477136] Test4: Apache, libapr.dll compiled from source (no changes) Apache: 20:44:31 (2.43 MB/s) - `w2ksp4_en.exe.9' saved [135477136/135477136] Test5: Apache, libapr.dll compiled from source - MAX_SEGMENT_SIZE changed to 1048576 Apache: 20:47:04 (36.11 MB/s) - `w2ksp4_en.exe.10' saved [135477136/135477136] Test6: Apache, libapr.dll compiled from source - MAX_SEGMENT_SIZE changed to 131072 Apache: 20:48:42 (23.29 MB/s) - `w2ksp4_en.exe.11' saved [135477136/135477136] Test7: Apache, libapr.dll compiled from source - MAX_SEGMENT_SIZE changed to 85535 Apache: 20:50:50 (13.56 MB/s) - `w2ksp4_en.exe.12' saved [135477136/135477136] Test8: Apache, libapr.dll compiled from source - MAX_SEGMENT_SIZE changed to 419304 IIS: 20:55:26 (19.14 MB/s) - `w2ksp4_en.exe.14' saved [135477136/135477136] Apache: 20:52:05 (40.14 MB/s) - `w2ksp4_en.exe.13' saved [135477136/135477136] Test9: Apache, libapr.dll compiled from source, MAX_SEGMENT_SIZE set to 65536, dwFlags to 0x10 (USE_SYSTEM_THREAD) Apache: 21:10:04 (2.01 MB/s) - `w2ksp4_en.exe.16' saved [135477136/135477136] Test10: Apache, libapr.dll compiled from source, MAX_SEGMENT_SIZE set to 65536, dwFlags to 0x20 (USE_KERNEL_APC) Apache: 21:13:24 (1.86 MB/s) - `w2ksp4_en.exe.17' saved [135477136/135477136] Test11: special written test program that doesnt stop sending. Segment size of 65536 a.exe: 3.87M/s Test12: special written test prorgram that doesnt stop sending. Segment size of 419304 a.exe: 33.86M/s ------------------------------------------------------------- ------------------------------------------------------------- Same tests but then with an Windows 2000 Advanced Server running in an VMware machine. Test13: Windows 2000 IIS and Apache 2.0.47 IIS: 21:53:51 (9.42 MB/s) - `sql2kdesksp3.exe' saved [72503896/72503896] Apache: 21:55:38 (8.94 MB/s) - `sql2kdesksp3.exe.2' saved [72503896/72503896] Test14: Windows 2000 IIS and Apache 2.0.47 with MAX_SEGMENT_SIZE set to 131072 Apache: 22:00:50 (8.72 MB/s) - `sql2kdesksp3.exe.4' saved [72503896/72503896] To make sure it's not something weird in Apache itself ive witten a quick hack that also uses TransmitFile() and emulates the code of using TransmitFile() in 65k chunks, and it gives the same problem, increasing the segment size to 4M also solves the problem in that test case, >From this test, simply doubling the MAX_SEGMENT_SIZE seems to 'fix' the problem, although if i remember correctly, some other tests of me seemed to proof otherwise. Unfortunately i dont have an 2000 Advanced Server on anything >10mbit at the moment that i can install software on, i will run some more tests when possible, Sincerely, Maarten Bekers.
