Re: Writing large build logs to NFS extremely slow?

From: Mehmet Erol Sanliturk <m.e.sanliturk_at_gmail.com>
Date: Thu, 07 Oct 2021 07:42:32 UTC
On Thu, Oct 7, 2021 at 5:17 AM Felix Palmen <felix@palmen-it.de> wrote:

> Hi all,
>
> I use a -CURRENT bhyve vm for testing port builds with poudriere. As
> this vm is only running when needed, but I want to always have access to
> the build logs, I use NFS to mount /usr/local/poudriere/data/logs from
> the host.
>
> I noticed some few ports take ridiculously long to build while barely
> using any CPU time at all. On a closer look, that's all ports producing
> a lot of compiler (warning) output, e.g. gcc, gnutls, gtk2, …
>
> So I assume appending to a large file via NFS gets slower and slower. Is
> there any mount option I could try to fix this? Right now I only have
> `nolockd`, I also tried `noncontigwr` which didn't change anything.
>
> Thinking about alternatives to NFS, are there any news for client-side
> 9p virtfs? I found <https://github.com/swills/virtfs-9p-kmod> which
> still builds with a few minor adaptions, but trying to mount a 9p share
> freezes the machine.
>
> Would you suggest a different mailing list to ask?
>
> BR, Felix
>
> --
>  Dipl.-Inform. Felix Palmen  <felix@palmen-it.de>   ,.//..........
>  {web}  http://palmen-it.de  {jabber} [see email]   ,//palmen-it.de
>  {pgp public key}     http://palmen-it.de/pub.txt   //   """""""""""
>  {pgp fingerprint} A891 3D55 5F2E 3A74 3965 B997 3EF2 8B0A BC02 DA2A
>



I have encountered such cases previously , but I am not able to remember
which parameters I have used to solve this problem ,
because I am not using the FreeBSD server now .
A similar problem occurs also in the Linux NFS server.

The problem is caused mainly by  NFS definition parameters .

If you study NFS definition parameters one by one , I think you will be
able to find which one is effective .

My opinion is the one setting is "write directly to disk" , i.e. , "do not
use the cache" .


In the  "write directly to disk" case , without completion of a write , the
computer in use is waiting for completion of previous write operation
before writing a new record . This is useful in case of abrupt program
terminations because every record is written into the disk file , by
consuming more time .

In the cache use case , time is not consumed much but the last written
records are lost in an abrupt  program termination .


My understanding from your question is this .


Mehmet Erol Sanliturk