Re: seeing strange values for tcp sk_rmem_alloc



On 12/03/2009 11:04 AM, Eric Dumazet wrote:
Chris Friesen a écrit :

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.


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.

Looks like this is indeed the case, changing the loopback mtu to 8K
makes it increase in 8K increments. This is quite unexpected, since for
UDP it only increases by the actual amount of the data being sent rather
than the size of the full MTU.

As it stands, it looks like sk_rmem_alloc isn't very useful. Can you
point me to something that is more reflective of the actual space used
by the tcp socket? I'd like something that increases monotonically with
received data and once it exceeds the configured size then the tcp stack
will start dropping packets. Does such a thing exist, or is the tcp
stack just too complicated to easily obtain this sort of information?

Thanks for your help,

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



Relevant Pages

  • Re: firewall and UDP packets, and errocode 10004
    ... Did you tried to uninstall/install TCP stack, ... Arkady Frenkel wrote: ... MSAFD TCPIP TCP/IP ... I have an application that sends UDP packets. ...
    (microsoft.public.win32.programmer.networks)
  • Re: solaris 9 IPQoS examples?
    ... I'm just saying, if I change the TCP stack on the local machine, ... No matter who initiated the ... it's still the remote end that is sending packets ...
    (comp.unix.solaris)
  • Re: solaris 9 IPQoS examples?
    ... > I'm just saying, if I change the TCP stack on the local machine, ... No matter who initiated the ... it's still the remote end that is sending packets ...
    (comp.unix.solaris)
  • Re: Raw sockets vs connect() scanning on windows/linux
    ... creation to craft 60 byte packets to mimic exactly the typical connect ... and change behaviors accordingly? ... Unicornscan implements the -W option to mimic different OS's TCP stack ...
    (Pen-Test)
  • Re: 6.2 mtu now limits size of incomming packet
    ... Let's flip the question around a bit: why would you _want_ the TCP stack ... to accept frames larger than the stated MTU? ... the standard BSD interface description does not include an MRU. ...
    (freebsd-net)