Merge ~hloeung/content-cache-charm:sysctl into content-cache-charm:master

Proposed by Haw Loeung
Status: Merged
Approved by: Haw Loeung
Approved revision: f39c66462db73f9e539224149573ed50188ffb04
Merged at revision: 79a1e293ec488997569342472aec6aaa5c3b1675
Proposed branch: ~hloeung/content-cache-charm:sysctl
Merge into: content-cache-charm:master
Diff against target: 140 lines (+60/-0)
10 files modified
templates/sysctl_conf.tmpl (+6/-0)
tests/unit/files/sysctl.conf (+6/-0)
tests/unit/files/sysctl_core.conf (+6/-0)
tests/unit/files/sysctl_core_default_qdisc.conf (+6/-0)
tests/unit/files/sysctl_core_default_qdisc_none.conf (+6/-0)
tests/unit/files/sysctl_net_tcp_congestion_control.conf (+6/-0)
tests/unit/files/sysctl_net_tcp_congestion_control_bbr2.conf (+6/-0)
tests/unit/files/sysctl_net_tcp_congestion_control_no_bbr.conf (+6/-0)
tests/unit/files/sysctl_net_tcp_mem.conf (+6/-0)
tests/unit/files/sysctl_net_tcp_mem_none.conf (+6/-0)
Reviewer Review Type Date Requested Status
James Simpson Approve
Canonical IS Reviewers Pending
Review via email: mp+411056@code.launchpad.net

Commit message

Tune net.ipv4.ip_local_port_range and net.ipv4.tcp_tw_reuse

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
James Simpson (jsimpso) wrote :

