Andrew Gallatin wrote:
Jeff Trawick wrote:
Are there any known performance or reliability issues in the socket
layer of recent dev levels of OpenSolaris to consider before
re-enabling sendfile use by httpd?
sendfile is slower than just copying on OpenSolaris.
It appears to me that sendfile can have a meaningful impact on system
CPU use, at least with Apache. I did some quick and very dirty
benchmarking earlier this year and made these notes. In the notes,
variation 1 means Apache uses sendfile; variation 2 means that Apache
mmaps the file and sends it; variation 3 is explicit reads of the file
and sends to the network. In all cases data is handled in chunks of
about 8K.
-------------cut here-----------
simple (ab from one client) retest on snv_b111b (2009.06):
code level: httpd 2.2.x HEAD, apr 1.3.x HEAD, apr-util 1.3.x HEAD
MPM: prefork
file delivered: 80kbyte mod_rewrite.html.en, copied to docroot
conf settings: Apache default, with ExtendedStatus turned On
variation two: uncomment "EnableSendfile Off"
variation three: uncomment both "EnableSendfile Off" and "EnableMMap Off"
client: ab on Linux connecting to server over gigabit LAN (-n 100000 -c
150, 2 iterations)
server: Ultra 24, Core 2 Quad, std gigabit adapter, ZFS
Throughput:
Server CPU use:
user space CPU is pretty close, with sendfile using the least (23.64
sec, 24.65, 24.74)
system space CPU reduction with sendfile is significant (52.55 sec,
69.25 sec, 68.84 sec)
More careful benchmarking and adjusting socket options and checking
system tuning could be instructive, but even without that investment it
is likely that sendfile will be helpful to at least some users. Unless
kernel problems are expected, we should enable it on OpenSolaris.
-------------cut here-----------
_______________________________________________
networking-discuss mailing list
[email protected]