>It looks like the changes doubled your performance.. not bad for 2 lines > :-)
Yes :-) >Also.. if you want to get a bit faster try preloading the >/usr/lib/libmtmalloc.so library. >also.. have you compared perchild to worker ? (yes I know perchild isn't >finished..I'm just curious) Linked with libmtmalloc, and tested again (as below). Tsuyoshi SASAMOTO [EMAIL PROTECTED] ---------------------------------------------------------------------- Result of ab -c128 -n8192 127.0.0.1:3080/ ----[T1 perchild]----------------------------------------------------- This is ApacheBench, Version 2.0.37-dev <$Revision: 1.105 $> apache-2.0 : : Server Software: Apache/2.0.39 Server Hostname: 127.0.0.1 Server Port: 3080 Document Path: / Document Length: 1630 bytes Concurrency Level: 128 Time taken for tests: 16.129322 seconds Complete requests: 8192 Failed requests: 0 Write errors: 0 Total transferred: 15851520 bytes HTML transferred: 13352960 bytes Requests per second: 507.89 [#/sec] (mean) Time per request: 252.021 [ms] (mean) Time per request: 1.969 [ms] (mean, across all concurrent requests) Transfer rate: 959.74 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 2.6 0 175 Processing: 28 249 46.2 247 741 Waiting: 1 130 71.7 129 537 Total: 28 249 46.3 247 741 Percentage of the requests served within a certain time (ms) 50% 247 66% 248 75% 249 80% 249 90% 264 95% 311 98% 408 99% 444 100% 741 (longest request) ----[T2 perchild]----------------------------------------------------- This is ApacheBench, Version 2.0.37-dev <$Revision: 1.105 $> apache-2.0 : : Server Software: Apache/2.0.39 Server Hostname: 127.0.0.1 Server Port: 3080 Document Path: / Document Length: 1630 bytes Concurrency Level: 128 Time taken for tests: 22.792954 seconds Complete requests: 8192 Failed requests: 0 Write errors: 0 Total transferred: 15851520 bytes HTML transferred: 13352960 bytes Requests per second: 359.41 [#/sec] (mean) Time per request: 356.140 [ms] (mean) Time per request: 2.782 [ms] (mean, across all concurrent requests) Transfer rate: 679.16 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 1.9 1 117 Processing: 57 351 84.0 349 1277 Waiting: 3 185 102.9 188 1174 Total: 57 352 84.0 350 1278 Percentage of the requests served within a certain time (ms) 50% 350 66% 394 75% 401 80% 403 90% 413 95% 459 98% 555 99% 609 100% 1278 (longest request) ----[T1 worker]------------------------------------------------------- This is ApacheBench, Version 2.0.37-dev <$Revision: 1.105 $> apache-2.0 : : Server Software: Apache/2.0.39 Server Hostname: 127.0.0.1 Server Port: 3080 Document Path: / Document Length: 1630 bytes Concurrency Level: 128 Time taken for tests: 18.109316 seconds Complete requests: 8192 Failed requests: 0 Write errors: 0 Total transferred: 15851520 bytes HTML transferred: 13352960 bytes Requests per second: 452.36 [#/sec] (mean) Time per request: 282.958 [ms] (mean) Time per request: 2.211 [ms] (mean, across all concurrent requests) Transfer rate: 854.81 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.9 0 50 Processing: 25 280 42.6 275 747 Waiting: 3 144 83.8 143 676 Total: 26 280 42.7 275 747 Percentage of the requests served within a certain time (ms) 50% 275 66% 280 75% 281 80% 282 90% 308 95% 370 98% 407 99% 466 100% 747 (longest request) ----[T2 worker]------------------------------------------------------- This is ApacheBench, Version 2.0.37-dev <$Revision: 1.105 $> apache-2.0 : : Server Software: Apache/2.0.39 Server Hostname: 127.0.0.1 Server Port: 3080 Document Path: / Document Length: 1630 bytes Concurrency Level: 128 Time taken for tests: 14.78003 seconds Complete requests: 8192 Failed requests: 0 Write errors: 0 Total transferred: 15851520 bytes HTML transferred: 13352960 bytes Requests per second: 581.90 [#/sec] (mean) Time per request: 219.969 [ms] (mean) Time per request: 1.719 [ms] (mean, across all concurrent requests) Transfer rate: 1099.59 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.8 0 67 Processing: 24 217 21.0 221 295 Waiting: 3 116 61.8 121 291 Total: 24 217 20.9 221 295 Percentage of the requests served within a certain time (ms) 50% 221 66% 221 75% 221 80% 222 90% 223 95% 242 98% 263 99% 294 100% 295 (longest request) ---------------------------------------------------------------------- Result of truss -cf -p (pids of the httpd processes) & \ ab -c128 -n768 127.0.0.1:3080/ >&/dev/null; \ pkill -u $user -x truss ----[T1 perchild]----------------------------------------------------- syscall seconds calls errors read .32 1535 write .16 768 close .29 1534 times .19 768 fcntl .29 1536 sendfilev64 .30 768 poll .40 1546 waitid .00 11 mmap .00 12 mprotect .00 96 lwp_sema_wait .13 443 lwp_sema_post .13 443 gettimeofday .85 4811 lwp_self .03 102 lwp_mutex_wakeup .09 653 lwp_mutex_lock .26 1368 lwp_cond_wait .04 152 lwp_cond_signal .04 152 stat64 .46 1536 fstat64 .29 1536 open64 .29 1536 768 accept .25 768 shutdown .29 767 getsockname .20 768 getsockopt .28 1536 setsockopt .12 768 lwp_mutex_unlock .13 768 ------- ------ ---- sys totals: 5.83 26681 768 usr time: .67 elapsed: 11.11 ----[T2 perchild]----------------------------------------------------- syscall seconds calls errors read .30 1534 write .10 768 close .24 1532 times .16 768 fcntl .28 1536 lwp_park .03 437 lwp_unpark .09 437 sendfilev64 .21 768 poll .27 1544 sigprocmask .01 158 waitid .00 9 mmap .02 90 munmap .02 89 yield .00 62 gettimeofday .82 4924 lwp_create .06 318 lwp_exit .01 158 lwp_continue .05 159 lwp_kill .05 158 158 lwp_mutex_lock .11 768 lwp_schedctl .10 159 stat64 .32 1536 fstat64 .20 1536 open64 .35 1536 768 accept .30 768 shutdown .17 767 getsockname .14 768 getsockopt .29 1536 setsockopt .16 768 lwp_mutex_unlock .12 768 ------- ------ ---- sys totals: 4.98 26359 926 usr time: .73 elapsed: 9.17 ----[T1 worker]------------------------------------------------------- signals ------------ SIGHUP 1 SIGTERM 1 total: 2 syscall seconds calls errors _exit .00 1 read .24 1536 write .18 769 close .18 1538 time .00 4 brk .03 96 getpid .00 13 getuid .00 8 kill .00 1 times .11 768 sysi86 .03 131 fcntl .19 1536 sendfilev64 .20 768 poll .16 1543 1 sigprocmask .00 7 sigaction .00 48 setcontext .00 2 waitid .00 6 mmap .02 143 mprotect .05 255 munmap .00 54 fork1 .00 4 lwp_sema_wait .11 760 lwp_sema_post .13 760 gettimeofday .76 4932 lwp_create .03 262 lwp_continue .00 127 lwp_kill .00 1 lwp_self .02 112 lwp_mutex_wakeup .06 1124 lwp_mutex_lock .28 1804 lwp_cond_wait .00 25 lwp_cond_signal .00 19 llseek .00 2 door_create .00 4 door_info .00 4 lwp_schedctl .04 135 4 signotifywait .02 134 lwp_sigredirect .05 134 stat64 .33 1536 fstat64 .16 1536 open64 .34 1536 768 accept .17 768 shutdown .14 767 getsockname .10 768 getsockopt .25 1536 setsockopt .13 768 lwp_mutex_unlock .03 769 ------- ------ ---- sys totals: 4.54 29554 773 usr time: .64 elapsed: 7.97 ----[T2 worker]------------------------------------------------------- signals ------------ SIGHUP 3 SIGTERM 2 total: 5 syscall seconds calls errors _exit .00 2 read .32 1537 write .24 770 close .47 1534 time .00 4 brk .04 94 getpid .00 12 getuid .00 8 kill .00 2 times .16 768 sysi86 .01 108 fcntl .29 1536 lwp_park .24 814 lwp_unpark .09 819 sendfilev64 .42 769 1 poll .29 1548 3 sigprocmask .02 90 sigaction .01 12 getcontext .00 4 setcontext .00 5 waitid .00 10 mmap .04 118 munmap .01 34 sysconfig .00 4 fork1 .00 4 yield .00 6 gettimeofday 1.34 4982 lwp_create .02 216 lwp_exit .00 56 lwp_continue .02 108 lwp_kill .00 44 38 lwp_wait .00 54 lwp_mutex_lock .19 773 1 llseek .00 4 lwp_schedctl .01 116 stat64 .47 1536 fstat64 .31 1536 open64 .52 1536 768 accept .33 768 shutdown .21 767 getsockname .11 768 getsockopt .48 1536 setsockopt .18 768 lwp_mutex_unlock .15 770 ------- ------ ---- sys totals: 6.99 26950 811 usr time: .64 elapsed: 11.28 ----------------------------------------------------------------------