大网数据广告活动
服务器运维问答

NFS - Very slow performance with small files (Also with CIFS)

· 52CE 我爱测

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 o…

问题原文

原帖链接 · LincolnP · CC BY-SA 4.0

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)

已采纳解答

原帖链接 · LincolnP · CC BY-SA 4.0

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?

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-04-08)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。