On 23/03/2014 12:41, Martin Gainty wrote:
> 
>> Date: Sat, 22 Mar 2014 14:24:01 -0400
>> Subject: Effects of turning off sendFile in the NIO connector
>> From: tomcat.ran...@gmail.com
>> To: users@tomcat.apache.org
>>
>> 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?
> 
> MG>when you enable sendfile support with request attr  
> org.apache.tomcat.sendfile.support = true
> MG>You will need to set these 3 header attributes
> 
> org.apache.tomcat.sendfile.filename: Canonical filename of the file which 
> will be sent as a String 
> org.apache.tomcat.sendfile.start: Start offset as a Long 
> org.apache.tomcat.sendfile.end: End offset as a Long

While this is relevant to how sendfile works under the covers and would
be relevant if the OP was trying to use sendfile from their own servlet
(rather than just using the sendfile support Tomcat provides for static
content via the default servlet), is is not at all relevant to the
question the OP asked.


> MG>htitps://tomcat.apache.org/tomcat-6.0-doc/aio.html 

The OP stated they are using Tomcat 7, not Tomcat 6.

You failed to copy and paste that URL correctly.


> MG>Compression:
> MG>set compression="on" @ Connector
> MG>https://tomcat.apache.org/tomcat-7.0-doc/config/http.html
> 
> MG>I did not read that TC cannot use sendfile with any compressed Stream?
> MG>can you show us the URL?

Clearly you did not bother to read the description for the compression
attribute on the URL you just quoted. It clearly states that sendfile
and compression may not be used together.



Martin,

Replies from you that miss the point of the original question are a
regular occurrence. I'll go further and state that it is very unusual
for a reply of yours to be relevant and useful to the person asking for
help.

Not only is it rare for a reply of yours to be helpful, in many cases
your replies mislead the person seeking help and cause them to waste
considerable time. Such responses are detrimental to the health of this
community.

Therefore, with the health of this community and mind and wearing my
list owner's hat, I am asking you to take more care when you reply. If
the current pattern continues then you will be unsubscribed from this
mailing list and prevented from resubscribing.

Mark


P.S. For folks thinking that this is rather a harsh message to post on a
public mailing list, a number of mailing list regulars have tried to
steer Martin in the right direction off-list only to be consistently
meet with a refusal by Martin to accept that there is anything wrong
with any of his posts.


>> 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
>                                         
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to