ngmoco/falcore — pull request #8 by gnanderson (2012-04-19 09:55:46+00:00)
Title: Expose sendfile kernel copying for Linux, OS X, FreeBSD

Hey guys,

Please review and bench this changset, I see a nice improvement in throughput and requests/sec for the static file filter and unchanged for any other response. My benches were on Linux x86_64, quad core with HT enabled.

Here are my benches for the changeset:

### Bench Tool
weighttp -t 8 -c 1000 -n 1000000 http://localhost:8080/bench/100.html

#### 100 bytes - 1k concurrent, 1million requests

* Before: finished in 27 sec, 188 millisec and 738 microsec, 36779 req/s, 6465 kbyte/s
* After: finished in 23 sec, 146 millisec and 721 microsec, 43202 req/s, 7594 kbyte/s
* +17%

#### 4 k - 1k concurrent, 1million requests

* Before finished in 29 sec, 186 millisec and 568 microsec, 34262 req/s, 139759 kbyte/s
* After: finished in 23 sec, 848 millisec and 815 microsec, 41930 req/s, 171040 kbyte/s
* +22%

#### 20k - 1k concurrent, 1million requests

* Before: finished in 34 sec, 25 millisec and 300 microsec, 29389 req/s, 590151 kbyte/s
* After: finished in 25 sec, 535 millisec and 173 microsec, 39161 req/s, 786369 kbyte/s
* +33%

#### 1MB - 100 concurrent, 1million requests

* Before: finished in 241 sec, 135 millisec and 750 microsec, 4147 req/s, 4246910 kbyte/s
* After: finished in 108 sec, 479 millisec and 387 microsec, 9218 req/s, 9440337 kbyte/s
* +122%

#### 404 response, no file copy - 1k concurrent, 1million requests

* Before: finished in 26 sec, 521 millisec and 28 microsec, 37705 req/s, 2246 kbyte/s
* After: finished in 26 sec, 631 millisec and 12 microsec, 37550 req/s, 2236 kbyte/s
* -0.5%