Subject: Re: fixing send(2) semantics (kern/29750)
To: None <tech-kern@netbsd.org>
From: Michael van Elst <mlelstv@serpens.de>
List: tech-kern
Date: 03/27/2005 15:03:15
manu@NetBSD.org (Emmanuel Dreyfus) writes:

>But that's with TCP. I beleive you cannot acheive that bandwidth on
>NetBSD with UDP, because of that problem.

What about using a timer ? If you want to write 1000Mbps then
schedule send() calls that fast and not faster.

If you still get ENOBUFS then the machine can't send at that
speed. Then you can reduce your desired send rate until
you do not see any more ENOBUFS.

N.B. the mbone/mdd sender routine does several system calls
within the send loop. In particular it polls for an incoming
packets for each outgoing packet and it reads from the data
file in chunks of a single packet (minus packet header).
Both generate significant overhead and the latter synchronizes
disk I/O with network I/O.


-- 
-- 
                                Michael van Elst
Internet: mlelstv@serpens.de
                                "A potential Snark may lurk in every tree."