G
George Potemkin
Guest
Yesterday I was wrong about VSTs: they do not read the ACO blocks like promon does. Sorry for misleading. Why the the ACO blocks should not be on LRU chain: For example, if you're planning, to kill an "annoying" self-service session then it's recommended to stop the session first (kill -SIGSTOP), to check if the session is holding any regular latches and to use the kill -9 hoping that the session did not hold a multiplexed latch. If the session is actively reading the data from database buffer pool (like readalot.p does in readprobe test) and if a database was started with -lruskips 0 than the chances to stop a self-service process while it holds LRU latch is approximately 3-10%. If it will really happen then a database will hang: nobody will be able to connect it. If you had the promon session that was already connected the database you will be unable to update any its screens: promon will try to read the ACO blocks and will wait for LRU latch. The "Activity: Latch Counts" screen in promon should not show an owner of LRU latch even though it's a regular latch. In fact it sometimes happens but only because a process got the latch while promon has already started reading shared memory with latch information. It's just 4K area (32*128 bytes) and promon reads it instantly but not fast enough compared with the latch operations. If a process is holding the LRU latch persistently then you will even unable to initiate an emergency shutdown. And there will be no footprints in the logs that could explain what is going on in your database. It's an ideal situation for the malicious minds. ;-) The solution is "flu shot" done when a database is yet working fine or at least before you're going to use SIGSTOP. Here is the script that does the trick: #------------------------------------------------------------------------------ LruShot() { # "Flu Shot": make ACO ("Area Control Object") Object Blocks insensitive to # the contention on LRU latch. Promon will work even if LRU latch is locked. # Script sets "Skips" value in Cache Entries (promon/R&D/debghb/6/1) # to 2147483647 (a maximum value of the -lruskips). Access to these blocks # will not acquire the LRU latch the next 2 billions times. # Db=$1 MaxSkips=2147483647 MinSkips=2000 # Do nothing if the current -lruskips is higher than MinSkips. # Otherwise set it to MaxSkips for a short period of time. # The higher the current lruskips the longer the script will work: # Approximately 1 sec per 1000 skips. PROSHUT=${PROSHUT-$DLC/bin/_mprshut} # Get the current value of the -lruskips: LruSkips=` (echo "R&D" # Advanced options echo "4" # 4. Administrative Functions ... echo "4" # 4. Adjust Latch Options # 4. Adjust LRU force skips: 0 ) | \ $PROSHUT $Db -0 -NL 2>/dev/null | tr -d "\f" | \ awk '/Adjust LRU force skips:/ {print $NF}' ` # LruSkips echo The current lruskips: $LruSkips test $LruSkips -le $MinSkips && \ echo Reading ACO blocks in loop... && \ time \ ( # Set the -lruskips to MaxSkips: echo "R&D" # Advanced options echo "4" # 4. Administrative Functions ... echo "4" # 4. Adjust Latch Options echo "4" # 4. Adjust LRU force skips: echo "$MaxSkips" # Enter new LRU force skips value # Read ACO blocks = Update activity counters: echo "T" # Return to the top level (main) menu. echo "2" # 2. Activity Displays ... echo "9" # 9. I/O Operations by File MinSkips=$LruSkips while [ $MinSkips -gt 0 ] do MinSkips=`expr $MinSkips - 1` echo "U" # Update activity counters. done # Reset the -lruskips to its initial value: echo "T" # Return to the top level (main) menu. echo "4" # 4. Administrative Functions ... echo "4" # 4. Adjust Latch Options echo "4" # 4. Adjust LRU force skips: echo $LruSkips # Enter new LRU force skips value echo "X" # Exit from the OpenEdge Monitor utility. ) | \ $PROSHUT $Db -0 -NL 2>/dev/null 1>&2 } # LruShot #------------------------------------------------------------------------------ LruShot sports
Continue reading...
Continue reading...