All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Javorski <mike.javorski@gmail.com>
To: NeilBrown <neilb@suse.de>
Cc: Chuck Lever III <chuck.lever@oracle.com>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: NFS server regression in kernel 5.13 (tested w/ 5.13.9)
Date: Sat, 21 Aug 2021 17:17:59 -0700	[thread overview]
Message-ID: <CAOv1SKDDUFpgexZ_xYCe6c2-UCBK0+vicoG+LAtG2Zhispd_jg@mail.gmail.com> (raw)
In-Reply-To: <CAOv1SKAyr0Cixc8eQf8-Fdnf=9Db_xZGsweq9K2E5AkALFqavQ@mail.gmail.com>

OK, so new/fresh captures, reading the same set of files via NFS in
roughly the same timing/sequence (client unchanged between runs)

5.12.15-arch1:
===============
0.042320 124082
0.042594 45837
0.043176 19598
0.044092 63667
0.044613 28192
0.045045 131268
0.045982 116572
0.058507 162444
0.369620 153520
0.825167 164682

5.13.12-arch1: (no freezes)
===============
0.040766 12679
0.041565 64532
0.041799 55440
0.042091 159640
0.042105 75075
0.042134 177776
0.042706 40
0.043334 35322
0.045480 183618
0.204246 83997

Since I didn't get any freezes, I waited a bit, tried again and got a
capture with several freezes...

5.13.12-arch1: (with freezes)
===============
0.042143 55425
0.042252 64787
0.042411 57362
0.042441 34461
0.042503 67041
0.042553 64812
0.042592 55179
0.042715 67002
0.042835 66977
0.043308 64849

Not sure what to make of this, but to my (admittedly untrainted) eye,
the two 5.13.12 sets are very similar to each other as well as to the
5.12.15 sample, I am not sure if this is giving any indication to what
is causing the freezes.

- mike




