summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Terpstra <jht@samba.org>2005-06-28 18:33:23 +0000
committerGerald W. Carter <jerry@samba.org>2008-04-23 08:46:55 -0500
commit51bf368c65d6f03bdd2614ef339526b9bd9983d5 (patch)
tree0649c80a7dfd6b681a5948e29ce7036663601832
parent0eccdf4feb348773956f53ecf0309e471adb04d5 (diff)
downloadsamba-51bf368c65d6f03bdd2614ef339526b9bd9983d5.tar.gz
samba-51bf368c65d6f03bdd2614ef339526b9bd9983d5.tar.bz2
samba-51bf368c65d6f03bdd2614ef339526b9bd9983d5.zip
Update.
(This used to be commit d72e6dc4e7069cb612c38c592f81163b7cad38a5)
-rw-r--r--docs/Samba3-HOWTO/TOSHARG-LargeFile.xml26
1 files changed, 22 insertions, 4 deletions
diff --git a/docs/Samba3-HOWTO/TOSHARG-LargeFile.xml b/docs/Samba3-HOWTO/TOSHARG-LargeFile.xml
index d227638cbd..a0df8fad12 100644
--- a/docs/Samba3-HOWTO/TOSHARG-LargeFile.xml
+++ b/docs/Samba3-HOWTO/TOSHARG-LargeFile.xml
@@ -9,11 +9,16 @@
<title>Handling Large Directories</title>
<para>
-Samba-3.0.12 implements a solution for sites that have experienced performance degradation due to the
+<indexterm><primary>performance degradation</primary></indexterm>
+<indexterm><primary>large numbers of files</primary></indexterm>
+<indexterm><primary>large directory</primary></indexterm>
+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.
</para>
<para>
+<indexterm><primary>read directory into memory</primary></indexterm>
+<indexterm><primary>strange delete semantics</primary></indexterm>
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
@@ -21,11 +26,14 @@ stealing logic from Samba4 (thanks, Tridge), the current code in 3.0.12 handles
</para>
<para>
+<indexterm><primary>large directory</primary></indexterm>
+<indexterm><primary>performance</primary></indexterm>
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:
</para>
<para>
+<indexterm><primary>canonicalize files</primary></indexterm>
First, you need to canonicalize all the files in the directory to have one case, upper or lower &smbmdash; 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:
@@ -41,6 +49,9 @@ application as follows:
</para>
<para>
+<indexterm><primary>case options</primary></indexterm>
+<indexterm><primary>match case</primary></indexterm>
+<indexterm><primary>uppercase</primary></indexterm>
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 &smbmdash; 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
@@ -48,18 +59,25 @@ the directory for names: it knows that if a file does not exist in uppercase, th
</para>
<para>
+<indexterm><primary>case-insensitive</primary></indexterm>
+<indexterm><primary>consistent case</primary></indexterm>
+<indexterm><primary>smbd</primary></indexterm>
The secret to this is really in the <smbconfoption name="case sensitive">True</smbconfoption>
line. This tells smbd never to scan for case-insensitive versions of names. So if an application asks for a file
called <filename>FOO</filename>, and it cannot be found by a simple stat call, then smbd will return file not
found immediately without scanning the containing directory for a version of a different case. The other
-<filename>xxx case xxx</filename> lines make this work by forcing a consistent case on all files created by smbd.
+<filename>xxx case xxx</filename> lines make this work by forcing a consistent case on all files created by
+&smbd;.
</para>
<para>
+<indexterm><primary>uppercase</primary></indexterm>
+<indexterm><primary>stanza</primary></indexterm>
+<indexterm><primary>lowercase filenames</primary></indexterm>
Remember, all files and directories under the <parameter>path</parameter> directory must be in uppercase
-with this &smb.conf; stanza because smbd will not be able to find lowercase filenames with these settings. Also
+with this &smb.conf; stanza because &smbd; will not be able to find lowercase filenames with these settings. Also
note that this is done on a per-share basis, allowing this parameter to be set only for a share servicing an application with
-this problematic behavior (using large numbers of entries in a directory) &smbmdash; the rest of your smbd shares
+this problematic behavior (using large numbers of entries in a directory) &smbmdash; the rest of your &smbd; shares
don't need to be affected.
</para>