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:
@ -46,6 +46,20 @@ enum mxs_socket_type
|
||||
bool utils_init(); /*< Call this first before using any other function */
|
||||
void utils_end();
|
||||
|
||||
/**
|
||||
* Configure network socket options
|
||||
*
|
||||
* This is a helper function for setting various socket options that are always wanted for all types
|
||||
* of connections. It sets the socket into nonblocking mode, configures sndbuf and rcvbuf sizes
|
||||
* and sets TCP_NODELAY (no Nagle algorithm).
|
||||
*
|
||||
* @param so Socket to configure
|
||||
* @param type Socket type
|
||||
*
|
||||
* @return True if configuration was successful
|
||||
*/
|
||||
bool configure_network_socket(int so, int type);
|
||||
|
||||
/**
|
||||
* @brief Create a network socket and a socket configuration
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user