tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Singer <>
Subject RE: fail to download large static files in tomcat
Date Thu, 28 Jul 2011 06:31:16 GMT
Regarding the question I asked on downloading large static files a while ago, I got a reply

i got the same issue today, environment: windows xp, tomcat 7 with nio connector;
it works after i try to add useSendfile="false" in server.xml Connector section;
you could have a try

I answered this person:

Thanks, it looks like it works :)
Do you also use compression=true?

I am not sure what is faster, nio or http? The first time nio is used, it is very slow, but
then it is faster than regular http.
But if the client calls the nio once, it will be very slow.

I also saw that useSendfiles is better in performance since it will reduce cpu cycles:
sendFile" mode, Tomcat tells the O/S to transfer the contents of the file  directly to the
socket (bypassing reading it in to Tomcat memory).

So, isn't it a decrease in performance to set it to false?

Thanks for the answer.

Michal Singer

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message