[Samba] Uploading 64KiB files getting slower and slower

Robert Marcano robert at marcanoonline.com
Thu Jan 18 13:13:14 UTC 2024


On 1/18/24 4:20 AM, 陈 方进 via samba wrote:
> As the diagram shown,the upload consist of 100,000 files that each of them is 64KiB,and the upload speed dropped from 8MB/s to 900KB/s.
> The smbclient is Windows Server 2012 R2 with SSD,and the smbserver is CentOS 7 with SSD,too.None of them have more than 40% cpu workload,and they are on a gigabit LAN with a ping latency of 0.1 second.When I copy these files on localhost or download from smbserver ,the speed is about 30MB.By the way,the file system block is 128KiB.
> I think the hardware dothing with such issue,but how to improve samba's performance in such situation ? I didn't change the default smb.conf,just configure the share,and log.smbd have no ERROR.


¿All those files are uploaded to the same directory? Each time you add 
more files to the same directory the search for an existent file to 
write to or not increases non linearly because Samba needs to do case 
conversion and list all files. You can try these settings:

https://wiki.samba.org/index.php/Performance_Tuning#Directories_with_a_Large_Number_of_Files



More information about the samba mailing list