The Performance of Concurrency Control Algorithms for Database Management Systems

The Performance of Concurrency Control Algorithms for Database Management Systems

THE PERFORMANCE OF CONCURRENCY CONTROL ALGORITHMS FOR DATABASE MANAGEMENT SYSTEMS Michael J. Carey Michael R. Stonebraker Computer Sciences Department Electronics Research Laboratory University of Wisconsin University of California Madison. WI 53706 Berkeley. CA 94720 ABSTRACT (also called optimistic concurrency control or certifica- This paper describes a study of the performance of cen- tion) [Bada79. Casa79. Baye80. Kung81. Ceri821. tralized concurrency control algorithms. An Bernstein and Goodman (Bern8 I ) survey many of these algorithm-independent simulation framework was algorithms and describe how new algorithms can be developed in order to support comparative studies of created by combining these mechanisms. various concurrency control algorithms. We describe Given the ever-growing number of available con- this framework in detail and present performance currency control algorithms. the database system results which were obtained for what we believe to be a designer is faced with a difficult decision: Which con- representative cross-section of the many proposed algo- currency control algorithm should be chosen? Several rithms. The basic algorithms studied include four lock- recent studies have evaluated concurrency control algo- ing algorithms. two timestamp algorithms. and one rithm performance using qualitative. analytical. and optimistic algorithm. Also. we briefly summarize stu- simulation techniques. Bernstein and Goodman per- dies of several multiple version algorithms and several formed a comprehensive qualitative study which dis- hierarchical algorithms. We show that. in general, cussed performance issues for several distributed lock- locking algorithms provide the best performance. ing and timestamp algorithms [Bern80/. Results of analytical studies of locking performance have been 1. INTRODUCTION reported by Irani and Lin [Iran 791, Potier and Leblanc [Poti801. and Goodman et al [Good83l. Simulation stu- 1.1. Background dies of locking done by Ries and Stonebraker provide Much research on algorithm construction has been insight into granularity versus concurrency tradeoffs done in the area of concurrency control for both cen- [ Ries77, Ries79a. Ries79bj. Analytical and simulation tralized (single-site) and distributed database systems. studies by Garcia-Molina (Garc791 provide some insight This research has led to the development of many con- into the relative performance of several distributed vari- currency control algorithms. most of which are based ants of locking as well as a voting algorithm and a on one of three mechanisms: locking [ Mena78. -‘ring” algorithm. Simulation studies)y Lin and Nolte Rose78. Gray79, Lind79. Ston791, rimestamps [Reed78. ILin82. Lin83j provide some comparative performance Thom79, Bern80. Bern8 I], and commit-time validation results for several distributed locking and timestamp algorithms. A thesis by Galler [Gall821 provides a new This research was supported by AFOSR Grant MOSR-78- analysis technique for locking, a qualitative method for 3596. NESC Contract NESC-NOOO39-8I -C-0569. and a California comparing distributed algorithms. and some simulation MICRO Fellowship at the University of California. Berkeley. results for distributed locking versus timestamps (which contradict those of Lin and Nolte). A study by Robin- son IRobi82a. Robi82cJ includes some experimental results on locking versus serial validation. Finally. Agrawal and Dewitt recently completed a performance Permission to copy without fee all or part of th& materiel & gmnted provided that the copies are not made or dktributed for direct c-&o1 study of several integrated concurrency control and advantage, the VLDB copytight notice and the title of the pubknion and its date appear, and notice Is given that cop* ir by pemdasion of the Very Large recovery algorithms based on a combination of analyti- Data Base Endowment. To copy other&w, or to mpublish, mquires a fee cal and simulation techniques [ Agra83a. Agra83bl. ad/or special pennksion from the Endowment. These performance studies are informative.. but they fail to offer definitive results regarding the choice Proceedings of the Tenth Intematlonal Singapore, Auguet, 1984 Conterence on Very Large Data Baeee. 107 of a concurrency control algorithm for several reasons. tion. Two transaction classes. lnrge and small. are First. the analytical and simulation studies have mostly recognized in order to aid in the modeling of realistic examined only one or a few alternative algorithms. workloads. The class of a transaction is determined at Second, the underlying system models and assumptions transaction initiation time and is used to determine the vary from study to study. Examples include whether manner in which the readset and writeset are to be transaction sizes are fixed or random. whether there is assigned. Transaction classes. readsets. and writesets one or several classes of transactions. which system are generated using the workload parameters shown in resources are modeled and which are omitted. and what Table 1. level of detail is used in representing resources which The parameter num- terms determines the number are included in the models. It is thus difficult to arrive of terminals. or level of muitiprogramming, for the at general conclusions about the many alternative algo- workload. The parameter rrsmrt-de/a! determines the rithms. Third. the models used are in some cases mean of an exponential delay time required for a termi- insufficiently detailed to reveal certain important effects. nal to resubmit a transaction after finding that its For example. some models group the 11’0. CPU, and current transaction has been restarted. The parameter message delay times for transactions into a single ran- db-size determines the number of objects in the data- dom delay [Lin82, Lin831. in which case the perfor- base. and gran-size determines the number of objects mance benefit of achieving CPU-I/O overlap cannot be in each granule of the database. When a transaction revealed. Finally. the few comprehensive studies of reads or writes an object. any associated concurrency alternative algorithms which have been performed were control request is made for the granule which contains of a non-quantitative nature. the object. To model read and write requests, objects and granules are given integer names ranging from 1 to 1.2. Our Work db-size and I to fdb,size /gran-size]. respectively. The remainder of this paper describes a Object i is contained in granule number comprehensive quantitative study of the performance of 1 (i- 1) /granAze] + 1. centralized concurrency con trnl algorithms. An The readset and writeset for a transaction are lists algorithm-independent simulation framework was of the numbers of the objects to be read and written. developed in order to support fair comparative studies of respectively, by the transaction. These lists are various concurrency control algorithms. We describe assigned at transaction startup time. When a terminal this framework in detail and present performance initiates a transaction, small-prob is used to randomly results which were obtained for what we claim to be a determine the class of the transaction. If the class of representative cross-section of the many proposed algo- the transaction is small. the workload parameters rithms. The basic concurrency control algorithms stu- small, mean , small-sact-type. small-size-dist , and died include four locking algorithms. two timestamp small-write-prob are used to choose the readset and algorithms, and one optimistic algorithm. Also. we writeset for the transaction as described below. Read- briefly summarize the results of studies of several multi- sets and writesets for the class of large transactions are ple version algorithms and several hierarchical algo- determined in the same manner using the large-mean. rithms. We show that. in general. locking algorithms large-xact- type. large-size-dist . and large- write-prob provide the best performance. parameters. 2. THE SIMULATI,ON MODEL This section outlines the structure and details of -- P rkload Parameters the simulation model which was used to evaluate the ~zum terms level of multiprogramming performance of the algorithms. The model was restart- delay mean xact restart delay designed to support performance studies for a variety of dh size size of database yrart size size of granules in database centralized concurrency control algorithms [Care83cl, smalLprob Pr(xact is small) so the design was made to be as algorithm-independent smalL mean mean size for small xacts as possible. smal Lxact- type type for small xacts smalLsizedist size distribution for small xacts 2.1. The Workload Model smalL write-prob Pr(write X read X) for small xacts large mean mean size for large xacts An important component of the simulation model is largesact type Wpe for large xacts a transaction workload model. When a transaction is lar.pc- size dist size distribution for large xacts initiated from a terminal in the simulator, it is assigned large write prob Pr(write X read X) for large xacts a readset and a writeset. These determine the objects that the transaction will read and write during its execu- Table I : Workload parameters for simulation. Proceedings of the Tenth Intematlonal Singapore, August, 1994 Conferenceon Very Large Data Bases. 108 The readset size distribution for small transactions 2.2. The Queuing Model is given by small-dist. It may be constant. uniform. or Central to the detailed simulation approach used exponential. If it is constant.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    12 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us