copies of these files are getting slower and slower

Nico Kadel-Garcia nkadel at gmail.com
Mon May 1 01:48:57 UTC 2017


On Thu, Apr 27, 2017 at 5:36 AM, Andreas Schneider via samba-technical
<samba-technical at lists.samba.org> wrote:
> On Wednesday, 26 April 2017 17:00:54 CEST vl--- via samba-technical wrote:
>> On Wed, Apr 26, 2017 at 07:37:06AM -0700, Richard Sharpe via samba-technical
> wrote:
>> > On Wed, Apr 26, 2017 at 1:18 AM, Liuxuan via samba-technical
>> >
>> > <samba-technical at lists.samba.org> wrote:
>> > > Hi,everyone:
>> > >
>> > > Recently,I meet a performance problem ,when I use Samba 4.2.11 to copy
>> > > files from windows to linux. copies of these files are getting slower
>> > > and slower quickly. But when I set the “case sensitive = yes” in
>> > > smb.conf, it works very well. Can anyone help me? How should I deal
>> > > with this problem when I use case “sensitive = yes”?
>> > >
>> > > The protocol is SMB2_10 and file size is 105KB.
>> >
>> > This is a well known issue. Since Samba is trying to provide the same
>> > semantics as Windows, eg Case Preserving, Case Insensitive, when you
>> > try to create a file, it:
>> >
>> > 1. stat's the name as presented to check for existence, but if that fails,
>> > 2. It has to search the directory for case-equivalent names.
>> >
>> > Only if 2 fails can it go ahead and create a new problem.
>> >
>> > This is an O(N^2) problem.
>> >
>> > By telling Samba that the file system is case sensitive you skip step
>> > 2. However, there be dragons unless you actually have a file system,
>> > like XFS or ZFS that can do case-insensitive lookups ...
>>
>> In addition: In case the original poster is working for an OEM with
>> control over the file system, the OEM should take a look at the
>> getrealfilename VFS operation that can hook into case-insensitive
>> indexing operations inside a case-sensitive file system. This was
>> created for GPFS, which can do an efficient case-insensitive search
>> with a special ioctl.
>
> We also have a section in the wiki:
>
> https://wiki.samba.org/index.php/
> Performance_Tuning#Directories_with_a_Large_Number_of_Files
>
> --
> Andreas Schneider                   GPG-ID: CC014E3D
> Samba Team                             asn at samba.org
> www.samba.org

I note this part of the recommendations there.

> All files on the share must be converted to lowercase when using the example. Files using uppercase or both uppercase and lowercase are no longer listed on the share.

In other words, "throw out mixed case altogether".



More information about the samba-technical mailing list