Troubleshooting Samba (windows shares) perfomance on an Intel NIC

0

At home, a native windows-shares client on Windows 7 and Windows 10 is performing poorly. It is connected to a Samba server through a gigabit switch. The read-rate is at around 60 MB/s while writes to the server acheive an acceptable throughput of 114 MB/s.

The theoretical maximum is 125 MB/s (1000 Mbit / 8 bytes) and the suboptimal read-performance has been bothering me for a long time.

The setup is as follows:

Client:                               Server: 
- Windows 10                          - Linux 4.1.12
- Ethernet: Intel I218-LM (gigabit)   - Ethernet: Realtek RTL8111/8168/8411
                                      - Samba 3.6.25
Switch:
- Cheap but solid 8-port gigabit switch by Netgear (2007)

While trying to resolve this, one may find dated suggestions online about tweaking the samba server. I found that changing the socket options and read and write parameters had no noticable improvement:

/etc/samba/smb.conf

; useless tweaks for a home network 2014-2015. oversized buffers do not help...
[global]
read size = 365536
read prediction = true
socket options = IPTOS_LOWDELAY  TCP_NODELAY SO_RCVBUF=158192 SO_SNDBUF=158192
write raw = yes
read raw = yes

Benchmarking the network throughput with iperf (cygwin) yielded aproximately 930 Mbit/s. Sadly, the network-performance (task manager) never indicates link saturation above 560 MBit while CrystalDiskMark is reading from the mounted network share.

As a last attempt to pin the issue, I booted Knoppix on the Windows-client machine to mount and benchmarked the share:

mount -o user=foo //192.168.1.3/data /mnt/remote
iozone -o -r 4m -s 1200mb -i{0,1} 

This produced results close to the physical limit. Do you have any suggestions for troubleshooting this issue?

Ярослав Рахматуллин

Posted 2015-11-29T01:57:28.867

Reputation: 9 076

Answers

1

The issue could be related to the TCP or ethernet driver settings in windows.

One source reports that disabling these parameters helps:

  • IPv4 Checksum Offload
  • Large Send Offload Version 2
  • TCP Checksum Offload
  • UDP Checksum Offload

I can confirm these findings, and additionally, I found that the settings indicated below also help:

  • adaptive inter-frame spacing -> off
  • jumbo packet -> 9014 bytes
  • interrupt moderation -> disabled
  • interrupt moderation rate -> off

Tweaking the NIC driver settings massively improved the performance:

bad-perf

good-perf

Network-adapter settings

Control Panel -> Network 
    -> change adapter settings
        -> right-click>properties -> advanced

nic driver settings

Relevant documentation and forum thread:

Ярослав Рахматуллин

Posted 2015-11-29T01:57:28.867

Reputation: 9 076