DB2 - L

 View Only
  • 1.  Increasing IRLM DEADLOK parameter

    Posted Sep 15, 2022 11:26 AM
    Hello everyone.

    I noticed today that the DEADLOK parameter in all of our subsystems is set to 100,1, meaning that IRLM DEADLOCK check occurs every 100 milliseconds.

    This is the minimal value and is 10 times more than the default of 1 second.

    https://www.ibm.com/docs/en/db2-for-zos/12?topic=2-deadlock-time-field

    IBM states that 
    "
    • For systems in which deadlocking is not a problem, have deadlock detection run less frequently for the best performance and concurrency (but do not choose a value greater than 5 seconds).

    "

    We have a very busy computer (most of the time it's over 95% and on 100% frequently).
    On Average, we have about 10-15 deadlocks per day.

    My gut feeling is that this parameter should be set higher, what do you think?

    The impact of the DEADLOCK check is in 2 areas:

    1. Application is waiting while the check is done.

    more checks means higher lock wait time.

    2. DB2 itself is wasting CPU on too frequent checks.

    The big question is how do I measure the impact of changing this parameter.

    For item 1, do I need to check QWACAWTL/QTXASLAT/ other?

    Is there a way to measure item 2 (DB2 CPU consumed for Deadlock DETECTION)?

    Thanks,
    Shay.



    ------------------------------
    ShayMillerMataf
    ------------------------------


  • 2.  RE: Increasing IRLM DEADLOK parameter

    Posted Sep 19, 2022 05:48 AM
    Just saw that John Campbell in a 2011(!) presentation about "Db2 for z/OS Best practices: Locks and Latches" had a little table where he wrote
    TIMEOUT range is 1 to 3600 sec, default is 60 : set it to 30 sec
    DEADLOK range is 0.1 to 5 sec, default is 1 sec : set it to 0.5 sec

    Don’t know if this is still true 11 years and five releases later...it appears to be a parameter that not many people "play about with"...

    Roy Boxwell

    SOFTWARE ENGINEERING GmbH and SEGUS Inc.
    -Product Development-



    Vagedesstrasse 19
    40479 Dusseldorf/Germany
    Tel. +49 (0)211 96149-675
    Fax +49 (0)211 96149-32
    Email: R.Boxwell@seg.de
    Web http://www.seg.de
    Link zur Datenschutzerklärung

    Software Engineering GmbH
    Amtsgericht Düsseldorf, HRB 37894
    Geschäftsführung: Gerhard Schubert, Ulf Heinrich




  • 3.  RE: Increasing IRLM DEADLOK parameter

    Posted Sep 20, 2022 03:44 AM

    Yo Roy,

     

    Don't think I've ever worked anywhere, nor seen a customer (back in the day), that had the timeout interval set to anything other than 60 seconds.  And it's a shame, 'cause I think lower is better.  How annoyed are you when a web page doesn't load in 5 seconds?  As the user of some back-office system I'd rather be told, 'Oops, something went wrong; please try again' after 5-10 seconds rather than wait a full minute.  Be nice if there were separate timeout intervals for batch, CICS, etc.  Hey ho.  But even so, I think that ship has sailed.

     

    I suspect you could count on the hand of a one-armed lathe operator how many sites don't have TIMEOUT set to 60s.

     

    Cheers,

     

     

    Raymond

     






  • 4.  RE: Increasing IRLM DEADLOK parameter

    Posted Sep 20, 2022 04:18 AM
    Hi Raymond!
    Whaddya think about the other parm, DEADLOK ? I suspect it is also never, or very rarely, changed... (Probably a two armed wood worker...)

    Roy Boxwell

    SOFTWARE ENGINEERING GmbH and SEGUS Inc.
    -Product Development-



    Vagedesstrasse 19
    40479 Dusseldorf/Germany
    Tel. +49 (0)211 96149-675
    Fax +49 (0)211 96149-32
    Email: R.Boxwell@seg.de
    Web http://www.seg.de
    Link zur Datenschutzerklärung

    Software Engineering GmbH
    Amtsgericht Düsseldorf, HRB 37894
    Geschäftsführung: Gerhard Schubert, Ulf Heinrich




  • 5.  RE: Increasing IRLM DEADLOK parameter

    Posted Sep 20, 2022 04:39 AM
    Hi,
    I usually use DEADLOK='2,1'  , unless it is a very "deadlock infected" system.
    As per TIMEOUT (IRLMRWT), the default is now 30 (seconds) but as it takes the 2nd check to activate it this means an average of 45 seconds and up to 60 seconds max.
    However if you carried it from the 60 seconds era then it is better to change it according with your environment needs.


    Isaac Yassin 
    IBM Gold Consultant






  • 6.  RE: Increasing IRLM DEADLOK parameter

    Posted Sep 20, 2022 05:00 AM

    DEADLOK's a bit different in that you're deciding when to deal with a situation that will never resolve itself favourably i.e. one of you is going to die; it's just a question of when.  So it's a trade-off between how long to leave a situation that will never resolve itself without intervention, and how often you look for such situations.  Half a second seems a reasonable compromise.  But yes, again, never seen it set to a non-default value.  ��

     






  • 7.  RE: Increasing IRLM DEADLOK parameter

    Posted Sep 20, 2022 08:21 AM
    Edited by Shay Miller Sep 20, 2022 08:22 AM
    Thank you all for your replies.

    We will start by changing our QA subystems from 100 to 500.

    How do I measure the impact (to show to management)?

    1.  From the applicaion side, do I need to check QWACAWTL/QTXASLAT/ other?
    2.  From the DB2 side, IRLM CPU is the metric to check?

    Thanks,
    Shay.


    ------------------------------
    ShayMillerMataf
    ------------------------------



  • 8.  RE: Increasing IRLM DEADLOK parameter

    Posted Oct 03, 2022 10:25 AM
    Hello.

    Any thoughts how to see the impact from the application side?

    ------------------------------
    ShayMillerMataf
    ------------------------------