Ref: 17300002
Title: Disk Space Required for a Name Service
date: 10/2/89

Copyright 3Com Corporation, 1991.  All rights reserved.

This article explains how to calculate the amount of disk space required
for a Name service.  The memory utilization by Name service files is
the same for 3+ and 3+Open Name, so the formula can be applied to
either.

Each Name service is built on a 512-byte base block of data.
Each additional entry to the Name service creates a 512-byte
data block plus additions to the Name index and to the property
index.  Because the two indices are organized as 9-way tree
structures, the addition of a Name entry may require either no space to
be allocated for the indices, a single 512-byte block to be allocated,
or one block for each level in the tree.  The combined space used to
make additions to the two indices is approximately 128 bytes.

   Let N = number of Name entries (users, servers, groups, etc.).

Then a domain file that is completely packed has the following
memory utilization:

   Bytes used = 512 * (1 +  N +  2 * ( 2*(CEIL(N/9)) - 1))
              /     |     \
      base blk  blk/entry  2 indices


If N = 1, bytes used = 512 * (1 + 1 + 2 * (2*(1) - 1))
             = 512 * (4)
             = 2,048

If N = 1,000, bytes used = 512 * (1 + 1000 + 2 * (2*(112) - 1))
                 = 512 * (1447)
         = 740,864

If N = 10,000, bytes used = 512 * (1 + 10000 + 2 * (2*(1112) - 1))
                  = 512 * (14447)
                  = 7,396,864

If N = 20,000, bytes used = 512 * (1 + 20000 + 2 * (2*(2223) - 1))
                          = 512 * (28891)
                          = 14,792,192

If N = 100,000, bytes used = 512 * (1 + 100000 + 2 * (2*(11112) - 1))
                           = 512 * (144447)
                           = 73,956,864

The above numbers are true with best space utilization.  Worst case is
for only 50% utilization, doubling the numbers calculated above.  Thus, for
example, you can estimate that approximately 20,000 Name entries would fit
in a 32 MB file.
