Linux-NFS Archive mirror
 help / color / mirror / Atom feed
From: Rik Theys <Rik.Theys@esat.kuleuven.be>
To: Rick Macklem <rick.macklem@gmail.com>
Cc: Benjamin Coddington <ben.coddington@hammerspace.com>,
	Linux Nfs <linux-nfs@vger.kernel.org>
Subject: Re: NFS4ERR_SEQ_MISORDERED errors and NFS client very slow
Date: Thu, 30 Apr 2026 19:04:26 +0200	[thread overview]
Message-ID: <fe5d8251-f92d-4732-a19a-bf92c4ea0cb9@esat.kuleuven.be> (raw)
In-Reply-To: <CAM5tNy63vtAAh1DsBFgPMiXDZReUCimR8nii=WFiAUv8LsJctQ@mail.gmail.com>

Hi,

On 4/30/26 5:35 PM, Rick Macklem wrote:
> On Thu, Apr 30, 2026 at 8:27 AM Rik Theys <Rik.Theys@esat.kuleuven.be> wrote:
>> Hi,
>>
>> On 4/30/26 5:02 PM, Rick Macklem wrote:
>>> On Thu, Apr 30, 2026 at 7:26 AM Rik Theys <Rik.Theys@esat.kuleuven.be> wrote:
>>>> Hi Benjamin,
>>>>
>>>> On 4/30/26 3:27 PM, Benjamin Coddington wrote:
>>>>> On 30 Apr 2026, at 2:53, Rik Theys wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> We have a Rocky 8 client running Linux 7.0.2 (kernel-ml from elrepo) that is an NFS client to a RHEL10 server.
>>>>>>
>>>>>> Lately we've noticed that NFS performance is very poor for certain workloads (We saw the same issue on the stock EL8 kernel, 6.18.20 and now 7.0.2). For example cloning git repositories is extremely slow.
>>>>>>
>>>>>> Looking at the server side there don't seem to be any saturations of the disk or network subsystems.
>>>>>>
>>>>>> I've taken a network dump between the client and server. In that dump I see that the server frequently responds to requests from the client with NFS4ERR_SEQ_MISORDERED (10063). What could be the cause of these mismatches? Is this always a client issue, or can this be caused by the server?
>>>>> This is something you shouldn't normally see and probably indicates a bug or
>>>>> serious problem.  From the client side you'd only expect this if you're
>>>>> doing a lot of task signaling so that the userland processes abandon RPCs.
>>>> Would there be any indications in the logs if this is the case?
>>>>
>>>>
>>>>> A packet capture is the best way to determine if the server is mis-reporting
>>>>> the sequencing problem, or if the client's sequencing is incorrect.  Given
>>>>> your description of the symptoms I'd also check to make sure your underlying
>>>>> network isn't doing something totally nuts like duplicating packets.
>>>> My previous capture was on the client, which is where I observed the
>>>> NFS4ERR_SEQ_MISORDERED messages. I've now taken a capture on the server
>>>> and there I do see some duplicate packets, but not a large percentage.
>>>> Should the NFS server not notice this is a duplicate packet and ignore it?
>>> Maybe it would be helpful if I gave you an explanation of when the server
>>> should (probably a MUST in RFC terminology) reply NFS4ERR_SEQ_MISORDERED.
>>>
>>> The first operation in most RPCs (for NFSv4.1/4.2) is SEQUENCE.
>>> If you look in SEQUENCE, when the session and slot# are the same as a
>>> previous RPC, the seq# normally increases by 1.
>>>
>>> If it is exact the same seq#, that should be a duplicate RPC (rest of RPC
>>> should be identical) and it should have been sent on a different TCP connection.
>>> This should not generate a NFS4ERR_SEQ_MISORDERED error.
>>>
>>> If the seq# is any value other than the same as or one greater than
>>> the previous RPC with same session and slot#, the server should
>>> reply NFS4ERR_SEQ_MISORDERED.
>>> --> If this happens, the server is behaving correctly, afaik.
>>>         Then, is this a client bug or a client feature?
>>>         That is more difficult to answer and maybe the Linux client
>>>         specialists can comment?
>>>         (I'd say it's probably a bug if neither "intr" nor "soft" options
>>>           are on the mount.)
>>>
>> Looking at the capture it seems that for the requests that trigger this
>> NFS4ERR_SEQ_MISORDERED, the sessionid is always the same. The slot id
>> varies (maybe these are different mounts all using the same tcp
>> connection, or concurrent I/O?). The seqid always seems to be 1, which
>> seems odd?
> The seq# == 1 is correct if (and only if) that is the first use of that slot#.
>
> The snippet you posted does not help, because it does not go from the
> start of the capture (which probably needs to be when the mount operation
> is done).
>
> You have to wade through it from the beginning looking for any entry
> that has the same session and slot#. (Sorry, I don't know a clever way
> to do this, if the capture is large. And, no, I am not volunteering to do
> that for you;-)

