Welcome! Log In Create A New Profile

Advanced

Re: rcvbuf option

February 18, 2014 05:16PM
Maxim Dounin Wrote:
-------------------------------------------------------
> Hello!
>
> On Tue, Feb 18, 2014 at 02:58:05PM -0500, atarob wrote:
>
> > The config listen option rcvbuf which maps to the TCP SO_RCVBUF, is
> applied
> > to the listening socket, and not inherited by the accept()ed
> connections. So
> > if you have a high load application where the legitimate request is
> bound to
> > be no more than 4K, for instance, you could save a lot of RAM by
> dropping
> > the default here without changing it at the system level.
> >
> > I straced nginx and it does not seem to actually apply the settings
> through
> > a subsequent setsockopt to the accepted socket. Is this intentional
> or an
> > oversight?
>
> What makes you think that SO_RCVBUF is not inherited by accepted
> connections?

http://stackoverflow.com/a/12864681

I didn't run it myself, because testing it on one platform isn't enough to assume either way. But why do you think that it is inherited in general?

Also, these are inherently different settings. Even if it were inherited, to reduce the 10,000 connections on which I expect 2KB of upload, I have to drop the listening socket's buffer size? Isn't that used by the OS for clients that are trying to connect to the listening socket? If so, I wouldn't want to drop that. In fact, since there is only one (or a few) listening sockets, I might want to increase that while dropping the accepted sockets' buffer size.

Thoughts?

>
> --
> Maxim Dounin
> http://nginx.org/
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

rcvbuf option

atarob February 18, 2014 02:58PM

Re: rcvbuf option

Maxim Dounin February 18, 2014 04:18PM

Re: rcvbuf option

atarob February 18, 2014 05:16PM

Re: rcvbuf option

Maxim Dounin February 19, 2014 07:02AM

Re: rcvbuf option

atarob February 19, 2014 04:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 163
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready