Author: adrian.chadd
Date: Wed Mar 18 07:46:50 2009
New Revision: 13870
Modified:
branches/LUSCA_HEAD/src/cf.data.pre
branches/LUSCA_HEAD/src/client_side.c
branches/LUSCA_HEAD/src/structs.h
Log:
Add in a config option to override the system default tcp send/receive size
for client sockets.
Some of the CDN servers are reasonably far away from the origins and
reasonably
close to clients. Therefore, having large socket buffers for the clients
just
wastes RAM which could be better used elsewhere. Having large socket buffers
for the server connections (ie, the system default) allows those fewer
sessions
to achieve sensible speeds.
Thanks to Andrew Alston (TENET) for the suggestion.
Modified: branches/LUSCA_HEAD/src/cf.data.pre
==============================================================================
--- branches/LUSCA_HEAD/src/cf.data.pre (original)
+++ branches/LUSCA_HEAD/src/cf.data.pre Wed Mar 18 07:46:50 2009
@@ -5921,4 +5921,18 @@
The default value (-1) means "use the legacy compile-time calculation."
DOC_END
+NAME: client_socksize
+COMMENT: send/receive buffer socket size for client-side
+TYPE: int
+LOC: Config.client_socksize
+DEFAULT: -1
+DOC_START
+ Define the TCP send/receive socket buffer size used by the client side
code.
+ The default, -1, means "use the system default".
+
+ Note, this is not the same as the SQUID_TCP_SO_{SEND,RECV}BUF
configuration
+ variables which somewhat dictate the buffer sizes used inside the proxy
code
+ for handling socket data.
+DOC_END
+
EOF
Modified: branches/LUSCA_HEAD/src/client_side.c
==============================================================================
--- branches/LUSCA_HEAD/src/client_side.c (original)
+++ branches/LUSCA_HEAD/src/client_side.c Wed Mar 18 07:46:50 2009
@@ -4868,6 +4868,8 @@
#endif
commSetSelect(fd, COMM_SELECT_READ, clientReadRequest, connState, 0);
commSetDefer(fd, clientReadDefer, connState);
+ if (Config.client_socksize > -1)
+ commSetTcpBufferSize(fd, Config.client_socksize);
if (s->tcp_keepalive.enabled) {
commSetTcpKeepalive(fd, s->tcp_keepalive.idle,
s->tcp_keepalive.interval, s->tcp_keepalive.timeout);
}
@@ -5044,6 +5046,8 @@
if (s->http.tcp_keepalive.enabled) {
commSetTcpKeepalive(fd, s->http.tcp_keepalive.idle,
s->http.tcp_keepalive.interval, s->http.tcp_keepalive.timeout);
}
+ if (Config.client_socksize > -1)
+ commSetTcpBufferSize(fd, Config.client_socksize);
clientdbEstablished(sqinet_get_v4_inaddr(&peer, SQADDR_ASSERT_IS_V4),
1);
incoming_sockets_accepted++;
httpsAcceptSSL(connState, s->sslContext);
Modified: branches/LUSCA_HEAD/src/structs.h
==============================================================================
--- branches/LUSCA_HEAD/src/structs.h (original)
+++ branches/LUSCA_HEAD/src/structs.h Wed Mar 18 07:46:50 2009
@@ -827,6 +827,8 @@
int n_aiops_threads;
} aiops;
#endif
+ /* XXX I'm not sure where these should live .. */
+ int client_socksize;
};
struct _SquidConfig2 {
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---