If you can't read please download the document
Upload
mind-the-firebird
View
2.292
Download
1
Embed Size (px)
DESCRIPTION
This session will provide a short introduction to the Firebird lock manager and its usage patterns. It will describe how the lock manager can affect the performance of highly loaded systems and outlines the possible bottlenecks and other problems like unexpected lock-ups/freezes that may require special analysis. The structure of the lock table will also be explained. It will also include a detailed description of the fb_lock_print utility and its usage that will enable the research of issues that are related to the lock manager. A few practical examples illustrating how to analyze the utility output will be provided. This session is mainly of interest to Classic Server users and DBAs.
Citation preview
2. Synchronization in Firebird
5. Deadlock detection 6. Monitoring abilities 7. Lock Types and their Usage
9. Table access locks 10. Transaction locks 11. Sweep, shadow, monitoring, etc locks
12. Lock Types and their Usage
LCK_database = 1 // Root of lock tree LCK_relation = 2 // Individual relation lock LCK_bdb = 3 // Individual buffer block LCK_tra = 4 // Individual transactionlock LCK_rel_exist = 5 // Relation existence lock LCK_idx_exist = 6 // Index existence lock LCK_attachment = 7 // Attachment lock ... 13. Locks and Firebird Architectures
15. Fast LM operations
17. LM operations may require IPC 18. Lock Manager in Classic IPC IPC IPC Connection 1 Connection 2 fb_inet_server fb_inet_server fb_lock_mgr Lock table (shmem) 19. Inside the Lock Table
21. Lock resources 22. Lock requests
24. Hash table of lock keys 25. Inside the Lock Table Lock resource Series: page lock Key: 01:75 State: PR Lock request 1 PR (granted) Lock request 3 EX (pending) Lock request 4 EX (pending) Owner 1 PID = 1008 Owner 3 PID = 870 Owner 4 PID = 114 Lock request 2 PR (granted) Owner 2 PID = 788 26. Inside the Lock Table
29. Blocking seen = 0x100 30. Tuning the Lock Manager
32. LockHashSlots (1009)
33. Using the Lock Print Utility
35. -r [equests] 36. -s [eries] 37. -a [ll] 38. -w [ait list]
39. Using the Lock Print Utility
41. Seconds and intervals
43. -m 44. Questions?