On 08/08/2012 03:57 PM, xaf wrote:
|--> Eric Shubert, le 08/08/2012 20:53, a dit :
On 08/08/2012 11:12 AM, xaf wrote:
|--> Alessio Cecchi, le 06/08/2012 09:42, a dit :
One last question, in dir_control the dom_89 row report in "domains"
filed "51" and "0" in all other fields. i do not think is correct.
How can fix it? If someone explain me what the fileds means I can try to
correct it manually.
domains 51 is the total number of domains
for 51 domains
default values
level_cur 0
level_max 3
level_start0 0
level_start1 0
level_start2 0
level_end0 61
level_end1 61
level_end2 61
level_mod0 0
level_mod1 2
level_mod2 4
level_index0 0
level_index1 0
level_index2 0
the_dir nothing
the_dir indicate where to put the next domain in the directory structure
Directory structure in the manual
The default directory setup allows for 62 directories in 3 levels and
100 user directories per directory. The total number of user directories
is equal to
100 + (62 * 100) + (62 * 62 * 100) + (62 * 62 * 62 * 100)
= over 24 million directories.
1st level 1st directory
/home/vpopmail/domains/ the_dir nothing
100 domains go here
2nd directory
/home/vpopmail/domains/0/ the_dir = 0
100 domains go here
... 1-9 then A-Z then a-z
so 62th
/home/vpopmail/domains/z/ the_dir = z
2nd & 3rd level
/home/vpopmail/domains/0/0/
/home/vpopmail/domains/0/0/0/
so for 7001th domain
/home/vpopmail/domains/0/7/
level_cur = 1 level_index0 = 7 the_dir = 7
xaf
---------------------------------------------------------------------
Please keep in mind that QMT uses this configuration setting:
user dir hashing = OFF --disable-users-big-dir
so a good deal of this (all of it?) does not come into effect.
--disable-users-big-dir is for users directories
here it's about domains directories
just a mistake, forget to count from 0 on the last line
so for 7001th domain
/home/vpopmail/domains/0/7/
level_cur = 1 level_index1 = 8 the_dir = 0/7
xaf
Thanks for the correction. I wasn't paying close enough attention.
Sometimes it says 'user' directories though, meaning 'domain' directories.
The vpopmail features web page says:
Support for 1 to 23 million virtual email domains using a "grow as it
goes" balenced directory tree.
Support for 1 to 23 million email users per domain using the same
balenced tree structure.
The --disable-users-big-dir turns it off for users, but not domains.
There unfortunately is no --disable-domains-big-dir option (yet).
There's not a whole lot involved with --disable-users-big-dir, so I
presume that adding a --disable-domains-big-dir wouldn't be too tough.
Makes me wonder what the largest number of domains is on a QMT host.
Probably < 1000. I expect that 10,000 would be stretching it.
I'm guessing this complexity is largely unnecessary in today's world.
ext3 can have 32,000 subdirectories, and ext4 can have 64,000. I suppose
it doesn't hurt to have the capability though (so long as it works). I'm
inclined to have it go away for QMT though.
I just poked around the source a bit, and in the vauth.h file I found this:
#define MAX_USERS_PER_LEVEL 100
So it'd be trivial to patch this to, say, 30000 on ext3 systems or 60000
on ext4 systems (with a configure option indicating the filesystem).
This is the same code used regardless of hashed domains or users. Just
thinking about possibilities.
If you have a QMT host with more than 100 domains, I'd like to hear from
you. What do you think about this "feature"? Would you like to see it go
away (like it has done with hashed user directories)?
P.S. This 'feature' needs to be kept in mind when writing scripts which
do things in domain directories. I can think of a few scripts which will
probably break when there are >100 domains.
Thanks for participating, everyone.
--
-Eric 'shubes'
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]