Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp531670lqb; Wed, 29 May 2024 03:19:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWzQ6OcA1bMGbOZ9Xl7B8HuyiLcqFMvgJ56Z8LBBR3KtJDE6gYWWAtBVpdvpiC0n3AsiXb/iFQOqz7+/D00GQM5wMar1cHPqFR8hhOR0g== X-Google-Smtp-Source: AGHT+IGvF8kP2nCzpsoqSyvPwfTjbmR5zzL7dsoLyV9IqVD1le8gDddlQVqcU+chwY6zPQKphhDs X-Received: by 2002:a05:620a:3636:b0:794:730e:ddbb with SMTP id af79cd13be357-794ab081996mr1443543385a.20.1716977955669; Wed, 29 May 2024 03:19:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716977955; cv=pass; d=google.com; s=arc-20160816; b=O7468x21tZEctMAvcWBTICc2pL6Rp5FfPInqN4kAGADtZH+93RpUUI5x9zbcXfhpaS BJpiIwRVOycGCkiDEFmkgo5j+EwJRh1JsgkAIntkQ2CnAPSZfN1ahQz3cltHlrnAQsGe mH6swi7klunrujR+vMzaRalYmeaN+FS8NDMP/KwqXw1fKViHVxz7px3DsTv2AXJiIHL5 kPS5NR5Xb1cHoYv5Mpyu9aK/uPlafsu/nA/RCxAG8z30m8R5dksrZw59iRy7y/nMuFKc NgX1UUjdu5EQuA6bLTxWByWHCoBq5ENwZr0TM0QG25kRtjgy79uzQ+apL9wqMydsf8bB ZUZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=4Vm8QJwrPDlseWEMBGEntuX8NC8tqdJObdJ0cjdPNXM=; fh=TmGhaif5GQxhdMT9wChFahcUOzYCvTDsYG68b1xSTI8=; b=Qwm2Dv6IKSB5lsrBEOQe5W8iIPs3BP4qz9F6dT5RfWyJaYhZ1Kbp2ZxCQfEXHhPwgY DDvTW42py34UJToEVlyp0ypgybZXOJcn1tExBquv4VkySSPmT9K+2AMofN0r49+pW55Z ENkPtNVcSFXey1ldZSx6YbW6nCFM1skKG5XyuBg/c/AWGCYQZsA9LOfZoeDEEqmLPyp1 qbTe8gQjWB+fdsqC/LK89MqzMk+UPvvJo02f5sDhKZrzbkob+Mw7v/Op/roTR2T+9TDn eJwRl/VxR7XU+l8G08PAeRNHc3LgmBwg8qJr8Q7ZMSKGLYHoQN1oME2w4v9xcI7aeDmP /F+w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@smartx-com.20230601.gappssmtp.com header.s=20230601 header.b="swRBNM/+"; arc=pass (i=1 dkim=pass dkdomain=smartx-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-nfs+bounces-3469-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3469-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794abd61328si1345152185a.755.2024.05.29.03.19.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 03:19:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3469-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@smartx-com.20230601.gappssmtp.com header.s=20230601 header.b="swRBNM/+"; arc=pass (i=1 dkim=pass dkdomain=smartx-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-nfs+bounces-3469-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3469-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 244081C20E2C for ; Wed, 29 May 2024 10:19:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C07D169ADF; Wed, 29 May 2024 10:19:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=smartx-com.20230601.gappssmtp.com header.i=@smartx-com.20230601.gappssmtp.com header.b="swRBNM/+" X-Original-To: linux-nfs@vger.kernel.org Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (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 774A04D11B for ; Wed, 29 May 2024 10:19:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716977954; cv=none; b=aUyZ2EqJvWZ78TvS7NtBdIS3nFK6Ma0biI8WiUOR6lu99rUSQl/uRpsFb8soTHBKtq4Udu08L9yWUx7YK9wql30mNvnE0TZdSMptNF6XO9M0Wj88mHBSi+7/ptkA70gpfrPVnxM/tYI08mqSXOrUkpWa0eQxZKG9TEPJ6y9e1Eg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716977954; c=relaxed/simple; bh=LSTWg+rsvuFYOkOF6cwSnUA7hCVBfzA0aBKlocHZZAs=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=m7ch3fPsgfSAcOyio1lH0CYUTl/IeXGYG46UZWP/qqSIgXbusA9gG/FS1WPd72eI32aS1lcHVpNPRTpjqPVAcbWHXnGGRYSvBVUGkfFloCaXD0UelPSGbwZCJ8D1VeFuTEpFR8TI0Bm1sbOBqZpjM7GQaqHbUM30TP06gibV93c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=smartx.com; spf=none smtp.mailfrom=smartx.com; dkim=pass (2048-bit key) header.d=smartx-com.20230601.gappssmtp.com header.i=@smartx-com.20230601.gappssmtp.com header.b=swRBNM/+; arc=none smtp.client-ip=209.85.167.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=smartx.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=smartx.com Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-52b6ccfdf28so218025e87.2 for ; Wed, 29 May 2024 03:19:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20230601.gappssmtp.com; s=20230601; t=1716977951; x=1717582751; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=4Vm8QJwrPDlseWEMBGEntuX8NC8tqdJObdJ0cjdPNXM=; b=swRBNM/+vg0wzD+bl6avAlRBFrgASE/40APOry8mRhH5xOqN2qxvlPYZXFyhgu6/qe dhnDpNQVoGLKXC1hMMX/MLNKFafxFYIQ2K+HzB3ciihpGO+zc+d7O9bk8OpqXE0Ow1oy f5LrrRswi6lS3WyUS54TRKAKnto7TKtp683TmXeBJoNRyMp6cYOIAGih+ZZ7Iggx0OqT LuVnz+kTqCNOzI5SMAfTgEfMDQJeGeYLP+fVZ2OV/0jAZcsgpXnOGf+v+7IcAl5276Y9 Q5viBtsFLH4mWlNSb7lXyYomzPCXowagJcoop+IxV8Y6fdHaERv/v+kncnZ6hm3ZmO+G zFSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716977951; x=1717582751; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4Vm8QJwrPDlseWEMBGEntuX8NC8tqdJObdJ0cjdPNXM=; b=FnqjnHuILuhjFanrl3w3+g/Y0hgYtY8ifhyTxUW6Xuj4/ZSrKyvegqFRYeH/WMhXbs cKP2//FZMWVYKJp+h5A1zboao/wXOv1KVhei1Qqq59SN1mOII/dcSmhKWoznbR/zD1pH qG93BEjHSP5sD28RmK7o1BGNldLv+msRaBPKc97Nk5XigSKRCZgoCbZeRiGsiv95geFX BG/nX40UvV5FPjI7QT9gEWheVV3ycK2hIiNJOAToNLMkPuMpOw+/OPDgutl2UIJk+NJS Vg/k4ovLoS+VCtjYcZwa2Ot0qNEAcXJI5ocgPK0qGNux6iMsKsyrHiwimx5R9ozmN5UB MiHw== X-Gm-Message-State: AOJu0Yz21oB0F8ExikN6j1869JPm4jfIkDfcIw5upZiA+YLQDtDXshCO 5//jEET5FceOsL2N4mr0KO5xS6OCPHGKNMAABu9exenjisY9N2c0pcsZgxpe6qLwXXiEMe1QrHv 09KU6/NeNw9s3N6e6iU7CSDebYulS4LS7Z03JtB3MVGyr75ITUZ0+JyTzHuE= X-Received: by 2002:a19:4314:0:b0:51a:c8ba:d908 with SMTP id 2adb3069b0e04-52966ca8374mr9238761e87.62.1716977949578; Wed, 29 May 2024 03:19:09 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: Zhitao Li Date: Wed, 29 May 2024 18:18:54 +0800 Message-ID: Subject: Re: Question: How to customize retransmission timeout of unacknowledged NFS v3 TCP packet? To: Trond Myklebust , Anna Schumaker , Chuck Lever , Jeff Layton , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, Ping Huang Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Essentially, we need a mechanism to quickly reconnect with new nfs-server nodes for failover. I also tried to adjust mount options like "timeo" to 10s and "retrans" to 1, and found that they don't work, either. It seems that the NFS v3 client always tries to reconnect after some request hangs for 3 minutes no matter what "timeo" and "retrans" is. On Wed, May 29, 2024 at 6:10=E2=80=AFPM Zhitao Li wr= ote: > > Hi, dear community, > > In our NFS environment, NFS client mounts remote NFS export with its > VIP. The VIP can be assigned to another server node for failover. > However, the NFS client sends the unacknowledged packet 50s+ after the > VIP is ready on the new node, which is because of the exponential > backoff retransmission algorithm. I tried to set this parameter > "tcp_retries2" smaller so that the NFS client can reconnect with the > new node more quickly, but this parameter didn't take effect. From > tcpdump entries as follows, > 1. At "2024-05-29 11:47:00", ARP is updated. > 2. At "2024-05-29 11:47:52" , the NFS client retried to send the packe= t. > 3. Then the connection is reset and a new connection starts. > > I guess the parameter just takes effect for applications and doesn't > take effect for kernel modules like the NFS client. Could anyone give > some advice to customize retransmission timeout of unacknowledged NFS > v3 TCP packet? > > > OS: Linux kernel v6.7.0 > NFS mount options: > vers=3D3,nolock,proto=3Dtcp,rsize=3D1048576,wsize=3D1048576,hard,timeo=3D= 600,retrans=3D2,noresvport > > tcp_retries2: > [root@vm-play zhitaoli]# sysctl -w net.ipv4.tcp_retries2=3D5 > net.ipv4.tcp_retries2 =3D 5 > [root@vm-play zhitaoli]# cat /proc/sys/net/ipv4/tcp_retries2 > 5 > > tcpdump entries: > > 2024-05-29 11:46:02.331891 52:54:00:1d:a4:24 > 52:54:00:a0:93:93, > ethertype IPv4 (0x0800), length 190: 10.125.1.214.58428 > > 10.125.1.85.nfs: Flags [P.], seq 129897:130021, ack 171633, win 2356, > options [nop,nop,TS val 1973659245 ecr 28456 > 58566], length 124: NFS request xid 1954624602 120 access fh > Unknown/43000001180100000000000000DE40020000000000F439000000000000000000 > NFS_ACCESS_READ|NFS_ACCESS_LOOKUP|NFS_ACCESS_MODIFY|NFS_ACCESS_EXTEND|NFS= _ACCESS_DELETE > > 2024-05-29 11:46:02.542836 52:54:00:1d:a4:24 > 52:54:00:a0:93:93, > ethertype IPv4 (0x0800), length 190: 10.125.1.214.58428 > > 10.125.1.85.nfs: Flags [P.], seq 129897:130021, ack 171633, win 2356, > options [nop,nop,TS val 1973659456 ecr 28456 > 58566], length 124: NFS request xid 1954624602 120 access fh > Unknown/43000001180100000000000000DE40020000000000F439000000000000000000 > NFS_ACCESS_READ|NFS_ACCESS_LOOKUP|NFS_ACCESS_MODIFY|NFS_ACCESS_EXTEND|NFS= _ACCESS_DELETE > > 2024-05-29 11:46:02.751013 52:54:00:1d:a4:24 > 52:54:00:a0:93:93, > ethertype IPv4 (0x0800), length 190: 10.125.1.214.58428 > > 10.125.1.85.nfs: Flags [P.], seq 129897:130021, ack 171633, win 2356, > options [nop,nop,TS val 1973659664 ecr 28456 > 58566], length 124: NFS request xid 1954624602 120 access fh > Unknown/43000001180100000000000000DE40020000000000F439000000000000000000 > NFS_ACCESS_READ|NFS_ACCESS_LOOKUP|NFS_ACCESS_MODIFY|NFS_ACCESS_EXTEND|NFS= _ACCESS_DELETE > > 2024-05-29 11:46:03.166958 52:54:00:1d:a4:24 > 52:54:00:a0:93:93, > ethertype IPv4 (0x0800), length 190: 10.125.1.214.58428 > > 10.125.1.85.nfs: Flags [P.], seq 129897:130021, ack 171633, win 2356, > options [nop,nop,TS val 1973660080 ecr 28456 > 58566], length 124: NFS request xid 1954624602 120 access fh > Unknown/43000001180100000000000000DE40020000000000F439000000000000000000 > NFS_ACCESS_READ|NFS_ACCESS_LOOKUP|NFS_ACCESS_MODIFY|NFS_ACCESS_EXTEND|NFS= _ACCESS_DELETE > > 2024-05-29 11:46:04.046882 52:54:00:1d:a4:24 > 52:54:00:a0:93:93, > ethertype IPv4 (0x0800), length 190: 10.125.1.214.58428 > > 10.125.1.85.nfs: Flags [P.], seq 129897:130021, ack 171633, win 2356, > options [nop,nop,TS val 1973660960 ecr 28456 > 58566], length 124: NFS request xid 1954624602 120 access fh > Unknown/43000001180100000000000000DE40020000000000F439000000000000000000 > NFS_ACCESS_READ|NFS_ACCESS_LOOKUP|NFS_ACCESS_MODIFY|NFS_ACCESS_EXTEND|NFS= _ACCESS_DELETE > > 2024-05-29 11:46:05.710910 52:54:00:1d:a4:24 > 52:54:00:a0:93:93, > ethertype IPv4 (0x0800), length 190: 10.125.1.214.58428 > > 10.125.1.85.nfs: Flags [P.], seq 129897:130021, ack 171633, win 2356, > options [nop,nop,TS val 1973662624 ecr 28456 > 58566], length 124: NFS request xid 1954624602 120 access fh > Unknown/43000001180100000000000000DE40020000000000F439000000000000000000 > NFS_ACCESS_READ|NFS_ACCESS_LOOKUP|NFS_ACCESS_MODIFY|NFS_ACCESS_EXTEND|NFS= _ACCESS_DELETE > > 2024-05-29 11:46:09.039310 52:54:00:1d:a4:24 > 52:54:00:a0:93:93, > ethertype IPv4 (0x0800), length 190: 10.125.1.214.58428 > > 10.125.1.85.nfs: Flags [P.], seq 129897:130021, ack 171633, win 2356, > options [nop,nop,TS val 1973665952 ecr 28456 > 58566], length 124: NFS request xid 1954624602 120 access fh > Unknown/43000001180100000000000000DE40020000000000F439000000000000000000 > NFS_ACCESS_READ|NFS_ACCESS_LOOKUP|NFS_ACCESS_MODIFY|NFS_ACCESS_EXTEND|NFS= _ACCESS_DELETE > > 2024-05-29 11:46:16.017889 52:54:00:1d:a4:24 > 52:54:00:a0:93:93, > ethertype IPv4 (0x0800), length 190: 10.125.1.214.58428 > > 10.125.1.85.nfs: Flags [P.], seq 129897:130021, ack 171633, win 2356, > options [nop,nop,TS val 1973672930 ecr 28456 > 58566], length 124: NFS request xid 1954624602 120 access fh > Unknown/43000001180100000000000000DE40020000000000F439000000000000000000 > NFS_ACCESS_READ|NFS_ACCESS_LOOKUP|NFS_ACCESS_MODIFY|NFS_ACCESS_EXTEND|NFS= _ACCESS_DELETE > > 2024-05-29 11:46:29.326891 52:54:00:1d:a4:24 > 52:54:00:a0:93:93, > ethertype IPv4 (0x0800), length 190: 10.125.1.214.58428 > > 10.125.1.85.nfs: Flags [P.], seq 129897:130021, ack 171633, win 2356, > options [nop,nop,TS val 1973686240 ecr 28456 > 58566], length 124: NFS request xid 1954624602 120 access fh > Unknown/43000001180100000000000000DE40020000000000F439000000000000000000 > NFS_ACCESS_READ|NFS_ACCESS_LOOKUP|NFS_ACCESS_MODIFY|NFS_ACCESS_EXTEND|NFS= _ACCESS_DELETE > > 2024-05-29 11:46:55.950915 52:54:00:1d:a4:24 > 52:54:00:a0:93:93, > ethertype IPv4 (0x0800), length 190: 10.125.1.214.58428 > > 10.125.1.85.nfs: Flags [P.], seq 129897:130021, ack 171633, win 2356, > options [nop,nop,TS val 1973712864 ecr 28456 > 58566], length 124: NFS request xid 1954624602 120 access fh > Unknown/43000001180100000000000000DE40020000000000F439000000000000000000 > NFS_ACCESS_READ|NFS_ACCESS_LOOKUP|NFS_ACCESS_MODIFY|NFS_ACCESS_EXTEND|NFS= _ACCESS_DELETE > > 2024-05-29 11:47:00.379844 52:54:00:13:1f:34 > Broadcast, ethertype > ARP (0x0806), length 60: Reply 10.125.1.85 is-at 52:54:00:13:1f:34, > length 46 > > 2024-05-29 11:47:52.271192 52:54:00:1d:a4:24 > 52:54:00:13:1f:34, > ethertype IPv4 (0x0800), length 190: 10.125.1.214.58428 > > 10.125.1.85.nfs: Flags [P.], seq 129897:130021, ack 171633, win 2356, > options [nop,nop,TS val 1973769184 ecr 28456 > 58566], length 124: NFS request xid 1954624602 120 access fh > Unknown/43000001180100000000000000DE40020000000000F439000000000000000000 > NFS_ACCESS_READ|NFS_ACCESS_LOOKUP|NFS_ACCESS_MODIFY|NFS_ACCESS_EXTEND|NFS= _ACCESS_DELETE > > 2024-05-29 11:47:52.272041 52:54:00:13:1f:34 > 52:54:00:1d:a4:24, > ethertype IPv4 (0x0800), length 54: 10.125.1.85.nfs > > 10.125.1.214.58428: Flags [R], seq 1148562527, win 0, length 0 > > 2024-05-29 11:47:52.272909 52:54:00:1d:a4:24 > 52:54:00:13:1f:34, > ethertype IPv4 (0x0800), length 74: 10.125.1.214.58428 > > 10.125.1.85.nfs: Flags [S], seq 1734997801, win 32120, options [mss > 1460,sackOK,TS val 1973769186 ecr 0,nop,wscale 7], length 0 > > 2024-05-29 11:47:52.273503 52:54:00:13:1f:34 > 52:54:00:1d:a4:24, > ethertype IPv4 (0x0800), length 74: 10.125.1.85.nfs > > 10.125.1.214.58428: Flags [S.], seq 1078843840, ack 1734997802, win > 28960, options [mss 1460,sackOK,TS val 2235915769 ecr > 1973769186,nop,wscale 7], length 0 > > > Best regards, > Zhitao Li