netdev
[Top] [All Lists]

Re: TCP receiver's window calculation problem

To: John Heffner <jheffner@xxxxxxx>
Subject: Re: TCP receiver's window calculation problem
From: Cheng Jin <chengjin@xxxxxxxxxxxxxx>
Date: Thu, 24 Jun 2004 23:37:35 -0700 (PDT)
Cc: "netdev@xxxxxxxxxxx" <netdev@xxxxxxxxxxx>, "fast-support@xxxxxxxxxxxxxx" <fast-support@xxxxxxxxxxxxxx>
In-reply-to: <Pine.NEB.4.33.0406241519430.28506-100000@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
John,

> > I think having a default limit on tcp memory is acceptable to prevent DoS,
> > but when a user increases the memory limit by explicitly setting tcp_rmem,
> > that should take effect.  The code itself shouldnt pose any limit like it
> > does now.
> 
> The core of the problem is that you are describing a truesize of each skb
> at about 16k, but each of those only contains < 1500 bytes of payload.
> You are wasting 90% of your socket memory.  Announcing a 3 MB window with
> a 30 MB socket buffer is the right thing to do, from a certain point of
> view.  OTOH, it kills performance.

The receiver is set to use a 9000 MTU, but the sender uses a 1500-byte 
MTU, which is not really a pathological case.  It would have made more
sense for the receiver to allocate skbs of the right size as incoming 
packets are received.  

Is it due to effciency reasons that the skbs are just fixed in size 
according to the set MTU on the interface card? I suppose that the 
receiver has no real way of knowing the right MTU size at the sender.

Thanks,

Cheng




<Prev in Thread] Current Thread [Next in Thread>