You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rob Hartill <ro...@imdb.com> on 1997/07/31 13:15:07 UTC

Bugs regarding "SendBufferSize" (fwd)

not acked

---------- Forwarded message ----------
Date: Wed, 30 Jul 1997 21:55:15 -0700 (PDT)
From: "Philip A. Prindeville" <ph...@enteka.com>
To: apache-bugs@mail.apache.org
Subject: Bugs regarding "SendBufferSize"

Hi.

	After much head-scratching about really poor performance,
I went and added much debugging code to http_main.c and started to
look and the logging results.

	I was really surprised at what I found:  the listening
socket is created with a SO_SNDBUF (which is never used, since the
socket only listens) of whatever SendBufferSize is set to, but
any sockets that are returned from the accept() call in child_main()
have a SO_SNDBUF of 0!  This really surprised me.  I don't have
the kernel sources or the TCP module sources, but it seems to me
that:

	(a) if you call accept(), then the connection is already
	    open and the window size can't be changed...

	(b) accept() should pass any characteristics (ie. options
	    or parameters) to the "child" socket when it clones
	    the socket...

so why isn't the window size (send buffer size) that the listening
socket has being inherited?

	Am I missing something really obvious here?  It would be
nice to get the performance increase without having to having to
change global system parameters with 'ndd /dev/tcp tcp_xmit_hiwat
65536' or whatever.

	BTW:  I'm running Apache 1.2.0 with the Proxy module on
Solaris 2.5.1.  I've added a patch (which I will post as soon as
I figure out the above bug) to set the SO_RCVBUF on the connection
to the remote server being proxied.

	I'm not on the list so please copy me on the reply.

Thanks,

-Philip


Re: Bugs regarding "SendBufferSize" (fwd)

Posted by Dean Gaudet <dg...@arctic.org>.
In reality all the sock layer options are supposed to be dup'd.  ip, and
tcp options are supposed to not be dup'd.  SO_SNDBUF is a sock layer
option, and is supposed to be dup'd.  But, hey, this is solaris < 2.6.0.

Dean

On Thu, 31 Jul 1997, Marc Slemko wrote:

> Yes, on some systems when you duplicate a fd (as is done in an accept()),
> the settings associated with it are not carried over.  Note the two calls
> to sock_disable_nagle.  We may need to add some of the other things done
> in make_sock after the accept().
> 
> Have not looked at how the SO_SNDBUF one to see what the impact of doing
> it after the connection is established is.


Re: Bugs regarding "SendBufferSize" (fwd)

Posted by Marc Slemko <ma...@worldgate.com>.
Yes, on some systems when you duplicate a fd (as is done in an accept()),
the settings associated with it are not carried over.  Note the two calls
to sock_disable_nagle.  We may need to add some of the other things done
in make_sock after the accept().

Have not looked at how the SO_SNDBUF one to see what the impact of doing
it after the connection is established is.

> ---------- Forwarded message ----------
> Date: Wed, 30 Jul 1997 21:55:15 -0700 (PDT)
> From: "Philip A. Prindeville" <ph...@enteka.com>
> To: apache-bugs@mail.apache.org
> Subject: Bugs regarding "SendBufferSize"
> 
> Hi.
> 
> 	After much head-scratching about really poor performance,
> I went and added much debugging code to http_main.c and started to
> look and the logging results.
> 
> 	I was really surprised at what I found:  the listening
> socket is created with a SO_SNDBUF (which is never used, since the
> socket only listens) of whatever SendBufferSize is set to, but
> any sockets that are returned from the accept() call in child_main()
> have a SO_SNDBUF of 0!  This really surprised me.  I don't have
> the kernel sources or the TCP module sources, but it seems to me
> that:
> 
> 	(a) if you call accept(), then the connection is already
> 	    open and the window size can't be changed...
> 
> 	(b) accept() should pass any characteristics (ie. options
> 	    or parameters) to the "child" socket when it clones
> 	    the socket...
> 
> so why isn't the window size (send buffer size) that the listening
> socket has being inherited?
> 
> 	Am I missing something really obvious here?  It would be
> nice to get the performance increase without having to having to
> change global system parameters with 'ndd /dev/tcp tcp_xmit_hiwat
> 65536' or whatever.
> 
> 	BTW:  I'm running Apache 1.2.0 with the Proxy module on
> Solaris 2.5.1.  I've added a patch (which I will post as soon as
> I figure out the above bug) to set the SO_RCVBUF on the connection
> to the remote server being proxied.
> 
> 	I'm not on the list so please copy me on the reply.
> 
> Thanks,
> 
> -Philip
>