From nobody Fri Nov 8 17:47:59 2024 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XlRHV6Nrhz5cYk9 for ; Fri, 08 Nov 2024 17:48:06 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4XlRHV0cX4z3xj5 for ; Fri, 8 Nov 2024 17:48:05 +0000 (UTC) (envelope-from gnn@neville-neil.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of gnn@neville-neil.com designates 2001:4b98:dc4:8::225 as permitted sender) smtp.mailfrom=gnn@neville-neil.com; dmarc=none Received: by mail.gandi.net (Postfix) with ESMTPSA id 328211C0005; Fri, 8 Nov 2024 17:48:00 +0000 (UTC) From: George Neville-Neil To: Rick Macklem Cc: Mark Saad , freebsd-net@freebsd.org Subject: Re: An interesting anomaly in NFS client... Date: Fri, 08 Nov 2024 09:47:59 -0800 X-Mailer: MailMate (1.14r5937) Message-ID: <884A1DD9-B512-45B5-8520-F4E458105AC0@neville-neil.com> In-Reply-To: References: <8187509e-c9fb-403f-8569-28ba58425cff@FreeBSD.org> <9BD96F0F-363F-45BF-B3AF-BDEBD4B46175@neville-neil.com> List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: gnn@neville-neil.com X-Spamd-Result: default: False [-3.30 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-0.99)[-0.991]; NEURAL_HAM_SHORT(-0.91)[-0.907]; R_SPF_ALLOW(-0.20)[+ip6:2001:4b98:dc4:8::/64]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[2001:4b98:dc4:8::225:from]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ASN(0.00)[asn:29169, ipnet:2001:4b98::/32, country:FR]; FREEFALL_USER(0.00)[gnn]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_ONE(0.00)[1]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TAGGED_RCPT(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org]; DMARC_NA(0.00)[neville-neil.com]; R_DKIM_NA(0.00)[]; RCPT_COUNT_THREE(0.00)[3] X-Rspamd-Queue-Id: 4XlRHV0cX4z3xj5 X-Spamd-Bar: --- On 8 Nov 2024, at 7:58, Rick Macklem wrote: > On Thu, Nov 7, 2024 at 9:41=E2=80=AFPM George Neville-Neil wrote: >> >> >> >> On 7 Nov 2024, at 13:59, Rick Macklem wrote: >> >>> On Thu, Nov 7, 2024 at 9:34=E2=80=AFAM George Neville-Neil wrote: >>>> >>>> >>>> >>>> On 7 Nov 2024, at 4:15, Mark Saad wrote: >>>> >>>>>> >>>>>> On Nov 7, 2024, at 12:29=E2=80=AFAM, Andriy Gapon wrote: >>>>>> >>>>>> =EF=BB=BFOn 07/11/2024 02:43, George Neville-Neil wrote: >>>>>>> Howdy, >>>>>>> We've been digging into an interesting possible issue in the Free= BSD NFS client. Here is the scenario. I have a FreeBSD VM on my Mac, the = Mac is the NFS server, the VM is the client. >>>>> >>>>> What are you using to run the vm ? What architecture is the vm ? Wh= at about the Mac ? >>>> >>>> qemu, aarch64, M3 Mac. >>>> >>>> I doubt this is the source of the issue. >>>> >>>> I was poking through the code and I wonder if a slight time skew mig= ht be an issue. I'm going to check into that. The VM and the Mac both u= s NTP to stay in sync with the world, but who knows... >>> Hi George, >>> >>> I'll take a look at the packet trace later, but... >>> >>> If you can easily reproduce the issue, do a: >>> # nfsstat -E -c -z >>> - before reproducing it, and a >>> # nfsstat -E -c >>> - after. Then look at the Cache Info: at the end of the output. >>> >> >> I'll give that a look, and the thing that Mark found is also interesti= ng. I might ask Warner about it tomorrow, we're both at the Dev Summit. > When I looked at the packet trace, I saw a lot of GETATTRs > for different directories. If they are different directories and not > the same ones over and over again, caching will not be the issue. > (Btw, the attribute caching code hasn't changed in decades, afaik.) > Looks like the answer is what Mark sent, and I talked to Warner and what = we do now is, if not great, still the right thing, and just isn't so happ= y on NFS. We use NFS in our work on kernel development because we develo= p on VMs to start. Other than this pause, world builds on a modern (M3) l= aptop are as fast on an average server (hurray SoCs) and when the thing c= rashes it reboots in seconds, rather than 10 minutes which is how long a = modern Dell server takes to do its hardware checks. The shorter answer from some folks is "use 9pfs because NFS (server) on M= acOS is sloooow" which I'll look into as well. Thanks for all the help, it's been an interesting journey ;-) > Have fun at the dev summit, rick > Doing our best! Best, George