已阅读5页,还剩7页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
毕业设计 论文 外文资料 原文及译文 专 业 班 级 学 号 姓 名 指 导 教 师 毕业设计 论文 外文资料 原文 1 原文出处 原文出处 by Michael J Carey Michael J Franklin Miron Livny Eugene J Shekita Computer Sciences Technical Report 994 January 1991 Data Caching Tradeoffs in Client Server DBMS Architectures In this paper we examine the performance tradeoffs that are raised by caching data in the client workstations of a client server DBMS We begin by presenting a range of lock based of the well understood problem of replicated data management We then use a detailed simulation model to study the performance of these algorithms over a wide range of workloads and systems resource configurations The results illustrate key performance tradeoffs related to client server cache consistency and should be of use to designers of next generation DBMS prototypes and products 1 INTRODUCTION With networks of powerful workstations becoming commonplace in scientific engineering and even office computing environments client server software architectures have become a common approach to providing access to shared services and resources Most commercial relational database management systems today are based on client server architectures with SQL queries and their results serving as the basis for client server interactions In the past few years a number of object oriented DBMS prototypes and products have appeared virtually all of which are based on client server architectures Compared to relational database systems these systems generally take a different approach when it comes to client server interactions In order to offload processing to client workstations it is common for client server interaction in an OODBMS to take place at the level of individual objects or pages of objects rather than queries Prototypes based on object level interaction include Orion and O2 among others Among the prototypes based on page level interactions are ObServer and the current version of the EXODUS storage manager the ObjectStore system from Object Design is an example of a commercial OODBMS product based on page level interactions In architectures where data pages or objects are the basis for client server interactions it is possible to cache data in the local memories of client workstations for later reuse Such caching can reduce the need for client server interaction lessening the network traffic and message processing overhead for both the server and its clients It also enables client resources to be used by the DBMS thus increasing both the aggregate memory and the aggregate CPU power available for database related processing An increase in the aggregate memory of the DBMS can reduce the I O load on the server while an increase in the aggregate CPU power available to the DBMS can reduce the load on the server CPU s Depending on the nature of the applications including their balance of I O and CPU demands their locality of access and the proportional cost of their DBMS accesses relative to their overall computational requirements increasing the 毕业设计 论文 外文资料 原文 2 aggregate resources of the DBMS can result in significant performance improvements Of course in applications where the response time is dominated by the time spent at the client CPU or where a large fraction of the DBMS is accessed relative to the size of the client buffer pool the performance benefits of caching would be negligible Despite its potential caching is not a performance panacea In order to incorporate caching the DBMS must include a protocol that ensures cache consistency Such a protocol may be complex to implement it may entail a significant amount of processing overhead and its impact on system performance may be workload dependent Depending on how the protocol and the workload interact the cache consistency protocol might actually increase the load on the server and or the client workstations due to its overhead particularly when there are a large number of client workstations Another potential pitfall which depends on the concurrency control scheme used by the protocol is the late discovery of data conflicts Thus the potential consequences of adding caching to a client server DBMS range from a significant improvement in performance to a notable degradation in performance An example of a workload where caching can be highly beneficial is the Sun Engineering Database Benchmark In this paper we examine the data caching performance tradeoffs discussed above We begin by presenting a range of lock based cache consistency algorithms that result from recognizing that cache consistency is simply a variant of the replicated data management problem studied by distributed DBMS researchers For concreteness we focus our attention on systems where client server interaction are page based This approach also referred to as the block server approach was shown to perform well for CAD style data access patterns in a recent performances study Also our work was motivated by a desire to understand performance tradeoffs in our own page based client server storage managers Given this set of cache consistency algorithms we then describe a detailed simulation model that was developed to study their performance over a wide range of workloads and system resource configurations The performance of transaction oriented cache consistency algorithms has been examined in several related contexts The only other client server data caching study that we know of is a recent simulation study at HP Laboratories Our work differs from their work in several ways First we employ a much more detailed model of buffering the importance of which will be clear from our results Second we study a broader range of DBMS workloads Our work is also related to studies of shared disk architectures including the work by Bhide and by a DBMS performance group at IBM Yorktown Again our work differs from these efforts in several ways First shared disk and client server DBMS architectures are qualitatively different 2 CACHE CONSISTENCY ALGORITHMS In this section we present the cache consistency algorithms that are the focus of this paper Before doing so however we review the page server approach to a client server DBMS and explain how cache consistency is related to replica management in a distributed DBMS 2 1 Page Server Architecture The general architecture of a caching client server DBMS is depicted in Figure 1 The system consists of a database server which is connected to N client workstations via a local area network The system s secondary storage which includes one or more disks on which the database is stored and a disk for the log is connected to the server The software of the DBMS includes components that reside on both the server and the clients so applications running on client workstations can view the DBMS essentially as a locally available service The DBMS has buffer pool space 毕业设计 论文 外文资料 原文 3 available on both the server and on the client workstations and it is free to manage this space as it sees fit in order to optimize the overall performance of the DBMS In the page server architecture pages are the unit of client server data transfer and also serve as the unit of data caching Process wise we assume that each client application runs as a process that is separate from the DBMS We further assume that the DBMS itself consists of a multi thread database server process and a collection of multi threaded client database processes It is also assumed that there are one or more client application processes and exactly one database client process per client workstation We will not concern ourselves with details of how the client application and database processes interact within a client workstation this is system dependent and may be handled through database library calls or through virtual memory assisted page faulting All that matters here is that client applications can somehow submit requests to the client database In addition the database client and server processes can communicate both synchronously and asynchronously with respect to client application processes in order to handle cache misses updates and cache consistency Finally since the database client processes are separate from client application processes their state outlives client transactions Thus they are free to cache data both within and across transaction boundaries as long as system wide cache consistency is maintained Other recent work on client server cache consistency has approached the problem from first principles In that work two algorithms were developed and analyzed One of the algorithms was developed by viewing cached pages as snapshots of server pages and characterizing them according to their current state relative to the server s version this is similar to analogy with notification ideas from the active database area Both of these algorithms required that certain conditions be checked and later rechecked in order to avoid potential race conditions between transactions Given the general system model described above a cleaner approach can be arrived at by recognizing that cached data just like replicated data in a distributed DBMS though they resides in main memory rather than on disk Thus all of the well known results on replica management theory and algorithms can be applied to the client server cache consistency problem Given this observation we now present five candidate algorithms for maintaining client server cache consistency The first algorithms is a two phase locking scheme based on the primary copy approach to replica management in which data is not cached between client transactions The second algorithm extends the first to allow for inter transaction data caching The other three algorithms are each based on optimistic variant of two phase locking studied in where updates to remote copies of replicated data are deferred until handles updates by propagating new data values to the remote caches the final algorithm takes a dynamic approach choosing between invalidation and propagation on a per page basis In all five algorithms the client database process must request data from the database server if a cache miss occurs and data can be safely cached within the context of a single transaction it should not be necessary for a transaction to re fetch the same data again unless its working set is large relative to the available client buffer space Also in all algorithms committing a transaction involves sending a commit message with copies of all updated pages and their associated log records back to the server This allows the server to handle future requests for the modified data directly even if the client workstation is turned off or crashes in the meantime 2 2 Basic Two Phase Locking 毕业设计 论文 外文资料 原文 4 The first algorithms is a primary copy locking algorithm in which the client database process discards cached data between transactions Transactions set read locks on the data pages that they access upgrading their read locks to write locks if an item is to be updated All first time lock requests are sent to the server which serves as the primary copy site Subsequent requests for locks on pages that the transaction has already locked do not require an interaction with the server as long as the mode of the new request is same as that of the existing lock Read lock requests and page access requests are combined and the server s response is to return the requested page after obtaining a read lock on the page for the requesting client transaction All locks are handled through centralized deadlock detection on the server when lock waits occur Deadlock resolution involves aborting the transaction with the most recent initial startup time among those involved in the deadlock This algorithm is of interest because it is a simple starting point it is currently in use in the client server EXODUS storage manager and it was also used as a baseline algorithm in 2 3 Caching Two Phase Locking The second algorithm is a refinement of B2PL in which inter transaction data caching is permitted As in B2PL all locking and deadlock detection duties are the responsibility of the server Thus all first time lock requests require a round trip message interchange between client and server database processes Unlike B2PL however the contents of the client buffer pool are retained across transactions Despite this retention C2PL guarantees that transactions always read valid data by having the server piggyback updated copies of pages when necessary on reply messages to lock requests In order for the server to know when an updated page must be supplied a lock request includes the locally known log sequence number of the page if the page is cached at the requesting client The server compares this LSN with the page s true LSN to determine if the cached copy is still valid To facilitate the LSN check the server maintains a table containing the LSNs of all pages that are currently cached on one or more client workstations It does so by recording the LSN when it provides a page to a client and clients inform the server when they no larger have a copy of a given page For example wherever a client selects a clean cached page for replacement it simply discards the page and then notifies the server as soon as it is conveniently possible to do so This is accomplished by piggybacking a list of recently discards pages on the next message that it sends to the server 2 4 Optimistic Two Phase Locking The next three algorithms referred to collectively as the O2PL family of cache consistency algorithms are all based on a read one write all optimistic locking scheme studied in for distributed replica management These algorithms differ from C2PL in that prior to transaction commit time clients set read and write locks locally without obtaining locks at the server Moreover a client cache miss causes the client set read and write locks locally without obtaining locks at the server Moreover a client cache miss causes the client to request the page from the server as usual but a read lock is acquired and held on the server only enough for the server to obtain a stable copy of the page to send back to the client The server keeps track of which client caches have current copies of which pages Note that optimistic locking schemes have also been proposed for shared disk systems for example the semi optimistic pass the buck locking scheme of In the O2PL algorithms client updates are performed locally but they are not permitted to 毕业设计 论文 外文资料 原文 5 migrate back to the server s buffer pool until the associated update transaction enters its commit phase At the time the client database process associated with the updated transaction sends a commit message to the server containing a copy of each page that has been updated by the transaction the server then acquires update copy locks on these pages on behalf of the update transaction Once these locks have been acquired the server sends a prepare to commit message to all other client database processes that contain cached copies of any of the updated pages These client database processes request update copy locks on the updated data on behalf of the committing transaction Once all of the relevant update copy locks have been obtained variant specific O2PL actions are taken Update copy locks are exclusive locks that enable certain deadlocks to be detected early Being exclusive locks if another transaction holds a read lock on a page when an update copy lock is requested for it the committing update transaction will wait until the reader completes A conflict between an update copy lock and a write lock indicates an impending distributed deadlock and it can be resolved as such without further delay Other deadlocks including distributed deadlocks are possible they are dealt with by having the client and server database processes check for local deadlocks and by having the server periodically check for distributed deadlocks a la 2 4 1 Update Invalidation In the invalidation variant of O2PL the variant specific action is the invalidation of other cached copies of updates pages That is a committing update transaction acquires update copy locks on all copies of the updated pages At the server these locks enable the committing transaction to safely install its updates On other clients however they enable it to safely invalidate cached copies of the page Once all updated pages have been invalidated these other clients send a prepared to commit message back to the server release their update copy locks and then drop out of the commit protocol The server can commit the update transaction when all sites containing cached copies of the updated data have responded at which point only the server and the client that originated the update have copies of the updated data 2 4 2 Update Propagation In the propagation variant of O2PL the variant specific action is the propagation of updates to other cached copies of update pages Thus the O2PL P algorithm keeps all clients informed of any changes made to the data resident in their local caches As in O2PL I a committing update transaction acquires update copy locks on all copies of pages to be updated In this case however these locks are used to enable the committing transaction to safely install its updates on every machine that holds a copy of the updated data Since updates must be installed on the server and all clients atomically O2PL P employs a two phase commit protocol rather than the one phase commit that suffices for O2PL I Also the prepare to commit messages that server sends to clients in this case must include copies of the relevant updates these updates are installed during the second phase of the commit protocol to avoid overwriting valid cached pages before the outcome of the update transaction is certain 毕业设计 论文 外文资料 译文 1 译文 译文 在客户机在客户机 服务器服务器 DBMS 体系结构体系结构 数据缓存的权衡数据缓存的权衡 迈克迈克 J 凯里凯里 迈克迈克 J 富兰克林富兰克林 迈伦迈伦 利夫内利夫内 尤金尤金 J 舍基塔舍基塔 在本文中 我们审查的性能权衡所提出的缓存数据在客户端工作站客户端 服务器的 数据库管理系统 我们首先提出一系列基于锁的易于理解的复制数据管理的问题 然后 我们在一个广泛的工作负载
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- KR-27452-生命科学试剂-MCE
- 2026年有趣性格测试题目及答案
- 2026年公文筐处理测试题及答案
- 2026年流星没有耳朵测试题及答案
- 2026年考研单词测试题目及答案
- 2026年小学毕业基础测试题及答案
- 2026年装修水电测试题及答案
- 2026年哈利波特真爱粉测试题及答案
- 2026年如何创建趣味测试题及答案
- 值得孩子做的题目及答案
- 企业网络布线安装手册
- 历年中医内科副高真题及答案
- 党建主题公园内设计方案
- 干眼症的睑板腺按摩
- 主变压器教学课件
- 2024年中国铁路太原局招聘考试笔试题库及答案
- 剪映零基础教学课件
- 留置看护笔试题及答案
- 2025年广西大学生乡村医生专项计划招聘50人考试参考试题及答案解析
- QC/T 273-2025汽车用铝合金压铸件技术条件
- 江苏省南通市如皋市2024-2025学年七年级下学期6月期末历史试题(含答案)
评论
0/150
提交评论