lkml.org 
[lkml]   [2009]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: seeing strange values for tcp sk_rmem_alloc
Chris Friesen a écrit :
> On 12/01/2009 11:52 AM, Eric Dumazet wrote:
>
>> But be careful of sender tcp stack : It might be delayed a bit,
>> because it waits for receiver to open its window (slow start)
>>
>> You probably need something like
>>
>> while (1) {
>> send(fd1, buffer, 2Kbytes);
>> sleep(2); // let tcp stack flush its write buffers
>> display_sk_rmem_alloc(fd2);
>> }
>
> Ah, that makes a difference. But the results (see below) still look
> odd. For this test, /proc/sys/net/core/rmem_default is 118784. For
> some reason sk_rmem_alloc gets bumped by 16KB when I only send 2KB of
> data, and it drops back down again every 6 packets.
>
> Chris

Might be because you use loopback device ? ;)

ifconfig lo | grep MTU
UP LOOPBACK RUNNING MTU:16436 Metric:1

After a while (when hitting rcvbuf limit), tcp stack performs skb collapses, to reduce ram usage.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-12-03 18:07    [W:0.043 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site