Samba - CPU and memory usage - Proposed solution(?)
abartlet at samba.org
Sat Jan 22 06:35:24 GMT 2005
On Sat, 2005-01-22 at 07:53 +0200, Nikos Balkanas wrote:
> Solution developed against samba 2.2.22. Didn't and do not have the
> opportunity to test samba 3.0.0.
> No browsing or wildmasks of files needed, only
> exact file request through the database.
> Putting samba through the debugger, I noticed that on every file request, it
> would scan all the files in the large directory, while converting to Unix
> filenames and building up the filename cash until it reaches 150 MB. I
> developed a configurable parameter "many files", which when set, disables
> file browsing (who needs listing of ~1,000,000 files?) and performs a "stat"
> to get the file.
Yes, this is a well-known problem with Samba's case insensitive filename
handling, on case-sensitive Unix systems.
If, as occurs in your case, the name is known exactly, such that a stat
() will determine the result, then you may set 'case sensitive = yes',
and Samba will do exactly that. This is best in 3.0.11pre2, (ie, the
current code, I'm not sure how far back the changes were applied) where
jra applied some patches to ensure that the directory listing was not
So, you may wish to advise your former employer that an 'out of the box'
solution should now be available.
Finally, I'm pleased to see Samba used being used in such big
applications. It's a joy to hear about these kind of installations.
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Student Network Administrator, Hawker College http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20050122/1c39cacf/attachment.bin
More information about the samba-technical