On Sat, 4 Dec 1999, Stas Bekman wrote:
> Date: Sat, 4 Dec 1999 19:52:07 +0200 (IST)
> From: Stas Bekman <[EMAIL PROTECTED]>
> To: Oleg Bartunov <[EMAIL PROTECTED]>
> Cc: mod_perl list <[EMAIL PROTECTED]>
> Subject: Re: Failed to set ProxyReceiveBufferSize
>
> >>>>> "OB" == Oleg Bartunov <[EMAIL PROTECTED]> writes:
>
> OB> This message is for every proxied request.
> OB> Does anybody knows what does it means ?
> OB> In proxy config I have
> OB> ProxyReceiveBufferSize 1048576
>
> OB> Restarting proxy server doesn't helps.
>
> OB> btw, anybody know what is an optimal size of ProxyReceiveBufferSize
> OB> and does it really works.
>
> As a followup to Vivek's email, I've digged up in the linux kernel
> sources, the 2 relevant snippets are:
>
> /usr/src/linux/net/core/sock.c:
>
> /* Run time adjustable parameters. */
> __u32 sysctl_wmem_max = SK_WMEM_MAX;
> __u32 sysctl_rmem_max = SK_RMEM_MAX;
> __u32 sysctl_wmem_default = SK_WMEM_MAX;
> __u32 sysctl_rmem_default = SK_RMEM_MAX;
> [snip]
> case SO_RCVBUF:
> /* Don't error on this BSD doesn't and if you think
> about it this is right. Otherwise apps have to
> play 'guess the biggest size' games. RCVBUF/SNDBUF
> are treated in BSD as hints */
>
> if (val > sysctl_rmem_max)
> val = sysctl_rmem_max;
>
> /* FIXME: is this lower bound the right one? */
> sk->rcvbuf = max(val*2,256);
> break;
>
>
>
>
>
> /usr/src/linux/include/linux/skbuff.h:
> /* These are just the default values. This is run time configurable.
> * FIXME: Probably the config option should go away. -- erics
> */
>
> # ifdef CONFIG_SKB_LARGE
> #define SK_WMEM_MAX 65535
> #define SK_RMEM_MAX 65535
> #else
> #define SK_WMEM_MAX 32767
> #define SK_RMEM_MAX 32767
> #endif
>
>
> So the limit is either 32k or 64k, depending on CONFIG_SKB_LARGE...
> If you set it bigger it silently uses the default value as you see in the
> first code snippet
>
> I used to write a 1Mb example in the guide. Have removed the rewishful
> setting :)
No, don't remove it. Under FreeBSD it's possible to
configure kernel to have more buffers for socket:
sysctl -w kern.ipc.maxsockbuf=2621440
I did this and errors are gone now ! I still use 1Mb value.
Probably it's worth to comment this in your guide.
Regards,
Oleg
>
>
> _______________________________________________________________________
> Stas Bekman mailto:[EMAIL PROTECTED] www.singlesheaven.com/stas
> Perl,CGI,Apache,Linux,Web,Java,PC at www.singlesheaven.com/stas/TULARC
> www.apache.org & www.perl.com == www.modperl.com || perl.apache.org
> single o-> + single o-+ = singlesheaven http://www.singlesheaven.com
>
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83