tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: useSendFile=true skips compression
Date Sat, 04 Oct 2008 02:43:29 GMT

"Shaun Senecal" <ssenecal.work@gmail.com> wrote in message 
news:15060d5e0810022236v25a92bc1if2f80aac89e0d8f2@mail.gmail.com...
> Could someone explain to me why the NIO Connector will ignore the
> compression settings for large files if useSendFile is enabled (it is by
> default)?  It seems to me that if compression is enabled you would
> specifically want to use it when sendFile is enabled, but that might just 
> be
> because I don't really understand what sendFile means/does :)
>

In "normal" mode, Tomcat reads the file into its own memory buffer, 
optionally compresses it, and then writes it out again to the socket.  In 
"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).  On a 
modern O/S, this allows the O/S to transfer data using kernel memory only, 
instead of copying the kernel memory to program memory first (which has a 
significant cost on high-volume servers).

> It looks like my solution is to simply disable this option, but I was
> curious about why this is the case.  I am trying to deploy a large GWT 
> app,
> and I want to ensure that my massive JavaScript files get compressed 
> before
> being sent to the client.
> 




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message