From d1cd6a961772e0a76052642956ef7d35bdab35db Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Fri, 24 Apr 2015 11:34:02 +0100 Subject: [PATCH] Set tcp_tw_reuse for swift storage hosts For swift storage hosts we are seeing a lot of connections in TIME WAIT status, violating nf_conntrack. Setting tcp_tw_reuse should help alleviate this. Additionally, in order for tcp_tw_reuse to be set safely we need to ensure nf_conntrack is loaded. Change-Id: I4392c4022a9a5a884d07eb6fbf27093f0b16f914 Closes-Bug: #1441363 --- tasks/swift_storage_hosts_setup.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tasks/swift_storage_hosts_setup.yml b/tasks/swift_storage_hosts_setup.yml index f7a5d846..335c3a7c 100644 --- a/tasks/swift_storage_hosts_setup.yml +++ b/tasks/swift_storage_hosts_setup.yml @@ -13,6 +13,18 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: "Enable nf_conntrack" + modprobe: + name: "nf_conntrack" + state: present + +- name: "Set sysctl tcp_tw_reuse" + sysctl: + name: "net.ipv4.tcp_tw_reuse" + state: present + value: "1" + sysctl_set: yes + # We need swift_vars to exist for the "swift_vars.drives is defined check" to work - name: "Set swift_vars if undefined" set_fact: