Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!chinacat!chip From: chip@chinacat.Unicom.COM (Chip Rosenthal) Newsgroups: comp.mail.elm Subject: Re: Aliases File Message-ID: <1669@chinacat.Unicom.COM> Date: 2 Nov 90 01:18:06 GMT References: <1990Oct30.190327.26105@ux1.cso.uiuc.edu> <1663@chinacat.Unicom.COM> Organization: Unicom Systems Development, Austin, TX Lines: 42 In article sandrock@aries.scs.uiuc.edu (Mark T. Sandrock) writes: >I use only a few aliases myself, and I wonder how this value of 251 >was derived? It's a common rule of thumb to make the hash table size a prime number. The hash function in Elm uses the table size as a divisor, and thus a prime number generally will give a better distribution. Some hashing schemes (not Elm's though) use a rehash function which won't work unless the table size is prime. Another rule of thumb with closed hashing is that you'd like to use no more than 90%-95% of the available slots. Hashing runs pretty linearly until the table starts getting full, at which point it drops very rapidly. So, the number of 251 will give you space for something on the order of 225 aliases before performance starts degrading. If you don't expect to use more than 100 aliases, then by all means feel free to select the 127 value recommended by Configure for small systems. However, keep in mind that this is a system-wide limit, so if one person is going to have hundreds of aliases, everybody is stuck with alias hash tables to accomodate that size. Also bear in mind that lists can really eat up alias slots, since every (non-local) member of the list must be an alias. I don't use Elm aliasing that much, but still I've got 99 entries in my alias table because of a couple of private lists I keep. A somewhat related digression: The advice Configure gives is exactly backwards. It suggests 251 aliases for a default, 127 for a slow machine and 503 for fast machines. Since a bigger alias table is going to work faster, you'd want a big table for slow machines! A big machine is going to have the MIPS to overcome the hash collisions. So, if you have a clunky machine make really big hash tables to speed things up. :-) I think the unstated implication (is that a tautology?) is that a slow machine is going to have less memory resources to throw around, so a small hash table is recommended. Maybe Configure should say small/big instead of slow/fast. -- Chip Rosenthal Unicom Systems Development, 512-482-8260 Our motto is: We never say, "But it works with DOS."