Software: Apache/2.0.54 (Fedora). PHP/5.0.4 uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /usr/bin/X11/./../../share/doc/python-numeric-23.7/../samba-3.0.23a/htmldocs/Samba3-HOWTO/ drwxr-xr-x |
Viewing file: Select action/file-type: Samba-3.0.12 and later implements a solution for sites that have experienced performance degradation due to the problem of using Samba-3 with applications that need large numbers of files (100,000 or more) per directory. The key was fixing the directory handling to read only the current list requested instead of the old (up to samba-3.0.11) behavior of reading the entire directory into memory before doling out names. Normally this would have broken OS/2 applications, which have very strange delete semantics, but by stealing logic from Samba4 (thanks, Tridge), the current code in 3.0.12 handles this correctly. To set up an application that needs large numbers of files per directory in a way that does not damage performance unduly, follow these steps: First, you need to canonicalize all the files in the directory to have one case, upper or lower take your pick (I chose upper because all my files were already uppercase names). Then set up a new custom share for the application as follows:
Of course, use your own path and settings, but set the case options to match the case of all the files in your directory. The path should point at the large directory needed for the application any new files created in there and in any paths under it will be forced by smbd into uppercase, but smbd will no longer have to scan the directory for names: it knows that if a file does not exist in uppercase, then it doesn't exist at all.
The secret to this is really in the case sensitive = True
line. This tells smbd never to scan for case-insensitive versions of names. So if an application asks for a file
called
Remember, all files and directories under the This makes smbd much faster when dealing with large directories. My test case has over 100,000 files, and smbd now deals with this very efficiently. |
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0039 ]-- |