Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp738134lqc; Fri, 8 Mar 2024 10:09:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXf49gMtcqGMHvKl3f3yosUL0q9t+CZB41DPAsAnUHKxIGwB3FWb5vZptEYtOIZVs/b1TH0sMaPNlKP7r1y+mZMWIv54sMe9I0525S3jg== X-Google-Smtp-Source: AGHT+IHZlqUMNupzbt1WnTMDel2/qt38enq2JmvaJQceitVoqtiZiC0wMBNcES8fzSkfAFeiuf+a X-Received: by 2002:a05:6a20:7da2:b0:1a1:6f1c:454d with SMTP id v34-20020a056a207da200b001a16f1c454dmr7749727pzj.13.1709921354970; Fri, 08 Mar 2024 10:09:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709921354; cv=pass; d=google.com; s=arc-20160816; b=ckb8TXu9RzL1efJ0tm5Y5YKx1e05053YhFPrg9lriFXz/8AjIuth3yK2pmHTYbPOjD lFtpreQoXR62CJKrgXDxYKvvyo8up+HrGgKFiB56oFy4VeBsIKmsX666IdV1aNWzJH/v VFUbipZmCmXbSrqwQsCfrfRrIvlhsTJog6sKNjxHr1cCemT0K4A7EbVsCtApRC/fw5XS E5BeDqcvH45+47W0D11S0VU4+TRAnc0uIJJDee56rzqC+/8Hy5UDcjVzKKE3+JD9+Har GDRLm7UEZpE2xzxU6gkhF9OOxws480B2ymDqSeHbETuY43cRi5AlweURrGTOIsyaYBhl E71Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=k/LPeVMAaDTA0hmizWZ8Sbr7Zt2+Vn5WjZ4CrjE5hPE=; fh=NEk22Tcbcau6a5mXZaGUzPoQ6gUjvGxFzQRrXPBBl+M=; b=S5wYQjEGPSTtGPUTsLf7Go0ppo8AkKOQ4cX2CQpCf/0rp7eO5Q4nASRiUYZ6qnwwjP fsd4I4pXLFkJ9mEz1L4WYc0ychcB4fqwiAnW+haNq0VUUfXkfyGmw4gI+DmqjSWrlcPU 1RfuyVJv9OWFUByJA60c6asWAa07Fk+4eeF/60qC0fc8ScEtC9Hux9hd/q9g0gP2AxQn GuXlAoahCmcPqyEs9NxK5SjOoPWqBdplZnNOXo8M6cwDwf2buizfAP7W4HtXsfbnt+AJ Ct+z5t3TgoZRKW5lOQKKn6VfNlZb1SSTCsXmc1e8VApMw+Ftptw2Otgarzl/r5aF14bQ RTtg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MMmblmQM; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-nfs+bounces-2244-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2244-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b63-20020a62cf42000000b006e48fd5e403si8924311pfg.238.2024.03.08.10.09.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 10:09:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2244-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MMmblmQM; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-nfs+bounces-2244-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2244-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A27D828257E for ; Fri, 8 Mar 2024 18:09:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AD3E540861; Fri, 8 Mar 2024 18:09:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MMmblmQM" X-Original-To: linux-nfs@vger.kernel.org Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 102BE36D for ; Fri, 8 Mar 2024 18:09:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709921352; cv=none; b=lC4Leq8JXBREyEX2zGMrKJehbPfUe3GTz/NPejA1fSGEOh8fYEoqmijA4S9RRprfsXpa/mOWb8MLH9jC+Pn8ao2QSLTjwDxweLBDK/BQQ9aHmaMTAQlZIc66eMXXNzyEi6mAmI46/yTlXs+WBNlZqbsmDYfHLJQnNIxYj8KIN08= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709921352; c=relaxed/simple; bh=Lv22lk5NMI16wvgEc0t61jOH94iY37eFHtzYOIQhS3k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=szX0LNYL0H8ulbRr4EYTXyDFi4dj/StEEXMFtFcfEE9DxLGy69EXnof/819cRdBu/smzlgd/TLFfNfm5UpIfHOW7jabU0iil/vgwdSO100AjPzWm9ZykNrjgDhN77vI1URlydDwQz1wo1S1hX71i8GL0tH/QBgT3KkqiKeyw0Wg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MMmblmQM; arc=none smtp.client-ip=209.85.219.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qv1-f51.google.com with SMTP id 6a1803df08f44-690b874cacfso4403986d6.1 for ; Fri, 08 Mar 2024 10:09:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709921350; x=1710526150; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=k/LPeVMAaDTA0hmizWZ8Sbr7Zt2+Vn5WjZ4CrjE5hPE=; b=MMmblmQMsaRgb+niSxTKgCaT/XBOsnlP9h02YOH9513EaltqagRv6HT8/xlr8efifP rDRwlMVA2sF6nMVsbVqO7O2R7xDUviDINw8jakfQXP87Nuph2jjZiDP05qQ5FNCez8uA +s+AElmRq59yR/buBA/6FGT3+dwrxqs9Y/8iv1W+BWM6EVjTzkRsQDwOIqmkMeHcsSek 9LfrJIxhg8JBLJzlO3aa+j0faYM7NxEE/ZAorVpcr8ueKAf3htP71PXTGN2PtgbmKIqS /68yiipqwZa6FloGTCZeR18OI7TsJF9UYb8P0Wfu++jNWzIQowpIsRjVksiXdNefRLkV IK4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709921350; x=1710526150; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=k/LPeVMAaDTA0hmizWZ8Sbr7Zt2+Vn5WjZ4CrjE5hPE=; b=KjBplbgPORkH+DEkgdi/aj4QC3zRMi0IDlPtk8+J98le5IKsqQfpIVtz0ErCGlGWAU /M1Es+YXZDt1MSaI4bf4W9OemakGwhcdd+dWNYfcC03gGyZIg0H30kK4wv3SvxRBQsa6 J5oli5zhe7Uj1fL1Ckv45i+q5tggqGc2IhPHU3sVLpFx2O7B4pkKvmKo6nWKfZzDp7z/ fdX5ZYqN8a7ODInZyEAwwMrZ0yVThNPti7vbFaUXbcEIKTm0BcioR2N08Wr+/7w3hAvj EE9pnprWKqinqAOt2BO7ZQINJ1ri1zCT8WZ60RYVYPlKsqiFxOQ7ZrJnWomH+vR/7efl oxcg== X-Gm-Message-State: AOJu0Yy6MTmke6/K1+1OI2REMWsTuJil+LA06/+5dKtWn96CVR7VXbwl IjjE0zd1tk5CLZMIYWS98QyGKm3aNb0UZuJVUeh1bQPz+9zTQYQ= X-Received: by 2002:a0c:fe07:0:b0:690:b03f:f199 with SMTP id x7-20020a0cfe07000000b00690b03ff199mr4319665qvr.5.1709921349885; Fri, 08 Mar 2024 10:09:09 -0800 (PST) Received: from localhost.localdomain (c-73-145-170-161.hsd1.mi.comcast.net. [73.145.170.161]) by smtp.gmail.com with ESMTPSA id mg20-20020a056214561400b0068ff8bda6c7sm9925361qvb.92.2024.03.08.10.09.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 10:09:09 -0800 (PST) From: trondmy@gmail.com X-Google-Original-From: trond.myklebust@hammerspace.com To: Steve Dickson Cc: linux-nfs@vger.kernel.org Subject: [PATCH v2] nfsd: allow more than 64 backlogged connections Date: Fri, 8 Mar 2024 13:02:23 -0500 Message-ID: <20240308180223.2965601-1-trond.myklebust@hammerspace.com> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Trond Myklebust When creating a listener socket to be handed to /proc/fs/nfsd/portlist, we currently limit the number of backlogged connections to 64. Since that value was chosen in 2006, the scale at which data centres operate has changed significantly. Given a modern server with many thousands of clients, a limit of 64 connections can create bottlenecks, particularly at at boot time. Let's use the POSIX-sanctioned maximum value of SOMAXCONN. Signed-off-by: Trond Myklebust --- v2: Use SOMAXCONN instead of a value of -1. utils/nfsd/nfssvc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/nfsd/nfssvc.c b/utils/nfsd/nfssvc.c index 46452d972407..9650cecee986 100644 --- a/utils/nfsd/nfssvc.c +++ b/utils/nfsd/nfssvc.c @@ -205,7 +205,8 @@ nfssvc_setfds(const struct addrinfo *hints, const char *node, const char *port) rc = errno; goto error; } - if (addr->ai_protocol == IPPROTO_TCP && listen(sockfd, 64)) { + if (addr->ai_protocol == IPPROTO_TCP && + listen(sockfd, SOMAXCONN)) { xlog(L_ERROR, "unable to create listening socket: " "errno %d (%m)", errno); rc = errno; -- 2.44.0