linux/net/sctp
Thomas Graf a76c0adf60 sctp: Do not account for sizeof(struct sk_buff) in estimated rwnd
When checking whether a DATA chunk fits into the estimated rwnd a
full sizeof(struct sk_buff) is added to the needed chunk size. This
quickly exhausts the available rwnd space and leads to packets being
sent which are much below the PMTU limit. This can lead to much worse
performance.

The reason for this behaviour was to avoid putting too much memory
pressure on the receiver. The concept is not completely irational
because a Linux receiver does in fact clone an skb for each DATA chunk
delivered. However, Linux also reserves half the available socket
buffer space for data structures therefore usage of it is already
accounted for.

When proposing to change this the last time it was noted that this
behaviour was introduced to solve a performance issue caused by rwnd
overusage in combination with small DATA chunks.

Trying to reproduce this I found that with the sk_buff overhead removed,
the performance would improve significantly unless socket buffer limits
are increased.

The following numbers have been gathered using a patched iperf
supporting SCTP over a live 1 Gbit ethernet network. The -l option
was used to limit DATA chunk sizes. The numbers listed are based on
the average of 3 test runs each. Default values have been used for
sk_(r|w)mem.

Chunk
Size    Unpatched     No Overhead
-------------------------------------
   4    15.2 Kbit [!]   12.2 Mbit [!]
   8    35.8 Kbit [!]   26.0 Mbit [!]
  16    95.5 Kbit [!]   54.4 Mbit [!]
  32   106.7 Mbit      102.3 Mbit
  64   189.2 Mbit      188.3 Mbit
 128   331.2 Mbit      334.8 Mbit
 256   537.7 Mbit      536.0 Mbit
 512   766.9 Mbit      766.6 Mbit
1024   810.1 Mbit      808.6 Mbit

Signed-off-by: Thomas Graf <tgraf@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-20 13:58:37 -05:00
..
associola.c sctp: fix incorrect overflow check on autoclose 2011-12-19 16:25:46 -05:00
auth.c sctp: better integer overflow check in sctp_auth_create_key() 2011-11-29 15:51:03 -05:00
bind_addr.c net: Remove casts of void * 2011-06-16 23:19:27 -04:00
chunk.c net/sctp: Use pr_fmt and pr_<level> 2010-08-26 14:11:48 -07:00
command.c [SCTP]: Remove sctp_add_cmd_sf wrapper bloat 2008-03-27 17:54:29 -07:00
debug.c sctp: remove completely unsed EMPTY state 2011-04-20 01:51:03 -07:00
endpointola.c sctp: bail from sctp_endpoint_lookup_assoc() if not bound 2011-04-20 01:51:03 -07:00
input.c net: Remove casts of void * 2011-06-16 23:19:27 -04:00
inqueue.c net/sctp: Use pr_fmt and pr_<level> 2010-08-26 14:11:48 -07:00
ipv6.c ipv6: tcp: fix TCLASS value in ACK messages sent from TIME_WAIT 2011-10-27 00:44:35 -04:00
Kconfig sctp: implement sctp association probing module 2010-04-30 22:41:09 -04:00
Makefile sctp: implement sctp association probing module 2010-04-30 22:41:09 -04:00
objcnt.c net/sctp: Use pr_fmt and pr_<level> 2010-08-26 14:11:48 -07:00
output.c sctp: Do not account for sizeof(struct sk_buff) in estimated rwnd 2011-12-20 13:58:37 -05:00
outqueue.c sctp: Do not account for sizeof(struct sk_buff) in estimated rwnd 2011-12-20 13:58:37 -05:00
primitive.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
probe.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2010-10-23 11:47:02 -07:00
proc.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
protocol.c sctp: fix incorrect overflow check on autoclose 2011-12-19 16:25:46 -05:00
sm_make_chunk.c sctp: Bundle HEAERTBEAT into ASCONF_ACK 2011-08-24 19:41:13 -07:00
sm_sideeffect.c sctp: deal with multiple COOKIE_ECHO chunks 2011-09-16 17:17:22 -04:00
sm_statefuns.c Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
sm_statetable.c sctp: Enforce retransmission limit during shutdown 2011-07-07 14:08:44 -07:00
socket.c sctp: fix incorrect overflow check on autoclose 2011-12-19 16:25:46 -05:00
ssnmap.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sysctl.c sctp: fix incorrect overflow check on autoclose 2011-12-19 16:25:46 -05:00
transport.c sctp: Store a flowi in transports to provide persistent keying. 2011-05-08 14:05:14 -07:00
tsnmap.c sctp: fix compile warnings in sctp_tsnmap_num_gabs 2011-02-20 11:10:15 -08:00
ulpevent.c sctp: ABORT if receive, reassmbly, or reodering queue is not empty while closing socket 2011-07-08 09:53:08 -07:00
ulpqueue.c Fix common misspellings 2011-03-31 11:26:23 -03:00