What effect would setting useSendfile=false have on a web application using
the NIO connector? I'm asking because I may want to use gzip compression in
the connector. The docs state:

*"There is a tradeoff between using compression (saving your bandwidth) and
using the sendfile feature (saving your CPU cycles). If the connector
supports the sendfile feature, e.g. the NIO connector, using sendfile will
take precedence over compression. The symptoms will be that static files
greater that 48 Kb will be sent uncompressed."*

It's trivial that adding compression uses CPU cycles, but does that imply
that turning sendFile off even without enabling compression would increase
CPU cycles? It's worth mentioning that the site serves a large (8mg) SWF
file. I believe that was one of the pluses of NIO/sendFile, that it was
good with sending large files under heavy traffic?

We also only really need compression on XML data, the site has minimal
HTML, SWF's don't really benefit from gzip and some binary data we send
back and forth is already compressed. I could manually implement
compression on XML at the application level and within the SWF, if turning
off sendFile will have negative consequences.

Tomcat 7.0.42
RHEL6
~4T outbound traffic/day

Best,
John

Reply via email to