MXS-2073: Add missing TCP_NODELAY for client sockets
The client connections had the Nagle algorithm enabled which could cause bad performance with smaller workloads. The common network configuration code in utils.cc, currently used by the backend connections, sets it properly.
This commit is contained in:
@ -2369,21 +2369,7 @@ dcb_accept(DCB *dcb)
|
||||
{
|
||||
dcb->stats.n_accepts++;
|
||||
|
||||
/* set nonblocking */
|
||||
sendbuf = MXS_CLIENT_SO_SNDBUF;
|
||||
|
||||
if (setsockopt(c_sock, SOL_SOCKET, SO_SNDBUF, &sendbuf, optlen) != 0)
|
||||
{
|
||||
MXS_ERROR("Failed to set socket options: %d, %s", errno, mxs_strerror(errno));
|
||||
}
|
||||
|
||||
sendbuf = MXS_CLIENT_SO_RCVBUF;
|
||||
|
||||
if (setsockopt(c_sock, SOL_SOCKET, SO_RCVBUF, &sendbuf, optlen) != 0)
|
||||
{
|
||||
MXS_ERROR("Failed to set socket options: %d, %s", errno, mxs_strerror(errno));
|
||||
}
|
||||
setnonblocking(c_sock);
|
||||
configure_network_socket(c_sock, client_conn.ss_family);
|
||||
|
||||
client_dcb = dcb_alloc(DCB_ROLE_CLIENT_HANDLER, dcb->listener);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user