I have a strange Samba behavior here. CPU usage raises to 100% for the one thread copying files to or from my Samba fileserver.
Situation:
FreeBSD 10.1-RELEASE upgraded from 9.2-RELEASE
net/samba36 within ezjail
zpool as RAID10, compression for ZFS dataset set to lz4
Gigabit em0: throughput when copying (when not hitting the problem, according to
- 110,187 MB/s (peak)
- roughly 50 MB/s (copying medium files)
- around 10 MB/s (copying small files, 100kB)
Tests I did so far:
- Activated and deactivated various options in /usr/local/etc/smb.conf like socket options, aio options, etc. no change
- Copying about 300GB to and from the server with mixed filesets
- Packet captures from server and workstation. I found no errors like dropped packets, retransmissions, etc.
- Updated the base system with
Results so far:
- When the single SMB thread hits the 100% CPU limit performance drops to about 1 kB/s without seeing any problems with
- Switching on and off compression on the ZFS datasets does not change the performance
- Tweaking
Ideas:
- Is it dependent on a specific file type (content)? No reason why that should have any impact.
- Is it dependent on the number of files within the target directory? Does performance drop with increasing number of files in the directory?
Strange is: The config worked fine with samba36 and 9.2-RELEASE. I did not change anything during the upgrade with the config.
Situation:
FreeBSD 10.1-RELEASE upgraded from 9.2-RELEASE
net/samba36 within ezjail
zpool as RAID10, compression for ZFS dataset set to lz4
Gigabit em0: throughput when copying (when not hitting the problem, according to
systat
/ifstat)- 110,187 MB/s (peak)
- roughly 50 MB/s (copying medium files)
- around 10 MB/s (copying small files, 100kB)
Tests I did so far:
- Activated and deactivated various options in /usr/local/etc/smb.conf like socket options, aio options, etc. no change
- Copying about 300GB to and from the server with mixed filesets
- Packet captures from server and workstation. I found no errors like dropped packets, retransmissions, etc.
- Updated the base system with
freebsd-update
and ezjails with ezjail-admin update -u
and server was restartedResults so far:
- When the single SMB thread hits the 100% CPU limit performance drops to about 1 kB/s without seeing any problems with
systat
/iostat or zpool iostat
- Switching on and off compression on the ZFS datasets does not change the performance
- Tweaking
sysctl
values (like shown at https://calomel.org/freebsd_network_tuning.html as I did with the 9.2-RELEASE or leaving them at 10.1-RELEASE default does not change the performanceIdeas:
- Is it dependent on a specific file type (content)? No reason why that should have any impact.
- Is it dependent on the number of files within the target directory? Does performance drop with increasing number of files in the directory?
Strange is: The config worked fine with samba36 and 9.2-RELEASE. I did not change anything during the upgrade with the config.