Updating our TCP and socket sysctl values...
Bjoern A. Zeeb
bzeeb-lists at lists.zabbadoz.net
Wed Aug 24 16:18:54 UTC 2011
On Mar 19, 2011, at 6:37 AM, George Neville-Neil wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Howdy,
>
> I believe it's time for us to upgrade our sysctl values for TCP sockets so that
> they are more in line with the modern world. At the moment we have these limits on
> our buffering:
>
> kern.ipc.maxsockbuf: 262144
> net.inet.tcp.recvbuf_max: 262144
> net.inet.tcp.sendbuf_max: 262144
>
> I believe it's time to up these values to something that's in line with higher speed
> local networks, such as 10G. Perhaps it's time to move these to 2MB instead of 256K.
>
> Thoughts?
This never happened, did it? Was there a reason?
Index: sys/netinet/tcp_input.c
===================================================================
--- sys/netinet/tcp_input.c (revision 225048)
+++ sys/netinet/tcp_input.c (working copy)
@@ -195,7 +195,7 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, recvbuf_i
&VNET_NAME(tcp_autorcvbuf_inc), 0,
"Incrementor step size of automatic receive buffer");
-VNET_DEFINE(int, tcp_autorcvbuf_max) = 256*1024;
+VNET_DEFINE(int, tcp_autorcvbuf_max) = 2*1024*1024;
#define V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max)
SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, recvbuf_max, CTLFLAG_RW,
&VNET_NAME(tcp_autorcvbuf_max), 0,
Index: sys/netinet/tcp_output.c
===================================================================
--- sys/netinet/tcp_output.c (revision 225048)
+++ sys/netinet/tcp_output.c (working copy)
@@ -117,7 +117,7 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, sendbuf_i
&VNET_NAME(tcp_autosndbuf_inc), 0,
"Incrementor step size of automatic send buffer");
-VNET_DEFINE(int, tcp_autosndbuf_max) = 256*1024;
+VNET_DEFINE(int, tcp_autosndbuf_max) = 2*1024*1024;
#define V_tcp_autosndbuf_max VNET(tcp_autosndbuf_max)
SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, sendbuf_max, CTLFLAG_RW,
&VNET_NAME(tcp_autosndbuf_max), 0,
Index: sys/sys/sockbuf.h
===================================================================
--- sys/sys/sockbuf.h (revision 225048)
+++ sys/sys/sockbuf.h (working copy)
@@ -37,7 +37,7 @@
#include <sys/_mutex.h>
#include <sys/_sx.h>
-#define SB_MAX (256*1024) /* default for max chars in sockbuf */
+#define SB_MAX (2*1024*1024) /* default for max chars in sockbuf */
/*
* Constants for sb_flags field of struct sockbuf.
--
Bjoern A. Zeeb You have to have visions!
Stop bit received. Insert coin for new address family.
More information about the freebsd-arch
mailing list