[Samba] Maximum number of files per folder

Quinn Fissler qfissler at gmail.com
Mon Nov 12 09:57:58 GMT 2007


Sorry I haven't answered your question. I would go and check the docs
or search the code.


When you say "accessing a folder" do you really mean browsing in Explorer?

If you're using Explorer, does it know they're text files? Do they
have .txt extension?

If it doesn't - if it has an extension which requires it - it could
open each one to find out what it is - to generate a thumbnail etc.

I've just created a directory containing 60,000 small text files with
names of the form "textfile${N}.txt" and can navigate it with only
momentary delays. I must admit, I'm using a dual xeon with fast scsi
raid.

The interesting thing for me was that when I hit 32768 files in my
creation loop, there was a delay of about a second - possibly as an
extra inode was allocated to the directory list.

When you access a large directory in samba, one cpu intensive part of
the process is likely to be the mapping of user names and permissions.
Do you have many users?

I've just doubled the size of my directory (120,000 small text files)
and it still performs quite well - when accessing from Explorer over a
samba share (3.0.24) I see a burst of activity on the Linux box and
then a long delay as Windows arranges the list.

Will the NAS manufacturer be able to give you more info?

A common way around the problem of large directories is to use
subdirectories based on the first letter or digit from the filename.
This is only good to you if you can get to the code of your
application and the files names do not change.

Regards,

Quinn

On 12/11/2007, lists at dieitexperten.de <lists at dieitexperten.de> wrote:
>
> Hello list,
>
> we have a small NAS-Box here in our office, running Linux 2.6.13 and
> Samba 3 (exactly version string is not avalilable for me at moment).
>
> Is there a limit, how many files samba will store in one folder? We
> recognize a massive CPU-Load of the smbd-process, when accessing a
> folder which stores round about 60 000 small text-files.
>
> Is this a samba-Limit or a bug? The kernel and samba is compiled by the
> NAS-manufactur, so no cimpiler-options are available for me.
>
> So long,
> Markus
>
> --
> Markus Neviadomski
> lists @ dieitexperten.de
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/listinfo/samba
>


More information about the samba mailing list