I do not have anything formal written up in the same way , as the tuning of the lock table and hash buckets etc are very application dependant and in general I would only tune them after a mointoring period. The documentation should state the default values. Another technote to write to add my increasing list of technotes people have asked for.
Original Message:
Sent: 09-30-2024 01:44
From: Manu Fernandes
Subject: READU threshold reached
Hi Jonathan,
Thank you for this.
Do you have the same regarding how to properly qualify the udconfig/uvconfig GLM param ?
With kind regards
------------------------------
Manu Fernandes
Original Message:
Sent: 09-25-2024 09:11
From: Jonathan Smith
Subject: READU threshold reached
Manu,
Sorry it's taken me some time to reply, I had forgotten about this. The attached pdf is of the internal presentation I did on the locking changes in UniVerse a while ago (2018).
Thanks,
------------------------------
Jonathan Smith
UniData ATS
Rocket Support
Original Message:
Sent: 07-22-2024 07:18
From: Manu Fernandes
Subject: READU threshold reached
hi Jonathan
I can't wait to read you :-).
------------------------------
Manu Fernandes
Original Message:
Sent: 07-22-2024 05:22
From: Jonathan Smith
Subject: READU threshold reached
Hi Manu,
UniData's locking mechanism and internal structures are different to those of the old UniVerse locking structures. UniVerse now uses the same structures in 12 and 14. I do have some internal presentations I did on this when the change was made. When I get some free cycles I will look to make those presentations available externally via a knowledge base article. I'm pretty sure Mark had already left Rocket before I did those presentations so don't think he has them.
Thanks,
------------------------------
Jonathan Smith
UniData ATS
Rocket Support
Original Message:
Sent: 07-20-2024 08:09
From: Manu Fernandes
Subject: READU threshold reached
Hello Mark,
I thank you for a deep detailed explain of lock algo and file/uvconfigs implications.
May I request the same explain for uv r12/r14 (and as I understand, Unidata too)?
I'm really asking for it to switch correctly to the new method.
One more time, Thank you very much.
------------------------------
Manu Fernandes
Original Message:
Sent: 07-19-2024 17:13
From: Mark Baldridge
Subject: READU threshold reached
A little more detail on Neil's answer.
GSEMNUM specifies the number of lists of depth GLTABSZ for group locks. The group lock table holds a maximum of GSEMNUM by GLTABSZ entries.
The READU lock table is GSEMNUM by RLTABSZ which limits the maximum total entries.
The row of entries for a group/read lock is calculated by MOD(inode + group address, GSEMNUM). A directory type file, type 1 and 19, use a group address of 1 for all records. This forces all locks to be behind a single group table entry. The group address in hashed files is some multiple of 512 * separation. This provides a good reason for selecting a GSEMNUM that is a prime number and certainly not a multiple of 2. Note that a file will have a modulo number of distinct group addresses, and a small modulo will limit the maximum number of readu locks to modulo * RLTABSZ. Exceeding the number of locks (by any user for any file) in a single readu lock table row will produce the READU threshold exceeded message and failure.
A semaphore controls access to a row in the group lock table and its corresponding readu lock table. There are GSEMNUM semaphores for the lock tables.
A group lock is identified by node (zero for local host), device and inode numbers, and group address. A read lock adds the ID to the identification.
An active group lock will have RD for a read and WR for a write. Up on completion of the active read/write, the group lock will revert to an IN, informational, group lock for letting the locking mechanism know there are extant RU/RL locks, or will be removed if there are no row locks in the group signature. A simple database read will only produce a group lock with no entry in the readu lock table. A (questionable) rule of thumb of 9 reads per write may help estimate the number of group locks to readu locks.
A readu lock will always have an associated group lock. An active read/write will have the corresponding RD or WR lock, and a quiescent readu lock will have an associated IN lock (assuming no other activity in that group signature).
These details support a number of ways to increase the number of available readu locks:
- Increase the file modulo, permitting more GSEMNUM table entries to participate in the modulus of the group address. Note that the inode simply affects the "starting" point for the first group so multiple files will more evenly distribute. This also is only helpful for a file with a "small" modulo (less than GSEMNUM).
- Increase GSEMNUM to allow more RLTABSZ size rows to participate.
- Make GSEMNUM prime to help distribute the group address across more row entries in the lock tables.
- Increase RLTABSZ to allow more locks per readu table row.
Your question comes from transactional updates that hold all of the locks until the COMMIT. That suggests a sufficiently large file that (1) above does not apply, but 2, 3, and 4 should provide the opportunities to alleviate the problem.
------------------------------
Mark A Baldridge
Principal Consultant
Thought Mirror
Nacogdoches, Texas United States
Original Message:
Sent: 07-18-2024 19:32
From: Shubham Nigam
Subject: READU threshold reached
Thank you for the quick response Neil and Thomas. I will try changing the numbers of RLTABSZ in uvconfig.
Also, we need to commit only if all the transactions are successfully completed. In case of any failure to any one transaction we need to rollback all the transactions therefore, a lot of records are required to be locked.
------------------------------
Shubham Nigam
Rocket Forum Shared Account
Original Message:
Sent: 07-18-2024 06:22
From: Neil Morris
Subject: READU threshold reached
The RLTABSZ uvconfig parameter sets the number of readu locks which can set in a given group lock bucket. Do you understand why you are hitting the current limit? Is it expected to have a lot of READU locks active in a single group lock bucket? Does the application use transaction semantics? Are a large number of READU locks being set on a Type 1 or Type 19 file? Or a file with a small modulus?
------------------------------
Neil Morris
Universe Advanced Technical Support
Rocket Software
Original Message:
Sent: 07-18-2024 02:49
From: Thomas Ludwig
Subject: READU threshold reached
Im not sure by 100% but the parameter RLOWNER in uvconfig should be the correct setting. However the UV manual suggest to be careful by increasing this value because it affects disk io performance.
We had the same message some time ago, but it was because of a wrong programming in a huge update process in not corretly release the lock after readu, so i didn't touch this setting..
Also it could be worth to take a look at RLTABSZ in the Administering Universe Manual...
Best regards
Thomas
------------------------------
Thomas Ludwig
System Builder Developer
Rocket Forum Shared Account
Original Message:
Sent: 07-18-2024 00:15
From: Shubham Nigam
Subject: READU threshold reached
Is there anyway we can increase the threshold of READU locks.
Currently I am getting below error.
READU threshold reached, lock on xxx denied!
Program "ED": pc = 69BA, READU threshold reached, lock on "xxxxx" den
ied!
------------------------------
Shubham Nigam
Rocket Forum Shared Account
------------------------------