On Thu, Aug 19, 2021 at 5:52 PM Mike Javorski <mike.javorski@gmail.com> wrote:
>
> Neil:
>
> I did still have the original/source cap for that 5.13 file. I ran the
> command you gave and got the 10 last entries:
> 0.013086 31352
> 0.013318 28399
> 0.013339 3521
> 0.013783 32423
> 0.014519 32481
> 0.014773 6145
> 0.015063 19034
> 0.015829 25892
> 0.042356 29089
> 0.042581 5779
>
> I did have another test cap which was from an early 5.13 dev compile
> prior to the nfs patches (what the Archlinux devs asked me to try). In
> that file (which is 1.8G vs the 400M of the above file), the 10 last
> entries are:
> 0.042038 575
> 0.042190 87093
> 0.042313 30183
> 0.042377 34941
> 0.042521 53593
> 0.042801 113067
> 0.042930 1174
> 0.043285 87326
> 0.043851 61066
> 0.107649 115114
>
> As that seems even worse than the above, I think I need to get a clean
> 5.12 capture to see if it actually was "better" beforehand.
> Unfortunately I am stuck on a work issue tonight, but I will test it
> either tomorrow or at the latest, this weekend.
>
> Thanks for following up on this.
>
> - mike
>
> On Thu, Aug 19, 2021 at 5:31 PM NeilBrown <neilb@suse.de> wrote:
> >
> > On Tue, 17 Aug 2021, NeilBrown wrote:
> > > On Tue, 17 Aug 2021, Mike Javorski wrote:
> > > > Thanks for the pointer Chuck
> > > >
> > > > I ran the trace capture and was able to trigger two freezes in
> > > > relatively short order. Here is that trace file:
> > > > https://drive.google.com/file/d/1qk_VIMkj8aTeQIg5O0W3AvWyeDSWL3vW/view?usp=sharing
> > > >
> > >
> > > There are gaps of 5.3sec, 4sec, 1sec and 1sec between adjacent trace
> > > points.
> > > The longest gap between 'start' and 'done' for any given xid is 354msec.
> > > So it doesn't look like the filesystem read causing the problem.
> > >
> > > The long gaps between adjacent records are:
> > > 0.354581 xid=0x4c6ac2b6
> > > 0.418340 xid=0x6a71c2b6
> > > 1.013260 xid=0x6f71c2b6
> > > 1.020742 xid=0x0f71c2b6
> > > 4.064527 xid=0x6171c2b6
> > > 5.396559 xid=0xd66dc2b6
> > >
> > > The fact 1, 1, and 4 are so close to a precise number of seconds seems
> > > unlikely to be a co-incidence.  It isn't clear what it might mean
> > > though.
> > >
> > > I don't have any immediae ideas where to look next.  I'll let you know
> > > if I come up with something.
> >
> > I had separate bug report
> >   https://bugzilla.suse.com/show_bug.cgi?id=1189508
> > with broadly similar symptoms which strongly points to network-layer
> > problem.  So I'm digging back into that tcpdump.
> >
> > The TCP ACK for READ requests usually goes out in 100 or 200
> > microseconds.  Sometimes longer - by a factor of about 100.
> >
> > % tshark -r /tmp/javmorin-nfsfreeze-5.13.10-cap1\ .test.pcap  -d tcp.port==2049,rpc -Y 'tcp.port==2049 && rpc.msgtyp==0 && nfs.opcode==25' -T fields -e tcp.seq -e frame.time_epoch -e frame.number | sed 's/$/ READ/' > /tmp/read-times
> > % tshark -r /tmp/javmorin-nfsfreeze-5.13.10-cap1\ .test.pcap  -d tcp.port==2049,rpc -Y 'tcp.srcport==2049' -T fields -e tcp.ack -e frame.time_epoch -e frame.number | sed 's/$/ ACK/' > /tmp/ack-times
> > % sort -n /tmp/read-times /tmp/ack-times  | awk '$4 == "ACK" && readtime {printf "%f %d\n", ($2 - readtime), $3; readtime=0} $4 == "READ" {readtime=$2}' | sort -n | tail -4
> > 0.000360 441
> > 0.012777 982
> > 0.013318 1086
> > 0.042356 1776
> >
> > Three times (out of 245) the TCP ACK was 12 milliseconds or longer.  The
> > first and last were times when the reply was delayed by a couple of
> > seconds at least.  The other (1086) was the reply to 1085 - no obvious
> > delay to the READ reply.
> >
> > These unusual delays (short though they are) suggest something odd in
> > the network layer - particularly as they are sometimes followed by a
> > much larger delay in a READ reply.
> >
> > It might be as simple as a memory allocation delay.  It might be
> > something deep in the networking layer.
> >
> > If you still have (or could generate) some larger tcp dumps, you could
> > try that code and see if 5.12 shows any ACK delays, and if 5.13 shows
> > more delays than turn into READ delays.  IF 5.13 easily shows a few ACK
> > delays thats 5.12 doesn't, then they might make a git-bisect more
> > reliable.  Having thousands of READs in the trace rather than just 245
> > should produce more reliable data.
> >
> >
> > As I suggested in the bug report I linked above, I am suspicious of TCP
> > offload when I see symptoms like this.  You can use "ethtool" to turn
> > off that various offload features.  Doing that and trying to reproduce
> > without offload might also provide useful information.
> >
> > NeilBrown

  reply	other threads:[~2021-08-22  0:18 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-08 22:37 NFS server regression in kernel 5.13 (tested w/ 5.13.9) Mike Javorski
2021-08-08 22:47 ` Chuck Lever III
2021-08-08 23:23   ` Mike Javorski
2021-08-09  0:01 ` NeilBrown
2021-08-09  0:28   ` Mike Javorski
2021-08-10  0:50     ` Mike Javorski
2021-08-10  1:28       ` NeilBrown
2021-08-10 11:54         ` Daire Byrne
2021-08-13  1:51         ` Mike Javorski
2021-08-13  2:39           ` NeilBrown
2021-08-13  2:53             ` Mike Javorski
2021-08-15  1:23               ` Mike Javorski
2021-08-16  1:20                 ` NeilBrown
2021-08-16 13:21                   ` Chuck Lever III
2021-08-16 16:25                     ` Mike Javorski
2021-08-16 23:01                       ` NeilBrown
2021-08-20  0:31                         ` NeilBrown
2021-08-20  0:52                           ` Mike Javorski
2021-08-22  0:17                             ` Mike Javorski [this message]
2021-08-22  3:41                               ` NeilBrown
2021-08-22  4:05                                 ` Mike Javorski
2021-08-22 22:00                                   ` NeilBrown
2021-08-26 19:34                                     ` Mike Javorski
2021-08-26 21:44                                       ` NeilBrown
2021-08-27  0:07                                         ` Mike Javorski
2021-08-27  5:27                                           ` NeilBrown
2021-08-27  6:11                                             ` Mike Javorski
2021-08-27  7:14                                               ` NeilBrown
2021-08-27 14:13                                                 ` Chuck Lever III
2021-08-27 17:07                                                   ` Mike Javorski
2021-08-27 22:00                                                     ` Mike Javorski
2021-08-27 23:49                                                       ` Chuck Lever III
2021-08-28  3:22                                                         ` Mike Javorski
2021-08-28 18:23                                                           ` Chuck Lever III
2021-08-29 22:28                                                             ` [PATCH] MM: clarify effort used in alloc_pages_bulk_*() NeilBrown
2021-08-30  9:11                                                               ` Mel Gorman
2021-08-29 22:36                                                             ` [PATCH] SUNRPC: don't pause on incomplete allocation NeilBrown
2021-08-30  9:12                                                               ` Mel Gorman
2021-08-30 20:46                                                               ` J. Bruce Fields
2021-09-04 17:41                                                             ` NFS server regression in kernel 5.13 (tested w/ 5.13.9) Mike Javorski
2021-09-05  2:02                                                               ` Chuck Lever III
2021-09-16  2:45                                                                 ` Mike Javorski
2021-09-16 18:58                                                                   ` Chuck Lever III
2021-09-16 19:21                                                                     ` Mike Javorski
2021-09-17 14:41                                                                       ` J. Bruce Fields
2021-08-16 16:09                   ` Mike Javorski
2021-08-16 23:04                     ` NeilBrown

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=CAOv1SKDDUFpgexZ_xYCe6c2-UCBK0+vicoG+LAtG2Zhispd_jg@mail.gmail.com \
    --to=mike.javorski@gmail.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.