Re: Hash Buckets
Posted in 1998
Beth wonders:
>I am using Informix Online 7.13.UC4 with Lawson Financial Software, on a
>Sun using Solaris 2.5. I was told to increase my locks to 1.2 million,
>otherwise Informix would not create enough hash buckets, and that this is
>only a problem with Solaris. My locks are currently set at 50,000 and I
>never have a lokwait. How do I know if I have enough hash buckets?
>Also, I see in the documentation that there are three types of hash
>buckets, buffer table hash, tblspace table hash, and lock table hash.
>Are all the hash buckets the same? (I assume not). Is increasing the
>number of locks so extremely the only way to increase the number of hash
>buckets?
Good question! This is a topic that is not explained in TFM, only
mentioned once.
Let's examine the purpose of hash buckets. We use hashing techniques
to "lump together" values into a smaller number of sets than is contained
in the original selection. It doesn't make sense to use a number of
buckets (lumps) that is as large as or larger than the number of original
items. (That defeats the purpose of hashing.) You were wise to question
your informer.
How can one tell if one has enough hash buckets? Basically, one can't. :)
The algorithm for calculating the optimum number of hash buckets is hard-
coded in the OnLine engine. (And does not change from platform to
platform, BTW.) You'll notice that those three uses of buckets are internal
to the engine anyway. So of all the myriad things to tune in an
Informix installation, the number of hash buckets is not one to worry
about.
And yes, the number of hash buckets is derived from the number of locks.
This is an excellent example of information in onstat that is useful to
Informix developers (writing engine source code) but not to customers.
___________________________________________________________
Clem Akins (aka clem@informix.com)
Informix Software, Inc (Standard disclaimers apply)
International Technical Support
Last seen: Reveling in the view of a Fujiyama sunrise