> > 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.