Subject: TCP_NODELAY for accept()ed sockets
To: None <>
From: Jaromir Dolecek <>
List: tech-net
Date: 01/15/2002 10:32:53
after reading

I've got to check what we do WRT TCP_DELAY and accept(2).
I've used dbench-1.3
from to check the behaviour.
In order for the benchmark to not deadlock agains itself,
I had to up send/recvspace to:


Then, I found that indeed adding set_socket_options() after accept()
in tbench_srv.c would improve performance of the benchmark
tremendously. With the set_socket_options() call (which sets
TCP_NODELAY for the new socket) the performance of the benchmark
roughly matched Linux results.

I wonder if it would be suitable to make same change in NetBSD
TCP/IP code, i.e. make the accept(2)ed descriptors inherit
TCP_NODELAY from "parent". It sounds sensible to do so.

Jaromir Dolecek <>
ARTISYS, s.r.o., Stursova 71, 61600 Brno, Czech Republic
phone: +420-5-41224836 / fax: +420-5-41224870 /