netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Can I limit the number of active tx per TCP socket?
@ 2014-03-06 12:28 David Laight
  2014-03-06 14:15 ` John Heffner
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: David Laight @ 2014-03-06 12:28 UTC (permalink / raw)
  To: netdev@vger.kernel.org

Is it possible to stop a TCP connection having more than one
tx skb (in the ethernet tx ring) at any one time?
The idea is to allow time for short sends from the application
to accumulate so that the transmitted frames are longer.

Basically I have a TCP connection which carries a lot of separate
short 'user buffers'. These are not command-response so
TCP_NODELAY has to be set to avoid long delays. But this means
that the ethernet packet rate is very high - with 3.14 about
2000/sec even though the data rate is well under 1MB/sec.

Anything that reduces this packet rate will help the poor little
embedded ppc that has to receive them!

>From the descriptions I've found I suspect that setting a very
low TCP_NOTSENT_LOWAT (like 1 byte) might have other side effects.
I think that limits the writes into kernel memory - which isn't
really what I'm trying to do.

With a 3.14.0-rc5 kernel reducing the network speed to 10M (from Ge)
halves the number of transmitted packets (with the same aggregate
data rate). But I suspect it could still be reduced further.

Limiting the number of tx packets per TCP connection might also
help stop bulk transfers affecting low-latency connections,
especially if the throughput of individual connections isn't
especially important - as it may not be on a big ftp/web server.

Limiting the window size offered by the remote system won't help me.
The window needs to be large enough several full-sized packets, and
I'm trying to stop large numbers of very short packets being sent.

In this particular case the connection is local, but we have a similar
problem with sigtran m3ua traffic over sctp.
If we are sending 15000 sctp data chunks every second, with an average size
under 300 bytes (possibly nearer 150) then we really want to fill the
ethernet packets.
(That is a real data pattern, not a development test.)

	David

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-03-07 16:40 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-06 12:28 Can I limit the number of active tx per TCP socket? David Laight
2014-03-06 14:15 ` John Heffner
2014-03-06 15:03   ` David Laight
2014-03-06 14:38 ` Eric Dumazet
2014-03-06 14:52   ` Eric Dumazet
2014-03-06 17:17 ` Rick Jones
2014-03-06 18:09   ` Neal Cardwell
2014-03-06 19:06     ` Rick Jones
2014-03-06 19:09       ` Neal Cardwell
2014-03-06 19:27       ` Eric Dumazet
2014-03-07 10:24     ` David Laight
2014-03-07 12:29       ` David Laight
2014-03-07 14:22         ` Eric Dumazet
2014-03-07 14:35           ` David Laight
2014-03-07 15:00             ` Eric Dumazet
2014-03-07 16:39               ` David Laight
2014-03-07 10:17   ` David Laight

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).