This Article 
 Bibliographic References 
 Add to: 
Performance Analysis of Two-Phase Locking
May 1991 (vol. 17 no. 5)
pp. 386-402

A straightforward analytic solution method is developed which takes into account the variability of transaction size (the number of lock requests). The authors first obtain analytic expressions for the probability of lock conflict, probability of deadlock, and the waiting time per lock conflict. They then develop a family of noniterative analytic solutions to evaluate the overall system performance by considering the expansion in transaction response time due to transaction blocking. The accuracy of these solutions is verified by validation against simulation results. Also introduced is a new measure for the degree of lock contention, which is a product of the mean number of lock conflicts per transaction and the mean waiting time per lock conflict (when blocked by an active transaction). It is shown that the variability in transaction size results in an increase in both measures as compared to fixed-size transactions of comparable size. The authors also provide a solution method for the case when the processing times of transaction steps are different.

[1] R. Agrawal, M.J. Carey, and L. W. McVoy, "The performance of alternative strategies for dealing with deadlocks in database management systems,"IEEE Trans. Software Eng., vol. SE-13, pp. 1348-1363, Dec. 1987.
[2] P. Franaszek, J. T. Robinson, and A. Thomasian, "Access invariance and its use in high contention environments," inProc. 6th Int. Conf. Data Eng., Los Angeles, CA, Feb. 1990, pp. 47-55.
[3] J. N. Gray, R. A. Lorie, G. R. Putzolu, and I. L. Traiger, "Granularity of locks and degrees of consistency in a shared data base," inModeling in Database Management System, G. M. Nijssen, Ed. Amsterdam, The Netherlands: North-Holland, 1976, pp. 365-394.
[4] J. N. Gray, P. Homan, R.L. Obermarck, and H. Korth, "A strawman analysis of waiting and deadlock," IBM Res. Center, San Jose, CA, Rep. RJ 3066, Feb. 1981 (abstract inProc. 5th Berkeley Workshop Distributed Data Management and Computer Networks, Berkeley, CA, Feb. 1981, p. 125).
[5] C. S. Hartzman, "The delay due to dynamic two-phase locking,"IEEE Trans. Software Eng., vol. 15, p. 72-82, Jan. 1989.
[6] K. B. Irani and H. L. Lin, "Queueing network models for concurrent transaction processing in a database system," inProc. ACM-SIGMOD Int. Conf. Management of Data, Boston, MA, Jan. 1979, pp. 134-142.
[7] L. Kleinrock,Queueing Systems, Vol. 1: Theory. New York: Wiley, 1975.
[8] A.M. Langer and A. W. Shum, "The distribution of granule accesses made by database transactions,"Commun. ACM, vol. 25, no. 11, pp. 831-832, Nov. 1982.
[9] S.S. Lavenberg,Computer Performance Modeling Handbook, Academic Press, New York, 1983.
[10] W. T. K. Lin and J. Nolte, "Performance of two step locking," inProc. 6th Berkeley Workshop Distributed Data Management and Computer Networks, Berkeley, CA, Feb. 1982, pp. 131-160.
[11] W. Massey, "A probabilistic analysis of database system," inProc. Performance '86 and ACM SIGMETRICS '86 Joint Conf. Computer Performance Modeling, Measurement and Evaluation, Raleigh, NC, May 1986, pp. 141-146.
[12] R. Munz and G. Krenz, "Concurrency control in database systems-A simulation study," inProc. ACM SIGMOD Int. Conf. Management of Data, Toronto, ON, Canada, Aug. 1977, pp. 111-120.
[13] K. H. Pun and G. G. Belford, "Performance study of two-phase locking in single-site database systems,"IEEE Trans. Software Eng., SE-13, pp. 1311-1328, Dec. 1987.
[14] A. Reuter, "The transaction pipeline processor," inProc. Int. Workshop High Performance Transaction Systems, Pacific Grove, CA, Sept. 1985.
[15] I. K. Ryu and A. Thomasian, "Performance analysis of dynamic locking," inProc. Fall Joint Computer Conf., Dallas, TX, Nov. 1986, pp. 698-708.
[16] I. K. Ryu and A. Thomasian, "Analysis of database performance with dynamic locking,"J. ACM, vol. 37, no. 3, pp. 491-523, July 1990.
[17] Y.C. Tay, N. Goodman, and R. Suri, "Locking performance in centralized databases,"ACM Trans. Database Syst., vol. 10, no. 4, pp. 415-462, Dec. 1985.
[18] Y. C. Tay,Locking Performance in Centralized Databases. Orlando, FL: Academic, 1987.
[19] A. Thomasian, "An iterative solution to the queueing network model of a DBMS with dynamic locking," inProc. 13th Computer Measurement Group Conf., San Diego, CA, Dec. 1982, pp. 252-261.
[20] A. Thomasian and I. K. Ryu, "A decomposition solution of the queueing network model the centralized DBMS with static locking," inProc. 1983 ACM SIGMETRICS Conf. Computer Performance Modeling, Measurement and Evaluation, Minneapolis, MN, Aug. 1983, pp. 82-92.
[21] A. Thomasian and I. K. Ryu, "On analyzing lock contention in databases," IBM Res. Rep. RC 12666, Yorktown Heights, NY, Mar. 1987.
[22] A. Thomasian, "Performance limits of 2PL concurrency control," inProc. 7th IEEE Int. Conf. Data Eng., Kobe, Japan, Apr. 1991.
[23] J. Tsitsiklis, C.H. Papadimitriou, and P. Humblet, "The performance of a precedence-based queueing discipline,"J. ACM, vol. 33, no. 3, pp. 593-602, July 1986.
[24] P.S. Yu, D.M. Dias, and S. S. Lavenberg, "On modeling database concurrency control," IBM Res. Rep. RC 15386, Yorktown Heights, NY, Jan. 1990.

Index Terms:
two-phase locking; transaction size; lock requests; probability; lock conflict; deadlock; system performance; transaction response time; transaction blocking; simulation; lock contention; concurrency control; distributed databases; system recovery; transaction processing
A. Thomasian, I.K. Ryu, "Performance Analysis of Two-Phase Locking," IEEE Transactions on Software Engineering, vol. 17, no. 5, pp. 386-402, May 1991, doi:10.1109/32.90443
Usage of this product signifies your acceptance of the Terms of Use.