From cc567c9beace114554f7e7f50c3a5181cc44a07d Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Thu, 14 Aug 2014 23:06:12 +0530 Subject: socket: Add support for TCP defer accept TCP_DEFER_ACCEPT Allow a listener to be awakened only when data arrives on the socket. If TCP_DEFER_ACCEPT set on a server-side listening socket, the TCP/IP stack will not to wait for the final ACK packet and not to initiate the process until the first packet of real data has arrived. After sending the SYN/ACK, the server will then wait for a data packet from a client. Now, only three packets will be sent over the network, and the connection establishment delay will be significantly reduced. --- man/systemd.socket.xml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'man') diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml index 5efb398b09..4483905832 100644 --- a/man/systemd.socket.xml +++ b/man/systemd.socket.xml @@ -545,6 +545,47 @@ for details.). + + DeferAccept= + + Takes time (in + seconds) as argument. If set, the + listening process will be awakened + only when data arrives on the socket, + and not immediately when connection is + established. When this option is set, + the + TCP_DEFER_ACCEPT + socket option will be used (see + tcp7), + and the kernel will ignore initial ACK + packets without any data. The argument + specifies the approximate amount of + time the kernel should wait for + incoming data before falling back to + the normal behaviour of honouring + empty ACK packets. This option is + beneficial for protocols where the + client sends the data first (e.g. + HTTP, in contrast to SMTP), because + the server process will not be woken + up unnecessarily before it can take + any action. + + + If the client also uses the + TCP_DEFER_ACCEPT + option, the latency of the initial + connection may be reduced, because the + kernel will send data in the final + packet establishing the connection + (the third packet in the "three-way + handshake"). + + Disabled by default. + + + ReceiveBuffer= SendBuffer= -- cgit v1.2.3-54-g00ecf