samba提速
进行以下几项优化工作,包括增大 SMB 服务器端缓存并调整网络内核参数。
增大 SMB 服务器端缓存
增大 write cache size 和 read raw 缓存大小:
在 smb.conf 文件中,保持 write cache size 和其他相关参数,提高数据缓存能力和流水线传输效果:
# Existing configurations
socket options = TCP_NODELAY SO_RCVBUF=1048576 SO_SNDBUF=1048576
aio read size = 524288
aio write size = 524288
write cache size = 33554432 # You may want to increase this value
min receivefile size = 524288
use sendfile = yes
max xmit = 65536
# Potential new configurations
read raw = yes
write raw = yes
oplocks = yes
level2 oplocks = yes
max xmit = 131072 # Increase the max xmit size
The write cache size parameter can be adjusted to a higher value if your serve