I am having very bad performance with NFS between two debian stretch machines, and I can't find a solution. I am using rsync at the server side in the exports file and tcp,hard,intr,rsize=32768,wsize=32768 at the client side as options when mounting. Both servers are VMs running under Hyper V and sharing same internal network switch.
Performace is acceptable with using large files, but with rsync performance is very low. Takes a few seconds to copy a tar file (Size 2 GB) and several minutes to extract the same tar file in the same destination folder. Tar without any special options, just tar xvf .
EDIT
I am using 4 TB Western Digital WD40EFRX SATA drives. These 4 drives are assigned directly to the Hyper-V VM as physical discs. These 4 discs, are made into a RAID 5 ext4 filesystem in the Debian Stretch NFS Server. The test files I am using are 40.000 files of different sizes adding a total of 2 GB. (mostly small size files, images and text and a few jar files).
Both servers are sharing the same Hyper-V External Virtual Switch, connected to an Intel I211 Gigabit Network Adapter
Ping sample from NFS client to NFS server:
PING xyzserver (192.168.1.49) 56(84) bytes of data. 64 bytes from xyzserver (192.168.1.49): icmp_seq=1 ttl=64 time=41.2 ms
64 bytes from xyzserver (192.168.1.49): icmp_seq=2 ttl=64 time=5.48 ms
64 bytes from xyzserver (192.168.1.49): icmp_seq=3 ttl=64 time=29.7 ms
64 bytes from xyzserver (192.168.1.49): icmp_seq=4 ttl=64 time=64.2 ms
64 bytes from xyzserver (192.168.1.49): icmp_seq=5 ttl=64 time=43.0 ms
64 bytes from xyzserver (192.168.1.49): icmp_seq=6 ttl=64 time=11.5 ms
64 bytes from xyzserver (192.168.1.49): icmp_seq=7 ttl=64 time=29.4 ms
EDIT2
I believe it has nothing to do with Debian 9. Even with Debian. Also not only with NFS. We have tested with Windows machines also and with CIFS and performance is quite similar.
Performace when using large files is good (specially with NFS) but with small files (source code, etc.) it can get really slow (even under 1 MB/s).
Any ideas of what could I be doing wrong? (Old question)
We are considering NOT using either NFS or CIFS.
Any idea of what we could do in order to get decent performance? (New question)
Having a fast RAID5 disk subsystem with a fast server and having two VMs in the same server seems ridiculous we cannot find a way to rsync files or untar files in the shared filesystem a decent speed.
Any suggestions of what I could use? (hardware, software)
We found no solution to these problems performance problems with CIFS and NFS under Hyper-V.
we finally decided to move to PROXMOX and everything is working so much better. Not sure why, probably Proxmox virtualization of Debian since it's also based on Debian is far more efficient that Hyper-V, which most likely is more efficient for Windows virtualization?