LockHashSlots and LockMemSize

13 views
Skip to first unread message

Dany40

unread,
Dec 12, 2025, 11:30:42 AM (4 days ago) Dec 12
to firebird-support
Hello!

Is there any logic to set this parameters? In my case, Firebird 5.0.3 64bit server is running as SuperServer. It has 140 databases connected; the sizes are from 24 MB to 130 GB, and the connected users to each can be from 1 to 50, but all the databases together can have up to 300 users connected at the same time. The biggest table has a blob field in where with no more of 4mb in blob size, but this table can have 1 millon records. In most cases the size of each database is 80 or 90% from this blobs.

I am not sure what is the best combination for my case.

Thank you!

Dimitry Sibiryakov

unread,
Dec 12, 2025, 11:38:34 AM (4 days ago) Dec 12
to firebird...@googlegroups.com
Dany40 wrote 12.12.2025 17:30:
> Is there any logic to set this parameters?

The logic is simple: *do not touch them* unless fb_lock_print shows you big
number of hash collisions and big table growth respectively.

--
WBR, SD.

Mark Rotteveel

unread,
Dec 12, 2025, 12:20:55 PM (4 days ago) Dec 12
to firebird...@googlegroups.com
This not really a matter of "combination", they are pretty much separate
things.

Increase LockHashSlots to a higher prime if the "Hash lengths" in the
fb_lock_print output become very long (on average 20 or more is the
general advice).

In any case, LockMemSize is the initial allocation size, and the growth
increment if lock memory needs to grow. I'm not sure if there is a solid
advice to give on its sizing (though on the other hand, its default of
64 KiB is of course peanuts these days).

Mark
--
Mark Rotteveel
Reply all
Reply to author
Forward
0 new messages