net-next: frags: add adaptive per-peer timeout under load
Get series with b4
b4 am 20220829114427.GA2311@debianVersions newest first
- v1 Latest4 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | net-next: frags: move inetpeer from ip4 to inetinclude/ net/ net/ | +14 | 0 replies | |
| 2/4 | net-next: ip6: fetch inetpeer in ip6frag_initinclude/ | +3 | 2 replies | |
| 3/4 | net-next: frags: add inetpeer frag_mem trackinginclude/ include/ net/ +5 more | +38 | 4 replies | |
| 4/4 | net-next: frags: dynamic timeout under loadDocumentation/ include/ net/ +1 more | +34 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] net-next: frags: add adaptive per-peer timeout under load
This patch series introduces an optimization of fragment queues under load.
The goal is to improve upon the current approach of static timeouts (frag_timeout, 30 seconds by default) by implementing Eric's suggestion of reducing timeouts under load [1], with additional considerations for peer-specific load.
The timeout reduction is done dynamically per peer, based on both global and peer-specific load. low_thresh is reintroduced and now acts as a knob for adjusting per-peer memory limits.
A comparison of netperf results before and after applying the patch:
Before:
[vm1 ~]# ./super_netperf.sh 10 -H 172.16.43.3 -l 60 -t UDP_STREAM
103.23After:
[vm1 ~]# ./super_netperf.sh 10 -H 172.16.43.3 -l 60 -t UDP_STREAM
576.17And another benchmark of a more specific use case.
One high-bandwidth memory-hogging peer (vm1), and another "average" client (vm2), attempting to communicate with the same server:
Before:
[vm1 ~]# ./super_netperf.sh 10 -H 172.16.43.3 -l 60 -t UDP_STREAM 42.57 [vm2 ~]# ./super_netperf.sh 1 -H 172.16.43.3 -l 60 -t UDP_STREAM 50.93
After:
[vm1 ~]# ./super_netperf.sh 10 -H 172.16.43.3 -l 60 -t UDP_STREAM 420.65 [vm2 ~]# ./super_netperf.sh 1 -H 172.16.43.3 -l 60 -t UDP_STREAM 624.79
These benchmarks were done using the following configuration:
[vm3 ~]# grep . /proc/sys/net/ipv4/ipfrag_*/proc/sys/net/ipv4/ipfrag_high_thresh:104857600/proc/sys/net/ipv4/ipfrag_low_thresh:78643200/proc/sys/net/ipv4/ipfrag_max_dist:64/proc/sys/net/ipv4/ipfrag_secret_interval:0/proc/sys/net/ipv4/ipfrag_time:30
Regards,
Richard
[1] https://www.mail-archive.com/[email protected]/msg242228.html
Richard Gobert (4):
net-next: frags: move inetpeer from ip4 to inet
net-next: ip6: fetch inetpeer in ip6frag_init
net-next: frags: add inetpeer frag_mem tracking
net-next: frags: dynamic timeout under load
Documentation/networking/ip-sysctl.rst | 3 + include/net/inet_frag.h | 13 ++--- include/net/inetpeer.h | 1 + include/net/ipv6_frag.h | 3 + net/ieee802154/6lowpan/reassembly.c | 2 +- net/ipv4/inet_fragment.c | 77 ++++++++++++++++++++++--- net/ipv4/inetpeer.c | 1 + net/ipv4/ip_fragment.c | 25 ++------ net/ipv6/netfilter/nf_conntrack_reasm.c | 2 +- net/ipv6/reassembly.c | 2 +- 10 files changed, 89 insertions(+), 40 deletions(-)
Signature · 1 line
2.36.1