Designing an Optimized Transaction Commit Protocol. Digital VAX 6000, VAX TPC Benchmark A, VAX DECtp, VAX DECdta, VAX ACMS, VAX Server, VAX ft, VAX 9000, VAX cluster, VAX KODA
Reklama
Reklama
Peter M. Spiro
Ashok M. Joshi
T.
K. Rengarajan
Designing an Optimized
Transaction Commit
Protocol
Digital's database products,
VM
Rdb/KMS and
VRY DBiVJS,
share the same database k m e l called
KODA.
KODA
uses agrouping mechanism to commit nzany concurrent transactions together This feature enables high transaction rates in a transaction processing
(TP)
enviro?zment. Sincegroup commitprocessing affects the maximum throughput of the traizsaction processing system, the
KODA
group designed and implemented several grouping algorithms and studied their performance charac- teristics. Preliminary results indicate that it is possible to achieve up to a 66pwcent improvement in transaction througl?put
by
using more efficient grouping designs.
Digital has two general-purpose database products,
Rdb/\%fS software, which s u p p o r t s t h e relational data model, and
VAX
DBMS software, which sup- p o r t s t h e CODASYL (Conference o n Data Systems
Languages) data model. Both products layer o n t o p of a database kernel called KODA. In addition t o o t h e r database services, KODA provides t h e trans- action capabilities and commit processing for these two products.
In this paper, w e address s o m e of t h e issues rele- vant t o efficient c o m m i t processing. We begin by explaining t h e importance of c o m m i t processing in achieving high transaction throughput. Next, w e describe in detail t h e current algorithm for g r o u p c o m m i t used in KODA. We then describe and con- trast several n e w designs for performing a g r o u p commit. Following these discussions, w e present o u r experimental results. And, finally, w e discuss t h e possible direction of future work and s o m e conclusions. No attempt is made t o present formal analysis o r exhaustive empirical results for c o m m i t processing; rather, t h e focus is o n an intuitive untlerstanding of t h e c o n c e p t s and trade-offs, along with s o m e empirical results that s u p p o r t o u r conclusions.
Commit Processing
To follow a discussion of c o m m i t processing, two basic terms must first b e understood. We begin this section by defining a transaction and t h e "moment of commit."
A
transaction is t h e execution of o n e o r m o r e statements that access data managed by a database system. Generally, database management systems guarantee that the effects of a transaction are atomic, that is, either all updates performed within the con- text of the transaction are recorded in t h e database, o r n o updates are reflected in t h e database.
The point at which a transaction's effects become c o n c e p t is important because it allows database recovery t o proceed in a predictable manner after a transaction failure. If a transaction terminates abnormally before it reaches t h e moment of com- mit, then it aborts. As a result, t h e database system performs transaction recovery, which removes all effects of t h e transaction. However, if t h e trans- action has passed t h e moment of commit, recovery processing ensures that all changes made by the transaction are permanent.
Transaction Pro file
transaction processed by KODA i n t o four phases: t h e transaction start phase, t h e data manipulation phase, t h e logging phase, and t h e c o m m i t p r o c e s s ing phase. Figure
1 illustrates t h e phases of a trans- action in time sequence. The first three phases are collectively referred t o as " t h e average transaction's
CPU cost (excluding t h e cost of commit)" and t h e last phase (commit) as "the cost of writing a group c o m m i t buffer."'
Vol.
3
No.
1
Winter
1991
Digital Technical J o u r n a l
Designing an Optimized Transaction Commit Protocol
TlME
DATA
MANIPULATION START
-
LOGGING
COMMIT
Figure I
Phases in the Execution of a Transaction
The transaction start phase involves acquiring a transaction identifier and setting u p control data structures. This phase usually incurs a fixed overhead.
The data manipulation phase involves executing the actions dictated by an application program.
Obviously, t h e time spent in this phase and t h e amount of processing required depend o n t h e nature of the application.
At some point a request is made to complete the transaction. Accordingly in KODA, the transaction enters t h e logging phase which involves updating the database with t h e changes and writing t h e undo/redo information to disk. The amount of work done in the logging phase is usually small and con- stant (less than o n e
110) for transaction processing.
Finally, the transaction enters the commit pro- cessing phase. In KODA, this phase involves writing commit information t o disk, thereby ensuring that the transaction's effects are recorded in the data- base and now visible to other users.
For s o m e transactions, t h e data manipulation phase is very expensive, possibly requiring a large number of I/Os and a great deal of
CPU time. For example, if 500 employees in a company w e r e t o get a 10 percent salary increase, a transaction would have t o fetch and modlfy every employee/salary record i n t h e company database. The commit pro- cessing phase, in this example, represents 0.2 per- cent of the transaction duration. Thus, for this class of transaction, commit processing is a small frac- tion of the overall cost. Figure
2 illustrates t h e pro- file of a transaction moddying 500 records. applications, stock market transactions, o r t h e telephone system, t h e data manipulation phase is usually short (requiring few 1/0s). Instead, t h e log- ging and commit phases comprise t h e bulk of the work and must be optimized t o allow high trans- action throughput. The transaction profile for a transaction moddying o n e record is s h o w n in
Figure
3.
Note that t h e commit processing phase represents 36 percent of t h e transaction duration, in this example.
MANIPULATION
TlME
I
LOGGING
-
COMMIT
Figure
3
Profile of a Transaction Modifying
One Record
Group Commit
Generally, database systems must force write infor- mation t o disk in order t o commit transactions. In the event of a failure, this operation permits recov- e r y processing t o determine which failed trans- actions were active at the time of their termination and which ones had reached their moment of com- mit. This information is often in t h e form of lists of transaction identifiers, called commit lists.
Many database systems perform an optimized version of commit processing where commit infor- mation for a group of transactions is written to disk in o n e I/O operation, thereby, amortizing t h e cost of the I/O across multiple transactions. So, rather than having each transaction write its o w n commit list to disk, o n e transaction writes t o disk a com- mit list containing t h e commit information for a number of o t h e r transactions. This technique is referred t o in t h e literature as "group ~ o m m i t . " ~
COMMIT
LOGGING
Group commit processing is essential for achiev-
3
ing high throughput. If every transaction that reached t h e commit stage had t o actually perform an
1 / 0 t o t h e same disk t o flush its o w n commit
-
DATA
MANIPULATION
TlME information, t h e throughput of t h e database sys- tem would be limited t o t h e I/O rate of t h e disk. A magnetic disk is capable of performing 30 I/O
Figure
2
Profile of a Transaction iModifying
500
Records
tn contrast, for transaction processing applica- tions such as hotel reservation systems, banking operations p e r s e c o n d . Consequently, in t h e absence of group commit, t h e throughput of t h e system is limited t o 30 transactions p e r second
(TPS).
Group commit is essential t o breaking this performance barrier.
Digital Technical Journal
1'01.
.?
No.
1
Winter 1991
Transaction Processing,
Databases, and
Fault-tolerant Systems
There are several variations of the basic algo- rithms for grouping multiple commit lists into a single I/O. The specific group commit algorithm chosen can significantly influence the throughput and response times of transaction processing. One study reports throughput gains of as much as 25 percent by selecting an optimal group commit algorithm.'
At high transaction throughput (hundreds of transactions per second), efficient commit process- ing provides a significant performance advantage.
There is little information in the database litera- ture about the efficiency of different methods of performing a group commit. Therefore, we ana- lyzed several grouping designs and evaluated their performance benefits.
Factors Affecting Group Commit
Before proceeding to a description of the experi- ments, it is useful to have a better understanding of the factors affecting the behavior of the group com- mit mechanism. This section discusses the group size, the use of timers to stall transactions, and the relationship between these two factors.
Group Size An important factor affecting group commit is the number of transactions that partici- pate in the group commit. There must be several transactions in the group in order to benefit from
I/O amortization. At the same time, transactions should not be required t o wait too long for the group to build u p t o a large size, as this factor would adversely affect throughput.
It is interesting t o note that the incremental advantage of adding one more transaction t o a group decreases as the group size increases. The incremental savings is equal to
1/(G
x
(G
+
I)), where G is the initial group size. For example, if the group consists of
2 transactions, each of them does one-half a write. If the group size increases t o 3, the incremental savings in writes will be
(1/2
-
1/3), or 1/6 per transaction. If we do the same calculation for a group size incremented from 10 to 11, the savings will be (1/10
-
1/11), or 1/110 of a write per transaction.
In general, if G represents the group size, and I represents the number of I/Os per second for the disk, the maximum transaction commit rate is I x G
TPS.
For example, if the group size is 45 and the rate is 30 I/Os per second to disk, the maximum trans- action commit rate is 30 x
45, or 1350 TPS. Note that a grouping of only 10 will restrict the maximum
TPS to 300 TPS, regardless of how powerful the computer is. Therefore, the group size directly affects the maximum transaction throughput of the transaction processing system.
Use of Timers to Stall Transactions One of the mechanisms t o increase the size of the commit group is the use of timers!,' Timers are used t o stall the transactions for a short period of time
(on the order of tens of milliseconds) during com- mit processing. During the stall, more transactions enter the commit processing phase and s o the group size becomes larger. The stalls provided by the timers have the advantage of increasing the group size, and the disadvantage of increasing the response time.
Trade-offs This section discusses the trade-offs between the size of the group and the use of timers to stall transactions. Consider a system where there are 50 active database programs, each repeatedly processing transactions against a database. Assume that on average each transaction takes between
0.4 and 0.5 seconds. Thus, at peak performance, the database system can commit approximately 100 transactions every second, each program actually completing two transactions in the one-second time interval. Also, assume that the transactions arrive at the commit point in a steady stream at dif- ferent times.
If transaction commit is stalled for 0.2 sec- onds t o allow the commit group t o build up, the group then consists of about 20 transactions
(0.2 seconds x
100 TPS). In this case, each trans- action only incurs a small delay at commit time, averaging 0.10 seconds, and the database system should be able to approach its peak throughput of
100
TPS.
However, if the mechanism delays commit processing for one second, an entirely different behavior sequence occurs. Since the transactions complete in approximately 0.5 seconds, they accu- mulate at the commit stall and are forced to wait until the one-second stall completes. The group size then consists of 50 transactions, thereby maxi- mizing the I/O amortization. However, throughput is also limited to 50 TPS, since a group commit is occurring only once per second.
Thus, i t is necessary to balance response time and the size of the commit group. The longer the stall, the larger the group size; the larger the group size, the better the I/O amortization that is achieved.
However, if the stall time is too long, it is possible to limit transaction throughput because of wasted
CPU cycles.
Vo1.3 No.
1
Winter 1991 Digital Technical Journal
Designing a n Optimized
Transaction Commit Protocol
Motivation for Our Work
The concept of using commit timers is discussed in great detail by Reuter.' However, there are signifi- cant differences between his group commit scheme and our scheme. These differences prompted the work we present in this paper.
In Reuter's scheme, the timer expiration triggers the group commit for everyone. In our scheme, no single process is in charge of commit processing based on a timer. Our commit processing is per- formed by one of the processes desiring to write a commit record. Our designs involve coordination between the processes in order to elect the group committer (a process).
Reuter's analysis to determine the optimum value of the timer based on system load assumes that the total transaction duration, the time taken for com- mit processing, and the time taken for performing the other phases are the same for all transactions.
In contrast, we do not make that assumption. Our designs strive to adapt to the execution of many dif- ferent transaction types under different system loads. Because of the complexity introduced by allowing variations in transaction classes, we d o not attempt to calculate the optimal timer values as does Reuter.
Cooperative Commit Processing
In this section, we present the stages in perform- ing the group commit with cooperating processes, and we describe, in detail, the grouping design cur- rently used in
KODA, the Commit-Lock Design.
Group Committer
Assume that a number of transactions have com- pleted all data manipulation and logging activity and are ready to execute the commit processing phase. To group the commit requests, the follow- ing steps must be performed in
KODA:
1.
mation available to the group committer.
2 .
One of the processes must be selected as the
"group committer."
3.
The other members of the group need to be informed that their commit work will be com- pleted by the group committer. These processes must wait until the commit information is writ- ten to disk by the group committer.
4. Once the group committer has written the com- mit information to stable storage, it must inform the other members that commit processing is completed.
Commit-Lock Design
The Commit-Lock Design uses a
VMS
lock to gener- ate groups of committing transactions; the lock is also used to choose the group committer.
Once a process completes all its updates and wants to commit its transaction, the procedure is as follows. Each transaction must first declare its intent to join a group commit. In KODA, each pro- cess uses the interlocked quelle instructions of the
VAX
system running
VMS software to enqueue a block of commit information, known as a commit packet, onto a globally accessible commit queue.
The commit queue and the commit packets are located in a shared, writeable global section.
Each process then issues a lock request for the commit lock. At this point, a number of other processes are assumed to be going through the same sequence; that is, they are posting their commit packets and making lock requests for the commit lock. One of these processes is granted the commit lock. For the time being, assume the process that currently acquires the lock acts as the group committer.
The group committer, first, counts the number of entries on the commit queue, providing the number of transactions that will be part of the group commit. Because of the
VAX
interlocked queue instructions, scanning to obtain a count and concurrent queue operations by other processes can proceed simultaneously. The group committer uses the information in each commit packet to format the commit block which will be written to disk. In
KODA, the commit block is used as a commit list, recording which transactions have committed and which ones are active. In order to commit for a transaction, the group cornmitter must mark each current transaction as completed.
In addition, as an optimization, the group commit- ter assigns a new transaction identifier for each process's next transaction. Figure
4 illustrates a commit block ready to be flushed to disk.
Once the commit block is modified, the group committer writes i t to disk in one atomic I/O. This is the moment of commit for all transactions in the group. Thus, all transactions that were active and took part in this group commit are now stably marked as committed. In addition, as explained above, these transactions now have new transac- tion identifiers. Next, the group committer sets a commit flag in each commit packet for all recently committed transactions, removes all commit pack- ets from the commit queue, and, finally, releases the commit lock. Figure
5
illustrates a committed
Digital Technical Journal H)1.
.3
No. l
Winter
1991
Transaction Processing, Databases, and Fault-tolerant Systems
QUEUE
COMMIT
-
PACKET
CURR-TID
NEXT-TID
COMMIT-FLG 0
37
0
-
CURR-TID
NEXT-TID
COMMIT-FLG 0
32
0
-
CURR-TID
NEXT-TID
COMMIT-FLG 0
41
0 -+
CURR-TID
NEXT-TID
28
0
COMMIT-FLG 0
-
CURR-TID
NEXT-TID
COMMIT-FLG 0
39
0
COMMIT GROUP
I
COMMIT BLOCK
KEY:
CURR-TID CURRENT TRANSACTION IDENTIFIER
NEXT-TID NEXT TRANSACTION IDENTIFIER
COMMIT-FLG COMMIT FLAG
I
Figure
4
Commit Block
Ready to be Flushed to Disk
group with new transaction identifiers and with commit flags set.
At this point, the remaining processes that were part of the group commit are, in turn, granted the commit lock. Because their commit flags are already set, these processes realize they do not need to perform a commit and, thus, release the commit lock and proceed to the next transaction.
After all these committed processes release the commit lock, a process that did not take part in the group commit acquires the lock, notices i t has not been committed, and, therefore, initiates the next group commit.
There are several interesting points about using the
VMS
lock as the grouping mechanism. Even though all the transactions are effectively commit- ted after the commit block
I/O has completed, the transactions are still forced to proceed serially; that is, each process is granted the lock, notices that it is committed, and then releases the lock.
COMMIT
QUEUE
CURR-TID -1
NEXT-TD
42
COMMIT-FLG 1
I I
CURR-TID -1
NEXT-TID 43
I I
CURR-TID -1
NEXT-TID 44
I
COMMIT-FLG 1 COMMIT-FLG 1
Y
COMMITTED GROUP
KEY:
CURR-TID
NEXT-TID
CURRENT TRANSACTION IDENTIFIER
NEXT TRANSACTION IDENTIFIER
COMMIT-FLG COMMIT FLAG
NEXT COMMIT PACKET
-
CURR-TIE
NEXT-TID
28
0
COMMIT-FLG
0
-
CURR-TID
NEXT-TID
COMMIT-FLG
0
39
0
--+
CURR-TIE
NEXT-TIE
29
0
COMMIT-FLG
0
1
CURR-TID NEXT-TIE
37 42
I I
Figure
5
Committed Group
Vol.
3
No.
1
Winter
1991
Digital Technical Journal
Designing an Optimized Transaction Commit Protocol
So there is a serial procession of lock enqueues/ dequeues before the next group can start.
This serial procession can be made more concur- rent by, first, requesting the lock in a shared mode, hoping that all processes committed are granted the lock in unison. However, in practice, some pro- cesses that are granted the lock are not committed.
These processes must then request the lock in an exclusive mode. If this lock request is mastered on a different node in a VAXcluster system, the lock enqueue/dequeues are very expensive.
Also, there is no explicit stall time built into the algorithm. The latency associated with the lock enqueue/dequeue requests allows the commit queue to build up. This stall is entirely dependent on the contention for the lock, which in turn depends on the throughput.
Group Commit Mechanisms
-
Our New Designs
To improve on the transaction throughput provided by the Commit-Lock Design, we developed three different grouping designs, and we compared their performances at high throughput. Note that the basic paradigm of group commit for all these designs is described in the Group Committer sec- tion. Our designs are as follows.
Commit-Stall Design
In the Commit-Stall Design, the use of the commit lock as the grouping mechanism is eliminated.
Instead, a process inserts its commit packet onto the commit queue and, then, checks to see if it is the first process on the queue. If so, the process acts as the group committer. If not, the process schedules its own wake-up call, then sleeps. Upon waking, the process checks to see if i t has been committed. If so, the process proceeds to its next transaction. If not, the process again checks to see if it is first on the commit queue. The algorithm then repeats, as described above.
This method attempts to eliminate the serial wake-up behavior displayed by using the commit lock. Also, the duration for which each process stalls can be varied per transaction to allow explicit control of the group size. Note that if the stall time is too small, a process may wake up and stall many times before it is committed.
As we have seen before, a delay in the commit sequence is a convenient means of converting a response time advantage into a throughput gain. If we increase the stall time, the transaction duration increases, which is undesirable. At the same time, the grouping size for group commit increases, which is desirable. The challenge is to determine the optimal stall time. Reuter presented an analyti- cal way of determining the optimal stall time for a system with transactions of the same type!
Ideally, we would like to devise a flexible scheme that makes the trade-off we have just described in real time and determines the optimum commit stall time dynamically. However, we cannot deter- mine the optimum stall time automatically, because the database management system cannot judge which is more important to the user in a general customer situation
- or the throughput.
The Willing-to-Wait Design provides a user param- eter called wTW time. This parameter represents the amount of time the user is willing to wait for the transaction to complete, given this wait will benefit the complete system by increasing through- put. wnxl time may be specified by the user for each transaction. Given such a user specification, it is easy to calculate the commit stall to increase the group size. This stall equals the
W W the time taken by the transaction thus far, but only if the transaction has not already exceeded the
WTW time. For example, if a transaction comes to commit processing in 0.5 second and the wrw time is 2.0 seconds, the stall time is then 1.5 seconds. In addition, we can make a further improvement by reducing the stall time by the amount of time needed for group commit processing. 'This delta time is constant, on the order of 50 milliseconds
(one
I/O plus some computation).
The wTw parameter gives the user control over how much of the response time advantage (if any) may be used by the system to improve transaction throughput. The choice of an abnormally high value of wTw by one process only affects its own trans- action response time; it does not have any adverse effect on the total throughput of the system.
A
low value of wTw would cause small commit groups, which in turn would limit the throughput. However, this can be avoided by administrative controls on the database that speclfy a minimum wTw time.
Hiber Design
The Hiber Design is similar to the Commit-Stall
Design, but, instead of each process scheduling its own wake-up call, the group committer wakes up all processes in the committed group. In addition, the group committer must wake up the process that will be the next group committer.
Digital Technical Journal
1/01.
3
No.
1
Winter 1991
75
Transaction Processing, Databases, and Fault-tolerant Systems
Note, this tlesign exhibits a serial wake-up behav- ior like the Commit-Lock Design, however, the mech;inisrn is less costly than the viMS lock used by the Commit-Lock Design. 111 the Hiber I)esign, if a process is not the group committer, it simply sleeps; it cloes not schedule its own wake-up call.
Therefore, each process is guaranteed to sleep and wake u p at most once p e r commit, in contrast to the Commit-Stall Design. Another interesting char- acteristic of the Hiber Design is that the group committer can choose t o either wake u p the next group committer immediately, o r it can actually schedule the wake-up call after a delay. Such a delay allows the next group size to become larger.
Experiments
We implemented and tested the Commit-Lock, the
Commit-Stall, and the Willing-to-Wait designs in
KOIIA.
The objectives of our experiments were
To find out which design would yielcl t h e mnxirnum throughput under response time constraints
'To 11nderst;lnd the performance charactcristics o f the designs
In the following sections, we present the c1et;iils o f our experimetlts, the results we obtained, and some observations.
Details of tl7e
Experiments
'l'he hardware used for all of the following tests was a
VAX
6340
with four processors, each rated at
3.6
VAX
units of performance (WP). The total possible
<:PI) was
400
percent and the total pro- cessing power of the computer was
14.4
VllPs. As the commit processing becomes more significant in
;I transaction (in relation t o the other phases), the impact of the grouping mechanism on the trans- action throughput increases. Therefore, in order to accentuate the performance differences between the various designs, we performed our experiments using
;I transaction that involved no database activ- ity except to follow the commit sequence. So, for all pr;ictical purposes, the TPS d;it;i presented in this paper can be interpreted as "commit sequences per second." Also, note that our system imposecl an upper limit of
50
on the grouping size.
Results
Using the Commit-Lock Design, transaction pro- cessing bottler~ecked at
300
TPS. Performance gre;itly improved with the Commit-Stall Design; the maximum throughput was
464
'rl'S.
The
Wil ling-to-IV'tit Design provided the highest throughput,
500
TPS. Using this last design, it was possible to achieve u p to a
66
percent improve- ment over the less-efficient Commit-Lock Design.
Although both timer s c h e n ~ e s , the Commit-
Stall and Willing-to-Wait designs, neetletl tillling to set the parameters and the Commit-Lock Design did not, we observed that the maximum through- put obtained using timers is much better than that obtained with the lock. These results were similar to those of Reuter.
For our Willingto-Wait Design, the minimum transaction duration is the
WTW
time. Therefore, the m;~ximum the number of servers, and the
WTWr stall time, measured in milliseconds, are related by t h e formula: number of servers x
100O/WTW
= maximum TPS. For example, o u r maximum TPS for t h e
W T W
design was obtained with
50
servers and
9 0
milliseconds
WTW
time.
Using t h e formula,
50
x
1000/90
=
555.
The actiral
TPS achieved was
500,
which is
90
percent of the maximum TPS. This ratio is also a measure of the effectiveness of the experiment.
During our experiments, the rn;~ximum size observed was
45
(with the Willing-to-Wait
Ilesign). This is close to the system-imposed limit of
50 and, so, we may be able to get better grouping with higher limits on the size of the group.
Observa tions
In
the Commit-Stall and the Willing-to-Wait designs, given a constant stall, if the number of servers is incrcascd, the 1'PS increases and then decreases.
The rate of decrease is slower than the ratc of increase. The TPS decrease is tlue to
CPLJ overload- ing. The TPS increase is due to more servers trying to execute transactions and better CPII utilization.
Figure
6
illustrates how TPS varies with the num- ber of servers, given a constant st;ill
WIW time.
Again, in the stalling designs, for a constant num- ber of servers, if the stall is increased, the TPS increases and then decreases. The TPS increase is due to better grouping and the decrease is due to
<:Ptt untlerutilization. Figures 7 and 8 show the effects o n TPS when you vary the commit-stall time o r the
WTWr time, while keeping the number of servers constant.
Ih
maximize TPS with the Commit-Stall Design, the following "mountain-climbing" algorithm was usefi11. This algorithm is based on the previous two observations. Start with a reasonable value of the stall and the number of servers, such that the
(;I-'[J is unclerutilized. Then increase the number of servers.
CPU utilization and t h e TI'S increase.
Wl.
.$
No. I
W'i~zter
1391 D i g i t a l Tecb~ricul
NOTE: THE WILLING-TO-WAIT STALL TlME IS A CONSTANT
100 MILLISECONDS.
Figure
NUMBER OF SERVERS
6 Transactions per Second in
Relationship to the Number of
Servers, Given a Constant
Continue until the
CPlJ is overloaded; then, increase the stall time. CPU utilization decreases, but the
TPS increases due to the larger group size.
This algorithm demonstrates that increasing the number of servers and the stall by small amounts at a time increases the TPS, but only up to a limit. After this point, the TPS drops. When close to the limit, the two factors may be varied alternately in order to find the true maximum.
Table 1 shows the performance measurements of the Commit-Stall Design. Comments are included in the table to highlight the performance behavior the data supports.
The same mountain-climbing algorithm is modi- fied slightly to obtain the maximum TPS with the
Willing-to-Wait Design. The performance measure-
WILLING-TO-WAIT TlME (MILLISECONDS)
NOTE. THE NUMBER OF SERVERS EQUALS 65.
Figure 8 Transactions per Secondin
Relc~tionship WTW Time,
Given a Constant Number of Seruers
ments of this design are presented in Table
2.
As we have seen before, the maximum
TPS with this design is inversely proportional to the wTw time, of Table 2 illustrate this behavior. The rest of the table follows the same pattern as Table 1.
The Willing-to-Wait Design performs slightly better than the Commit-Stall Design by adjusting to the variations in the speed at which different servers arrive at the commit point. Such variations are compensated for by the variable stalls in the
Willing-to-Wait Design. Therefore, if the variation is high and the commit sequence is a significant portion of the transaction, we expect the Willing- to-Wait Design to perform much better than the
Commit-Stall Design.
COMMIT-STALL TlME (MILLISECONDS)
NOTE: THE NUMBER OF SERVERS EQUALS 50
Figure 7 Transactions per Secondin
Rehtionship to the Commit-Stall
Time, Given
n
Constant Number of Servers
Future Work
There is scope for more interesting work to further optimlze commit processing in the
KODA database kernel. First, we would like to perform experi- ments on the Hiber Design and compare i t to the other designs. Next, we would like to explore ways of combining the Hiber Design with either of the two timer designs, Commit-Stall or Willing-to-
Wait. This may be the best design of all the above, with a good mixture of automatic stall, low over- head, and explicit control over the total stall time.
In addition, we would like to investigate the use of timers to ease system management. For example, a system administrator may increase the stalls for all transactions on the system in order to ease
CPU contention, thereby increasing the overall effective- ness of the system.
D i g i t a l Technical J o u r n a l Vol.
.3
.\?),
I K'inter 1991
Transaction Processing, Databases, and Fault-tolerant Systems
Table
1
Commit-Stall Design Performance Data
Number of Commit Stall CPU Utilization
Servers (Milliseconds) (Percent)* TPS Comments
Starting point lncreased number of servers, therefore, higher TPS lncreased number of servers, therefore, CPU saturated lncreased stall, therefore, CPU less utilized
"Over-the-hill" situation, same strategy of further increasing the number of servers does not increase TPS
No benefit from increasing number of servers and stall
No benefit from just increasing stall
*
Four processors were used in the experiments. Thus, the total possible CPU utilization is 400 percent.
Table
2
Willing-to-Wait Performance Data
Servers
Willing-to-Wait
Number of Stall CPU Utilization
(Milliseconds) (Percent)* TPS Comments
Starting point, CPU not saturated
Decreased stall to load CPU, CPU still not saturated
Decreased stall again
Further decreased stall, CPU almost saturated lncreased number of servers, CPU more saturated lncreased stall to lower CPU usage, maximum TPS increasing number of servers does not increase TPS
No benefit from just increasing stall
Four processors were used in the experiments. Thus, the total possible CPU utilization is 400 percent.
Conclusions
We have presented the concept of group commit processing as well as a general analysis of various options available, some trade-offs involved, and some performance results indicating areas for pos- sible improvement. It is clear that the choice of the algorithm can significantly influence performance at high transaction throughput. We are optimistic that with some further investigation an optimal commit sequence can be incorporated into Rdb/VMS and
VAX
DBMS with considerable gains in trans- action processing performance.
Acknowledgments
We wish t o acknowledge the help provided by
Rabah Mediouni in performing the experiments discussed in this paper. We would like t o thank
Phil Bernstein and Dave Lomet for their careful reviews of this paper. Also, w e want to thank the other
KODA group members for their contri- butions during informal discussions. Finally, we would like to acknowledge the efforts of Steve Klein w h o designed the original
KODA group commit mechanism.
References
1.
I?
Helland, H. Sammer, J. Lyon, R. Carr,
I?
Garrett, and A. Reuter, "Group Commit Timers and High
Volume Transaction Processing Systems,"
High
Performance Transaction Systems, Proceedings of the 2nd International Workshop
(September
1987).
2.
D.
Gawlick and
D.
Kinkade, "Varieties of Con- currency Control in
IMSrVS
Fast Path:'
Engineering
(June
1985).
Database
Vo1.
3
No.
1 Winter
1991 Digital Technical Journal
Atsisiųsti
Reklama