tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Owen" <so...@silverplatter.com>
Subject Tomcat and Socket send-buffer sizes
Date Wed, 26 Sep 2001 17:47:20 GMT
I've been trying to reduce the default blocks of 8k data being sent from
tomcat back to the browser when a HTML page is returned from a JspWriter
(because of a high packet-loss network connection becomimg prone to
collisions and tcp restarts at this size).

I've tried setting s.setSendBufferSize in tomcat/net/ServerSocketFactory (to
4k).
I've tried setting the size of the buffer size used by
tomcat/core/BufferedServletOutputStream.
I've tried setting (on Solaris 8) tcp_xmit_hiwat on the server machine.
I've tried changing the jsp page size with "buffer=4k" in the jsp page
directive.

A tcpdump log still shows a block of 8k being returned without any 'ack'
from the client machine.  This means that the TCP send buffer is not being
affected by any of the above.  I suspect that the TCP send-buffer size is
being influenced by the stream associated with the socket, overriding the
s.setSendBufferSize() but would like extra information on the subject.

Also if I can reduce this value, do the developers have any thoughts on the
knock-on effects of this, since I see that:
    jasper.runtime.BodyContentImpl
    jasper.runtime.JspWriterImpl
    tomcat.core.BufferedServletOutputStream
    jasper.constants
    tomcat.util.ByteBuffer
all use a hard-coded value of 8k when allocating a buffer.

Thanks for any help,
Steve Owen.


Mime
View raw message