Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Oct 2021 15:35:23 +0000
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Felix Palmen <felix@palmen-it.de>, "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   Re: Writing large build logs to NFS extremely slow?
Message-ID:  <YQXPR0101MB096832C878E88DF877B39DB8DDB39@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>
In-Reply-To: <20211009141852.3cmjh7tysnehum7b@nexus.home.palmen-it.de>
References:  <20211007021643.bwglyvrswk2nm3fl@nexus.home.palmen-it.de> <CAOgwaMsLTWaMddx1HPY0eiY4t-12x-bEiZmhUpFsuEqkNhM27w@mail.gmail.com> <20211009141852.3cmjh7tysnehum7b@nexus.home.palmen-it.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Felix Palmen wrote:=0A=
>I use a -CURRENT bhyve vm for testing port builds with poudriere. As=0A=
>this vm is only running when needed, but I want to always have access to=
=0A=
>the build logs, I use NFS to mount /usr/local/poudriere/data/logs from=0A=
>the host.=0A=
>=0A=
>I noticed some few ports take ridiculously long to build while barely=0A=
>using any CPU time at all. On a closer look, that's all ports producing=0A=
>a lot of compiler (warning) output, e.g. gcc, gnutls, gtk2, =85=0A=
>=0A=
>So I assume appending to a large file via NFS gets slower and slower. Is=
=0A=
>there any mount option I could try to fix this? Right now I only have=0A=
>`nolockd`, I also tried `noncontigwr` which didn't change anything.=0A=
=0A=
Assuming your NFS performance is acceptable for other things and it=0A=
is only this log file that is a problem, then I doubt there is much you=0A=
can do to improve it.=0A=
--> Append (as in O_APPEND opens) are a poor case for NFS, since there=0A=
      is no append write in NFS. To approximate append write, it must flush=
=0A=
      all dirty data to the server, do a Getattr to find out the file's cur=
rent=0A=
      size and then do the write (over and over and over again).=0A=
You can capture packets with tcpdump and then look at them in wireshark,=0A=
to see what I mean.=0A=
=0A=
You could try the "nocto" mount option, which might help, if the log file=
=0A=
is being re-opened many times, but I doubt it will help.=0A=
=0A=
rick=0A=
=0A=
Thinking about alternatives to NFS, are there any news for client-side=0A=
9p virtfs? I found <https://github.com/swills/virtfs-9p-kmod>; which=0A=
still builds with a few minor adaptions, but trying to mount a 9p share=0A=
freezes the machine.=0A=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YQXPR0101MB096832C878E88DF877B39DB8DDB39>