The performance of a large number of files

Volker Lendecke vl at samba.org
Wed Nov 2 04:39:28 UTC 2016


Jeremy Allison <jra at samba.org> writes:

> On Tue, Nov 01, 2016 at 11:46:02PM +0000, xue jiaolong wrote:
>> When I try to create more than 100,000 files under a CIFS mount
>> directory on a Windows machine, the smbd cpu usage increases as the
>> number of files increases and performance degrades. I look at the
>> smbd log, before the creation of each document will receive from the
>> client SMB2_FIND request, the request parameters in_file_name = "*",
>> used to obtain the entire directory of information. That is to say
>> that each file needs to create a whole directory of information,
>> with the increase in the number of sub-files, performance
>> significantly decreased. I would like to ask is whether the SMB
>> protocol to consider the use of a large number of documents under
>> the directory scene, smbd there is no way to optimize, or modify the
>> configuration can improve performance?
>
> This looks like a cifsfs client question.
>
> What system calls (use strace) is your 100,000
> file creation code doing ? That might explain
> a lot.

Isn't that the normal case sensitive/insensitive directory lookup
thingy? cifsfs should be a case insensitive below.

Am I getting this right that you are re-exporting a cifsfs mount?

Volker



More information about the samba-technical mailing list