[Samba] Slow performance with lots of files in one directory

Joshua Schmidlkofer menion at asylumwear.com
Sat Jan 11 05:23:01 GMT 2003

Have you read the XFS tuning recommendations?  The XFS developers bitch
because people don't tune their volumes, then they don't understand bad

notes from Gentoo install:
Note:  You may want to add a couple of additional flags to the mkfs.xfs
command: -d agcount=3 -l size=32m. The -d agcount=3 command will lower
the number of allocation groups. XFS will insist on using at least 1
allocation group per 4 GB of your partition, so, for example, if you
hava a 20 GB partition you will need a minimum agcount of 5. The
try this w/ XFS 

mkfs.xfs -d agcount=(numgigs / 4) -l size=32m


when you mount, try logbuf=8 and noatime in the mount options.   Windows
is a killer for atimes.


On Fri, 2003-01-10 at 07:05, Gerald Drouillard wrote:
> Unless you are a programmer, I am afraid the only thing you can do is to
> modify how the files are stored in that directory.  I had the files on a
> ext3 RAID5 with lots of memory config and any type of access to that
> directory would bring smb to a crawl.  I even tried putting the files on a
> separate XFS RAID5 server and mount the directory, but seemed to just make
> it worse even with a 1Gig connection between the servers.  The files that I
> store are from our in-house imaging program.  Our file names were all
> numeric so it was just a case of changing the name structure from 123456.TIF
> to /3/2/1/456.TIF.  In the new file name format, a directory has no more
> than 999+10 directory entries.  Now the system is working better than ever.
> Regards
> -------------------------
> Gerald Drouillard
> Owner and Consultant
> Drouillard & Associates, Inc.
> http://www.Drouillard.ca
> > -----Original Message-----
> > From: samba-admin at lists.samba.org [mailto:samba-admin at lists.samba.org]On
> > Behalf Of Anders Nordby
> > Sent: Thursday, January 09, 2003 10:19 AM
> > To: samba at lists.samba.org
> > Subject: [Samba] Slow performance with lots of files in one directory
> >
> >
> > Hello,
> >
> > I've got performance problems with copying small files over to a Samba
> > share in a directory that has lots of small files (10000 to 20000
> > files). It takes too long time to copy new files (they drip in at a fast
> > pace), and smbd eats a lot of CPU time.
> >
> > Is there any way to make Samba run faster in this situation?
> >
> > Cheers,
> >
> > --
> > Anders Nordby
> > Aftenposten AS, Systemteknisk avd.
> >
> > Tlf.: +47 22864083
> > Fax: +47 22864074
> > --
> > To unsubscribe from this list go to the following URL and read the
> > instructions:  http://lists.samba.org/mailman/listinfo/samba
VB programmers ask why no one takes them seriously, 
it's somewhat akin to a McDonalds manager asking employees 
why they don't take their 'career' seriously.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba/attachments/20030111/7af334b1/attachment.bin

More information about the samba mailing list