The speed of copy is very very slow when much files in the folder
nkadel at gmail.com
Sat Apr 29 04:18:18 UTC 2017
On Fri, Apr 28, 2017 at 11:25 PM, Richard Sharpe via samba-technical
<samba-technical at lists.samba.org> wrote:
> On Fri, Apr 28, 2017 at 7:03 PM, Nico Kadel-Garcia via samba-technical
> <samba-technical at lists.samba.org> wrote:
>> On Fri, Apr 28, 2017 at 8:36 AM, Zhangxiaoxu via samba-technical
>> <samba-technical at lists.samba.org> wrote:
>>> 100,000 files in my share.
>>> When I copy some little files to the folder, the speed is very very slow.
>> In one directory, with no subdirectories? Maybe you should stop doing
>> this? No matter how clever the network file system, getting the
>> directory information sorted out and even sorting out permissions is
>> complicated by so many files in one directory. It can be workable,
>> especially if you're not trying to sort out a list of the files, but
>> it's not free.
>>> I add some logs in the smbd, the “get_real_filename_full_scan” function cast about 1s. It’s too slow.
>>> I think the function is used for comparing the dest name to the exist files to check whether the dest file is exist.
>>> When I add “case sensitive = yes” to the configuration file, the speed is much quickly.
>> Well, yes. Finding all the fiile names and sorting them is
>> computationally expensive, especially to verify whether a mixed case
>> file in that long list of files matches yours and there is a conflict.
>>> So, I think whether we has some method to improve the performance?
>>> Could you give us some suggestion about the case.
>> You just said one. "case sensitive - yes". The other is "don't put
>> that many files in one directory without splitting it out into
> The problem with "case sensitive = yes" is that it is only for file
> systems that are case insensitive. Yes, that sounds backwards, but
> that is what it is for.
> While it will solve the copying problem if you don't actually have a
> case-insensitive files system, it introduces other big issues. One is
> that it will actually let you create two files with the same name that
> differ only by case, eg, File1.txt and file1.txt. Then you have a
> problem, because which one you get will depend on the exact case used
> when asking for the file. These (and worse) are the dragons I
Getting the file you asked for, with the spelling you asked for,
rather than trying to mangle case to match a file with an alternative
name is what I'd *want* and expect. The ancient use of case
insensitive file systems is both confusing and dangerous. This is not
what I would consider "a problem", I'd consider it desired behavior.
> To use "case sensitive = yes" you need a file system that supports
> case-insensitive lookups, like XFS, ZFS (on Linux) and GPFS, it seems.
Respectfully, you could and should give up on case insensitive file
names. They are an unnecessary computational and file system
More information about the samba-technical