Rocket U2 | UniVerse & UniData

 View Only
Expand all | Collapse all

READU threshold reached

  • 1.  READU threshold reached

    Posted 07-18-2024 00:15

    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
    ------------------------------


  • 2.  RE: READU threshold reached

    Posted 07-18-2024 02:50
    Edited by Thomas Ludwig 07-18-2024 02:51

    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
    ------------------------------



  • 3.  RE: READU threshold reached

    ROCKETEER
    Posted 07-18-2024 06:23

    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
    ------------------------------



  • 4.  RE: READU threshold reached

    Posted 07-18-2024 19:32
    Edited by Shubham Nigam 07-18-2024 19:32

    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
    ------------------------------



  • 5.  RE: READU threshold reached

    Posted 07-19-2024 17:14

    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:

    1. 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).
    2. Increase GSEMNUM to allow more RLTABSZ size rows to participate.
    3. Make GSEMNUM prime to help distribute the group address across more row entries in the lock tables.
    4. 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
    ------------------------------



  • 6.  RE: READU threshold reached

    PARTNER
    Posted 07-20-2024 08:09

    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
    ------------------------------



  • 7.  RE: READU threshold reached

    Posted 07-22-2024 05:23

    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
    ------------------------------



  • 8.  RE: READU threshold reached

    PARTNER
    Posted 07-22-2024 07:19

    hi Jonathan

    I can't wait to read you :-).



    ------------------------------
    Manu Fernandes
    ------------------------------



  • 9.  RE: READU threshold reached

    Posted 12 days ago
      |   view attached

    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
    ------------------------------

    Attachment(s)



  • 10.  RE: READU threshold reached

    Posted 10 days ago

    Thank you for the presentation, Jonathan.

    I knew the locking mechanism was changing at release 12, so I was describing the version 11 and earlier mechanism. I failed to note that.



    ------------------------------
    Mark A Baldridge
    Principal Consultant
    Thought Mirror
    Nacogdoches, Texas United States
    ------------------------------



  • 11.  RE: READU threshold reached

    PARTNER
    Posted 7 days ago

    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
    ------------------------------



  • 12.  RE: READU threshold reached

    Posted 7 days ago

    Hi Manu,

    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.

    Regards,



    ------------------------------
    Jonathan Smith
    UniData ATS
    Rocket Support
    ------------------------------



  • 13.  RE: READU threshold reached

    PARTNER
    Posted 08-13-2024 12:19