Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Nov 2022 02:12:56 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 267631] slow nfs from FreeBSD guest/client to linux host/server
Message-ID:  <bug-267631-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267631

            Bug ID: 267631
           Summary: slow nfs from FreeBSD guest/client to linux
                    host/server
           Product: Base System
           Version: 13.0-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: andrew.cagney@gmail.com

First the numbers:

FreeBSD:
real    11m53.066s
user    0m36.488s
sys     0m5.237s
NetBSD (9.99.something):
real    3m52.182s
user    0m46.372s
sys     0m19.655s
OpenBSD (7.2):
real    3m24.953s
user    0m42.260s
sys     0m9.800s

now the details:

The test is to use build libreswan over NFS on a BSD KVM guest using a Linux
host as the NFS server.  FreeBSD and NetBSD both use GCC so I don't think i=
t is
the compiler (Open uses llvm).

Visually, linking is slower; all binaries are in the same ballpark:
-rwxr-xr-x. 1 cagney qemu   9400760 Nov  7 19:13
OBJ.kvm.fedora/programs/pluto/pluto
-rwxr-xr-x. 1 cagney cagney 9079352 Nov  7 19:24
OBJ.kvm.freebsd/programs/pluto/pluto
-rwxr-xr-x. 1 cagney cagney 9817860 Nov  7 19:36
OBJ.kvm.netbsd/programs/pluto/pluto
-rwxr-xr-x. 1 cagney cagney 7869320 Nov  7 20:04
OBJ.kvm.openbsd/programs/pluto/pluto

KVM Host and NFS server:
  Linux 6.0.5-200.fc36.x86_64
KVM Guest and NFS client (the KVM gets are configured the same way):
  FreeBSD freebsd 13.0-RELEASE FreeBSD 13.0-RELEASE

The vm was created using:

sudo virt-install \
        --connect=3Dqemu:///system --check=3Dpath_in_use=3Doff --graphics=
=3Dnone
--virt-type=3Dkvm --noreboot --console=3Dpty,target_type=3Dserial --vcpus=
=3D4
--memory=3D5120  --cpu=3Dhost-passthrough
--network=3Dnetwork:swandefault,model=3Dvirtio --rng=3Dtype=3Drandom,device=
=3D/dev/random
--security=3Dtype=3Dstatic,model=3Ddac,label=3D'1000:107',relabel=3Dyes \
=20=20=20=20=20=20=20
--filesystem=3Dtarget=3Dbench,type=3Dmount,accessmode=3Dsquash,source=3D/ho=
me/libreswan/wip-misc
\
        --filesystem=3Dtarget=3Dpool,type=3Dmount,accessmode=3Dsquash,sourc=
e=3D/home/pool
\
=20=20=20=20=20=20=20
--filesystem=3Dtarget=3Dsource,type=3Dmount,accessmode=3Dsquash,source=3D/h=
ome/libreswan/wip-misc
\
=20=20=20=20=20=20=20
--filesystem=3Dtarget=3Dtesting,type=3Dmount,accessmode=3Dsquash,source=3D/=
home/libreswan/wip-misc/testing
\
        --name=3Dm.freebsd \
        --os-variant=3Dfreebsd13.1 \
        --disk=3Dcache=3Dwriteback,path=3D/home/pool/m.freebsd.qcow2 \
        --import \
        --noautoconsole

FreeBSD's network interface is:

  vtnet0: flags=3D8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu=
 1500
options=3D4c07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSU=
M,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,TXCSUM_IPV6>
        ether 52:54:00:11:50:39
        inet 192.168.234.153 netmask 0xffffff00 broadcast 192.168.234.255
        media: Ethernet autoselect (10Gbase-T <full-duplex>)
        status: active
        nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

so it should be virtualized.

FreeBSD's fstab looks like:

# Device        Mountpoint      FStype  Options Dump    Pass#
/dev/vtbd0s1a   /               ufs     rw      1       1
/dev/vtbd0s1b   none            swap    sw      0       0
192.168.234.1:/home/pool     /pool       nfs     rw
192.168.234.1:/home/libreswan/wip-webkvm    /bench       nfs     rw
192.168.234.1:/home/libreswan/wip-webkvm   /source         nfs     rw
192.168.234.1:/home/libreswan/wip-webkvm/testing  /testing        nfs     rw

so nothing custom (presumably it is using TCP).

Linux's exportfs shows entries such as:

/home/libreswan/wip-webkvm/testing
192.168.234.0/24(sync,wdelay,hide,no_subtree_check,anonuid=3D1000,anongid=
=3D1000,sec=3Dsys,rw,secure,root_squash,all_squash)


Presumably I've mis-configured FreeBSD but I'm at a loss as to what.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



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