LGTM

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 79a1e293ec488997569342472aec6aaa5c3b1675

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/templates/sysctl_conf.tmpl b/templates/sysctl_conf.tmpl
2index 3030c52..60395f3 100644
3--- a/templates/sysctl_conf.tmpl
4+++ b/templates/sysctl_conf.tmpl
5@@ -26,3 +26,9 @@ net.ipv4.tcp_synack_retries = 3
6 # Reduce TCP KeepAlive timeout from 2 hrs to 30 mins.
7 net.ipv4.tcp_keepalive_time = 1800
8
9+# Extend the source port range for outgoing TCP connections.
10+net.ipv4.ip_local_port_range = 16384 61000
11+
12+# Allow early reuse of a same source port for outgoing connections.
13+net.ipv4.tcp_tw_reuse = 1
14+
15diff --git a/tests/unit/files/sysctl.conf b/tests/unit/files/sysctl.conf
16index a84d796..399a1bc 100644
17--- a/tests/unit/files/sysctl.conf
18+++ b/tests/unit/files/sysctl.conf
19@@ -19,3 +19,9 @@ net.ipv4.tcp_synack_retries = 3
20
21 # Reduce TCP KeepAlive timeout from 2 hrs to 30 mins.
22 net.ipv4.tcp_keepalive_time = 1800
23+
24+# Extend the source port range for outgoing TCP connections.
25+net.ipv4.ip_local_port_range = 16384 61000
26+
27+# Allow early reuse of a same source port for outgoing connections.
28+net.ipv4.tcp_tw_reuse = 1
29diff --git a/tests/unit/files/sysctl_core.conf b/tests/unit/files/sysctl_core.conf
30index b324a4d..1c7cccc 100644
31--- a/tests/unit/files/sysctl_core.conf
32+++ b/tests/unit/files/sysctl_core.conf
33@@ -13,3 +13,9 @@ net.ipv4.tcp_synack_retries = 3
34
35 # Reduce TCP KeepAlive timeout from 2 hrs to 30 mins.
36 net.ipv4.tcp_keepalive_time = 1800
37+
38+# Extend the source port range for outgoing TCP connections.
39+net.ipv4.ip_local_port_range = 16384 61000
40+
41+# Allow early reuse of a same source port for outgoing connections.
42+net.ipv4.tcp_tw_reuse = 1
43diff --git a/tests/unit/files/sysctl_core_default_qdisc.conf b/tests/unit/files/sysctl_core_default_qdisc.conf
44index b9e4701..0509bb2 100644
45--- a/tests/unit/files/sysctl_core_default_qdisc.conf
46+++ b/tests/unit/files/sysctl_core_default_qdisc.conf
47@@ -14,3 +14,9 @@ net.ipv4.tcp_synack_retries = 3
48
49 # Reduce TCP KeepAlive timeout from 2 hrs to 30 mins.
50 net.ipv4.tcp_keepalive_time = 1800
51+
52+# Extend the source port range for outgoing TCP connections.
53+net.ipv4.ip_local_port_range = 16384 61000
54+
55+# Allow early reuse of a same source port for outgoing connections.
56+net.ipv4.tcp_tw_reuse = 1
57diff --git a/tests/unit/files/sysctl_core_default_qdisc_none.conf b/tests/unit/files/sysctl_core_default_qdisc_none.conf
58index b324a4d..1c7cccc 100644
59--- a/tests/unit/files/sysctl_core_default_qdisc_none.conf
60+++ b/tests/unit/files/sysctl_core_default_qdisc_none.conf
61@@ -13,3 +13,9 @@ net.ipv4.tcp_synack_retries = 3
62
63 # Reduce TCP KeepAlive timeout from 2 hrs to 30 mins.
64 net.ipv4.tcp_keepalive_time = 1800
65+
66+# Extend the source port range for outgoing TCP connections.
67+net.ipv4.ip_local_port_range = 16384 61000
68+
69+# Allow early reuse of a same source port for outgoing connections.
70+net.ipv4.tcp_tw_reuse = 1
71diff --git a/tests/unit/files/sysctl_net_tcp_congestion_control.conf b/tests/unit/files/sysctl_net_tcp_congestion_control.conf
72index 275e6ef..e278789 100644
73--- a/tests/unit/files/sysctl_net_tcp_congestion_control.conf
74+++ b/tests/unit/files/sysctl_net_tcp_congestion_control.conf
75@@ -15,3 +15,9 @@ net.ipv4.tcp_synack_retries = 3
76
77 # Reduce TCP KeepAlive timeout from 2 hrs to 30 mins.
78 net.ipv4.tcp_keepalive_time = 1800
79+
80+# Extend the source port range for outgoing TCP connections.
81+net.ipv4.ip_local_port_range = 16384 61000
82+
83+# Allow early reuse of a same source port for outgoing connections.
84+net.ipv4.tcp_tw_reuse = 1
85diff --git a/tests/unit/files/sysctl_net_tcp_congestion_control_bbr2.conf b/tests/unit/files/sysctl_net_tcp_congestion_control_bbr2.conf
86index 820632a..fc1ed57 100644
87--- a/tests/unit/files/sysctl_net_tcp_congestion_control_bbr2.conf
88+++ b/tests/unit/files/sysctl_net_tcp_congestion_control_bbr2.conf
89@@ -15,3 +15,9 @@ net.ipv4.tcp_synack_retries = 3
90
91 # Reduce TCP KeepAlive timeout from 2 hrs to 30 mins.
92 net.ipv4.tcp_keepalive_time = 1800
93+
94+# Extend the source port range for outgoing TCP connections.
95+net.ipv4.ip_local_port_range = 16384 61000
96+
97+# Allow early reuse of a same source port for outgoing connections.
98+net.ipv4.tcp_tw_reuse = 1
99diff --git a/tests/unit/files/sysctl_net_tcp_congestion_control_no_bbr.conf b/tests/unit/files/sysctl_net_tcp_congestion_control_no_bbr.conf
100index b324a4d..1c7cccc 100644
101--- a/tests/unit/files/sysctl_net_tcp_congestion_control_no_bbr.conf
102+++ b/tests/unit/files/sysctl_net_tcp_congestion_control_no_bbr.conf
103@@ -13,3 +13,9 @@ net.ipv4.tcp_synack_retries = 3
104
105 # Reduce TCP KeepAlive timeout from 2 hrs to 30 mins.
106 net.ipv4.tcp_keepalive_time = 1800
107+
108+# Extend the source port range for outgoing TCP connections.
109+net.ipv4.ip_local_port_range = 16384 61000
110+
111+# Allow early reuse of a same source port for outgoing connections.
112+net.ipv4.tcp_tw_reuse = 1
113diff --git a/tests/unit/files/sysctl_net_tcp_mem.conf b/tests/unit/files/sysctl_net_tcp_mem.conf
114index a530d8e..793856a 100644
115--- a/tests/unit/files/sysctl_net_tcp_mem.conf
116+++ b/tests/unit/files/sysctl_net_tcp_mem.conf
117@@ -16,3 +16,9 @@ net.ipv4.tcp_synack_retries = 3
118
119 # Reduce TCP KeepAlive timeout from 2 hrs to 30 mins.
120 net.ipv4.tcp_keepalive_time = 1800
121+
122+# Extend the source port range for outgoing TCP connections.
123+net.ipv4.ip_local_port_range = 16384 61000
124+
125+# Allow early reuse of a same source port for outgoing connections.
126+net.ipv4.tcp_tw_reuse = 1
127diff --git a/tests/unit/files/sysctl_net_tcp_mem_none.conf b/tests/unit/files/sysctl_net_tcp_mem_none.conf
128index b324a4d..1c7cccc 100644
129--- a/tests/unit/files/sysctl_net_tcp_mem_none.conf
130+++ b/tests/unit/files/sysctl_net_tcp_mem_none.conf
131@@ -13,3 +13,9 @@ net.ipv4.tcp_synack_retries = 3
132
133 # Reduce TCP KeepAlive timeout from 2 hrs to 30 mins.
134 net.ipv4.tcp_keepalive_time = 1800
135+
136+# Extend the source port range for outgoing TCP connections.
137+net.ipv4.ip_local_port_range = 16384 61000
138+
139+# Allow early reuse of a same source port for outgoing connections.
140+net.ipv4.tcp_tw_reuse = 1

Subscribers

People subscribed via source and target branches