in reply to Perl solution for storage of large number of small files
For example, a filename of "foo12345.txt" might map to "/4d9/a43/9b6/eb3/f21/600/448/a03/b78/5a3/17". Each subdirectory has a maximum of 4096 subdirectories, which is well within the limit of ext3. By varying where you place the slashes, you control the breadth and depth of your directory tree.
I personally use a mapping of "/11/222/333/rest_of_hash" to archive (currently) over 10 million files. That scheme allows for 256*4096*4096 buckets, which is quite enough for my purposes. Speed and server load are excellent, even under highly concurrent usage.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl solution for storage of large number of small files
by isync (Hermit) on Apr 30, 2007 at 16:24 UTC | |
by BrowserUk (Patriarch) on Apr 30, 2007 at 16:49 UTC | |
by rhesa (Vicar) on Apr 30, 2007 at 16:31 UTC | |
|
Re^2: Perl solution for storage of large number of small files
by MidLifeXis (Monsignor) on May 02, 2007 at 18:41 UTC | |
|
Re^2: Perl solution for storage of large number of small files
by 2xlp (Sexton) on May 03, 2007 at 02:37 UTC | |
|
Re^2: Perl solution for storage of large number of small files
by 2xlp (Sexton) on May 06, 2007 at 02:18 UTC |