[Samba] How to improve the performance with unix_convert ?

Jeremy Allison jra at samba.org
Wed May 29 16:04:00 UTC 2019

On Wed, May 29, 2019 at 09:39:10PM +0800, 李庆波 via samba wrote:
> Dear all:
>   I used samba version 4.8.6 .I want to creat and write file in a dir,but the dir have a lots file ,may be 200000+.The creat or write will be slowly more than 1s.
> I watched the code ,the operation will be running the unix_convert .the function is time-consuming .
> if I modify the code get_real_filename_full_scan in the filename.c .the client will be failed to find some file .but the write speed will be improved .

Yes, scanning the directory for cache misses can be

If you can make a separate share for this, and can
canonicalize the name to a single case (or use a
case insensitive filesystem underneath) you can
remove these scans.

See here:


"Directories with a Large Number of Files"

for details.

More information about the samba mailing list