On Fri, 2011-03-04, Rick Jones wrote:
> Bob Hauck <(E-Mail Removed)> wrote:
>> On Thu, 3 Mar 2011 23:22:42 +0000 (UTC), Rick Jones <(E-Mail Removed)>
>> wrote:
>
>> > For "small" packets, the CPU cost is about the same regardless of
>> > data or ACK. This means that the application which is making the
>> > propper gathering send call will spend far fewer CPU cycles in the
>> > networking stack.
>
>> When you say "gathering send", do you mean it would be sufficient
>> (on Linux with a recent libc) to use writev(), or do you actually
>> need to put everything in one buffer and call write()?
>
> When I wrote that I was much more Unix aligned, where one could use
> writev() to do that (or sendmsg(), IIRC). I would have ass-u-me-d the
> same for writev() on Linux.
writev() must do The Right Thing for UDP sockets (i.e. send one big
datagram) so at least the C library cannot mindlessly translate it
into a series of write(2) calls.
/Jorgen
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
|