Going from the beginning is not easy as the problem doesn't seem to 
always surface immediately. It can take from a few hours to a few days 
for it to trigger.

I went back to my original capture and applied the following tshark 
filter to show only some fields:

tshark -r kwak.pcap -T fields -E header=y -e ip.src -e ip.dst -e 
nfs.seqid -e nfs.slotid

 From that output I see that the seqid increments nicely with slotid=0 
and the same seqid used in both directions (once):

10.86.18.14     10.87.29.113    0x05b4f549      0
10.87.29.113    10.86.18.14     0x05b4f54a      0
10.86.18.14     10.87.29.113    0x05b4f54a      0
10.87.29.113    10.86.18.14     0x05b4f54b      0
10.86.18.14     10.87.29.113    0x05b4f54b      0
10.87.29.113    10.86.18.14     0x05b4f54c,0x00000000   0
10.86.18.14     10.87.29.113    0x05b4f54c      0
10.87.29.113    10.86.18.14     0x05b4f54d      0
10.86.18.14     10.87.29.113    0x05b4f54d      0
10.87.29.113    10.86.18.14     0x05b4f54e      0
10.86.18.14     10.87.29.113    0x05b4f54e      0
10.87.29.113    10.86.18.14     0x05b4f54f      0
10.86.18.14     10.87.29.113    0x05b4f54f      0
10.87.29.113    10.86.18.14     0x00000001      209
10.87.29.113    10.86.18.14     0x00000001      44
10.87.29.113    10.86.18.14     0x00000001      39
10.87.29.113    10.86.18.14     0x00000001      642
10.87.29.113    10.86.18.14     0x00000001      408
10.87.29.113    10.86.18.14     0x00000001      574
10.87.29.113    10.86.18.14     0x00000001      397
10.87.29.113    10.86.18.14     0x00000001      666
10.87.29.113    10.86.18.14     0x00000001      471
10.87.29.113    10.86.18.14     0x00000001      605
10.87.29.113    10.86.18.14     0x00000001      82
10.86.18.14     10.87.29.113
10.86.18.14     10.87.29.113
10.86.18.14     10.87.29.113
10.86.18.14     10.87.29.113
10.87.29.113    10.86.18.14 
  0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000000,0x00000001 
870,172,685,663,331,512,739,882,417,69,710,376,965,195,809,323,640,359,897,303,662,346,949,871,358,37,948,129,825,227,636,102,539,165,523,998,989,975
10.87.29.113    10.86.18.14 
  0x00000001,0x00000000,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001 
986,286,981,827,220,918,995,188,990,742,406,1009,805,302,706,1001,115,983,723,335,393,426,413,506,58,460
10.87.29.113    10.86.18.14 
  0x00000001,0x00000001,0x00000001,0x00000001,0x00000001 394,326,469,496,112
10.87.29.113    10.86.18.14     0x00000001      498
10.87.29.113    10.86.18.14     0x00000001      118
10.87.29.113    10.86.18.14     0x00000001      392
10.87.29.113    10.86.18.14     0x00000001      328

Then the seqid starts to become 0x00000001 with slotid numbers that are 
not sequential. Maybe that's not required.

I've written a small python script to parse this output to see if the 
src,dst,seqid,slotid is unique during the capture.

All the packets with 0x00000001 seem to exist exactly 3 times in the 
capture with the same slotid!?


Regards,

Rik

-- 
Rik Theys
System Engineer
KU Leuven - Dept. Elektrotechniek (ESAT)
Kasteelpark Arenberg 10 bus 2440  - B-3001 Leuven-Heverlee
+32(0)16/32.11.07
----------------------------------------------------------------
<<Any errors in spelling, tact or fact are transmission errors>>


  parent reply	other threads:[~2026-04-30 17:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30  6:53 NFS4ERR_SEQ_MISORDERED errors and NFS client very slow Rik Theys
2026-04-30 13:27 ` Benjamin Coddington
2026-04-30 14:26   ` Rik Theys
2026-04-30 14:34     ` Rick Macklem
2026-04-30 14:39     ` Rick Macklem
2026-04-30 15:03       ` Rik Theys
2026-04-30 15:02     ` Rick Macklem
2026-04-30 15:27       ` Rik Theys
2026-04-30 15:35         ` Rick Macklem
2026-04-30 16:24           ` Rick Macklem
2026-04-30 17:04           ` Rik Theys [this message]
2026-04-30 17:29 ` Olga Kornievskaia
2026-04-30 18:08   ` Rik Theys
2026-04-30 18:28     ` Olga Kornievskaia
2026-05-04  7:30   ` Rik Theys

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe5d8251-f92d-4732-a19a-bf92c4ea0cb9@esat.kuleuven.be \
    --to=rik.theys@esat.kuleuven.be \
    --cc=ben.coddington@hammerspace.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=rick.macklem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).