lkml.org 
[lkml]   [1997]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: writev() inefficiency
This was with libc-5.4.17, and linux-2.0.27 (I built libc myself, maybe I
screwed up). The data was two 100 byte buffers...

Nope didn't screw up, from strace of that test program:

writev(3, [{"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"..., 100}, {"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"..., 100}], 2) = 200

Setting TCP_NODELAY didn't help -- still split into two packets.

Dean

On Sun, 26 Jan 1997, Alan Cox wrote:

> Linux will normally coallesce writev() in accordance with the protocol. It
> always does this for UDP, and RAW sockets. For TCP you will see the same
> but the data may be split according to Nagle and maximum fragment sizes
>
> Old libc's emulate writev() rather than using the later kernel writev()
> and this causes the behaviour you describe. Try again with 2.0.x and
> libc5.3.12
>
>


\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.036 / U:1.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site