Subject What's the upper limit on LockHashSlots?
Author Stephen J. Friedl
Good morning, all.

I support a line-of-business application that uses Firebird 1.5
Classic Server on Linux, and it operates with each company
being its own database file. There could be thousands of DB files on a
machine, and multiple middle-tier Windows machines (which run the
application itself) can hit the multiple database servers.

Every service bureau running this application complains about
performance, and all evidence suggests that lock contention - possibly
caused/provoked by poor application design - is at the center of the
performance issues.

The default Firebird hash modulo is 101, and I have been looking
without success for a reason not to max it out. The code limits the
value to 2048, and the largest prime below that is 2039.

The only consideration I can think of is memory use, but these
machines are 100% dedicated to the Firebird database and have no
regular users. Most have 4G of RAM, some even more. Some of these
machines get *minimum* hash chain lengths of 400.

What is the downside to a 2039-sized LockHashSlots parameter?

Thanks,
Steve

---

Steve Friedl | UNIX Wizard | Microsoft MVP | www.unixwiz.net