a3470f
From 4448795af501355f3893aed05551ee62551e8438 Mon Sep 17 00:00:00 2001
a3470f
From: Milind Changire <mchangir@redhat.com>
a3470f
Date: Fri, 13 Apr 2018 14:51:32 +0530
a3470f
Subject: [PATCH 256/260] rpc: set listen-backlog to high value
a3470f
a3470f
Problem:
a3470f
On node reboot, when glusterd starts volumes rapidly, there's a flood of
a3470f
connections from the bricks to glusterd and from the self-heal daemons
a3470f
to the bricks. This causes SYN Flooding and dropped connections when the
a3470f
listen-backlog is not enough to hold the pending connections to
a3470f
compensate for the rate at which connections are accepted by the RPC
a3470f
layer.
a3470f
a3470f
Solution:
a3470f
Increase the listen-backlog value to 1024. This is a partial solution.
a3470f
Part of the solution is to rearm the listener socket early for quicker
a3470f
accept() of connections.
a3470f
See commit 6964640a977cb10c0c95a94e03c229918fa6eca8 (change 19833)
a3470f
a3470f
mainline:
a3470f
> Reviewed-on: https://review.gluster.org/19836
a3470f
> Change-Id: I56781149919dd6e18cc43884234c6f60f2c93f88
a3470f
> fixes: bz#1564600
a3470f
> Signed-off-by: Milind Changire <mchangir@redhat.com>
a3470f
a3470f
Change-Id: I1d7ac940eb5410cdbf7508a24bfdfc052b35170b
a3470f
BUG: 1563804
a3470f
Signed-off-by: Milind Changire <mchangir@redhat.com>
a3470f
Reviewed-on: https://code.engineering.redhat.com/gerrit/135557
a3470f
Tested-by: RHGS Build Bot <nigelb@redhat.com>
a3470f
Reviewed-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
a3470f
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
a3470f
---
a3470f
 rpc/rpc-transport/socket/src/socket.c | 7 +++++++
a3470f
 1 file changed, 7 insertions(+)
a3470f
a3470f
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
a3470f
index 157b5b7..a6be911 100644
a3470f
--- a/rpc/rpc-transport/socket/src/socket.c
a3470f
+++ b/rpc/rpc-transport/socket/src/socket.c
a3470f
@@ -4613,6 +4613,13 @@ struct volume_options options[] = {
a3470f
           .min   = GF_MIN_SOCKET_WINDOW_SIZE,
a3470f
           .max   = GF_MAX_SOCKET_WINDOW_SIZE
a3470f
         },
a3470f
+        { .key   = {"transport.listen-backlog"},
a3470f
+          .type  = GF_OPTION_TYPE_SIZET,
a3470f
+          .description = "This option uses the value of backlog argument that "
a3470f
+                         "defines the maximum length to which the queue of "
a3470f
+                         "pending connections for socket fd may grow.",
a3470f
+          .default_value = "1024",
a3470f
+        },
a3470f
         { .key   = {"transport.tcp-user-timeout"},
a3470f
           .type  = GF_OPTION_TYPE_INT,
a3470f
           .default_value = "0"
a3470f
-- 
a3470f
1.8.3.1
a3470f