Slow nfsd write performance, tweaks needed

Rick Macklem rmacklem at uoguelph.ca
Thu Nov 13 12:58:58 UTC 2014


Mark Schouten wrote:
> Hi,
> 
> 
> I am in the process of switching from a ZFS On Linux-based NFS-server
> to a FreeBSD-based NFS-server. The FreeBSD implementation of ZFS is
> way superiour over ZoL, and the box serves as storage for a
> virtualizationplatform, so stability is welcome. :)
> 
> 
> The box is stable, but performs terribly. Surely, I'm doing something
> wrong, but I would like some tips and tricks to speed things up.
> 
> 
> 
> 
> Here's my setup:
> CPU: Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz (HyperThreading is
> enabled)
> RAM: 64GB
> NIC: 2x igb in lagg0 (loadbalancing)
> Disks:
> 
> export1     1.81T   914G   942G    49%  1.00x  ONLINE  -
>   mirror     928G   457G   471G         -
>     da0         -      -      -         -
>     da1         -      -      -         -
>   mirror     928G   457G   471G         -
>     da2         -      -      -         -
>     da3         -      -      -         -
>   mirror    9.94G   173M  9.77G         -
>     da4p1       -      -      -         -
>     da5p1       -      -      -         -
> cache           -      -      -      -      -      -
>   da4p2      223G   223G     8M         -
>   da5p2      223G   223G     8M         -
> 
> 
> da0-3 are 1TB WDs
> da4-5 are 240GB Samsung SSD 840s
> 
> 
> Here's (related) info from rc.conf.
> 
> nfs_server_enable="YES"
> nfs_server_flags="-u -t -n 128"
> rpcbind_enable="YES"
> mountd_enable="YES"
> rpc_lockd_enable="YES"
> rpc_statd_enable="YES"
> 
> 
> 
> 
> I have compression enabled on all the ZFS-filesystems, and
> jumboframes are enabled on the nics.
> 
> 
> As soon as one of the (Linux) clients start to do some IO, NFS
> responsetimes go up bigtime (yesterday up to 13 seconds), while the
> hardware is pretty much idle, I must be doing something very wrong.
> I'm mostly a Linux-guy, so any hit with a FreeBSD cluebat is
> appreciated.
> 
When an NFS server demonstrates terrible performance, it is usually
a problem with the underlying network fabric.
Possibilities include:
- A problem with TSO enabled network interface doing I/O of near
  64K. (This should be mostly fixed in recent code, but you didn't
  mention what version of FreeBSD you are using, so...)
  Workarounds: disable TSO or make sure all your clients are using
   rsize=32768,wsize=32768
- A problem with your network interface device driver.
  Workaround: Try a different kind of network interface.
   (You didn't give hardware specs for the server, so we don't
    know what kind of NIC you are using. FreeBSD doesn't have
    the marketshare of Linux, so the drivers vary greatly depending
    on the hardware.)
- I have no idea what effect jumboframes might have. If possible,
  I suggest you try disabling them.

I have no expertise on the ZFS side, so maybe someone else will
make some suggestions there.

Good luck with it, rick
ps: There is no "ideal" mailing list for NFS stuff. Most would
    use either freebsd-stable@ or freebsd-current@, depending
    on whether they are using a stable release or -head.
    Others might use freebsd-fs at .

> 
> Regards,
> 
> 
> --
> Kerio Operator in de Cloud? https://www.kerioindecloud.nl/
> Mark Schouten  | Tuxis Internet Engineering
> KvK: 61527076 | http://www.tuxis.nl/
> T: 0318 200208 | info at tuxis.nl


More information about the freebsd-hackers mailing list