Subject: Re: fixing send(2) semantics (kern/29750)
To: None <tech-kern@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 03/27/2005 05:02:29
> - If I sleep between send, or even if I do a single system call, the
> interface consume packets faster than I add them.  The queue is empty
> and the network is unused for some time.

Honestly, I'm not sure a blocking send() would help you.  The overhead
of putting a process to sleep and waking it up again is on the order of
a syscall (very rough estimate here - especially since I don't recall
seeing anything saying what port you're using).

If the interface can drain an entire full-up send queue in the time
required to realize send() failed and call it again, I submit you are
running so close to the absolute maximum performance your hardware can
deliver that you do not want a general-purpose OS like NetBSD.  You
want either a faster machine or a very special-case OS that (in
particular) doesn't have any kernel/user boundary that data must cross
- or, perhaps, a slower network, but that would inherently cripple your
throughput even worse than running what you have now not quite wide
open all the time.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B