Lazy Reference Counting for Transactional Storage Systems

Total Page:16

File Type:pdf, Size:1020Kb

Lazy Reference Counting for Transactional Storage Systems Lazy Reference Counting for Transactional Storage Systems Miguel Castro, Atul Adya, Barbara Liskov Lab oratory for Computer Science, Massachusetts Institute of Technology, 545 Technology Square, Cambridge, MA 02139 fcastro,adya,[email protected] Abstract ing indirection table entries in an indirect pointer swizzling scheme. Hac isanovel technique for managing the client cache Pointer swizzling [11 ] is a well-established tech- in a distributed, p ersistent ob ject storage system. In a companion pap er, we showed that it outp erforms nique to sp eed up p ointer traversals in ob ject- other techniques across a wide range of cache sizes oriented databases. For ob jects in the client cache, and workloads. This rep ort describ es Hac's solution it replaces contained global ob ject names by vir- to a sp eci c problem: how to discard indirection table tual memory p ointers, therebyavoiding the need to entries in an indirect pointer swizzling scheme. Hac uses translate the ob ject name to a p ointer every time a lazy reference counting to solve this problem. Instead reference is used. Pointer swizzling schemes can b e of eagerly up dating reference counts when ob jects are classi ed as direct [13 ] or indirect [11 , 10 ]. In direct mo di ed and eagerly freeing unreferenced entries, which schemes, swizzled p ointers p oint directly to an ob- can b e exp ensive, we p erform these op erations lazily in the background while waiting for replies to fetch and ject, whereas in indirect schemes swizzled p ointers commit requests. Furthermore, weintro duce a number p oint to an indirection table entry that contains of additionaloptimizations to reduce the space and time a p ointer to the ob ject. Indirection allows Hac overheads of maintaining reference counts. The net to eciently evict cold ob jects from the cache and e ect is that the overhead of lazy reference counting compact hot ob jects to avoid storage fragmenta- is low. tion | when an ob ject is evicted or moved, it is Keywords: reference counting, p ointer swizzling, not necessary to nd and correct all p ointers to transactions, caching, p erformance the ob ject; instead, we can just x the ob ject's en- try in the indirection table. However, it intro duces 1 Intro duction the problem of reclaiming storage in the indirection Hac is a novel technique for managing the client table. cache in a client-server, p ersistent ob ject storage Reference counting [5 ] is a simple incremental system [4]. It combines page and ob ject caching to automatic storage reclamation technique. It main- reduce the miss rate in client caches dramatically tains a count of the numb er of references p ointing while keeping overheads low. Hac provides im- to an item and reclaims the item when its count proved p erformance over earlier approaches|by drops to zero. Existing reference counting schemes more than an order of magnitude on common work- su er from four problems [14 ] | space overheads, loads [4 ]. The contribution of this rep ort is to do c- the problem of cycles, the cost of reclaiming the ument lazy reference counting: the technique used unreferenced entries, and the cost of changing ref- by Hac to solve the sp eci c problem of discard- erence counts at every p ointer up date. Our lazy reference counting scheme overcomes these prob- This research was supp orted in part by the Advanced lems. First, it uses only one-byte reference counts Research Pro jects Agency of the Department of Defense, with larger counts stored in a separate table. Sec- monitored by the Oce of Naval Research under contract ond, the inability to collect cyclic garbage using ref- N00014-91-J-4136. M. Castro is supp orted by a PRAXIS erence counts is not a problem here since evicting XXI fellowship. ob jects from the cache breaks cycles. Third, freeing 1 found in [8]. We serialize transactions using opti- an unreferenced entry is achieved by simply setting mistic concurrency control; the mechanism is de- a bit in the entry reusing the entry is similarly scrib ed in [1 , 7]. Our concurrency control algo- inexp ensive. Finally, reference counts are not cor- rithm outp erforms the b est p essimistic metho ds on rected at every p ointer up date but only once at the almost all workloads [7 ]. end of a transaction to account for all of the trans- action's mo di cations. Furthermore, lazy reference Hac partitions the client cache into page frames counting p erforms reference count adjustments and and fetches entire pages from the server. To make frees unreferenced entries in the background while ro om for an incoming page, Hac selects some page the clientiswaiting for replies to fetch and commit frames for compaction, discards the cold ob jects requests. in these frames, and compacts the hot ob jects to free one of the selected frames. The approach is This rep ort describ es how lazy reference count- illustrated in Figure 1. This compaction pro cess is ing is implemented in Hac [4 ] and presents the re- p erformed in the background while waiting for the sults of exp eriments that evaluate its p erformance. fetch reply. The results show that the lazy reference counting scheme has low space and time overheads. Before compaction Even though we fo cus on the implementation of lazy reference counting in Hac, the algorithm and 1 5 eintro duce could b e ap- most of the optimizations w 3 6 7 e other related problems. For example, plied to solv 4 2 assume a client cache management scheme where Framet 14 Frame 2 Frame 53 direct swizzling is used and pages are evicted by Cold object read protecting the virtual page frame where they After compaction Hot object ere mapp ed. In this setting, lazy reference count- w 4 1 can be used to determine when there are no ing 5 Free 2 6 Frame more p ointers to the virtual page frame, allowing 3 7 it to b e reused to map a di erent page. rest of the rep ort is organized as follows. The Frame 14 Frame 2 Frame 53 Section 2 presents an overview of our system and ob ject naming scheme. Section 3 describ es lazy Figure 1: Compaction of pages by Hac reference couting. The results of our exp eriments are presented in Section 4. While a transaction runs, the client keeps track of ob jects it used in the read set, and ob jects it mo di ed in the write set. Additionally, when a 2 System Overview transaction mo di es an ob ject for the rst time, the Hac and lazy reference counting are part of client makes a copy of the ob ject in the undo log. Thor-1, a new implementation of the Thor ob ject- These copies are used to restore mo di ed ob jects to oriented database system; more information ab out their previous state when transactions ab ort. The Thor-1 can be found in [4]. This section b egins copies are imp ortant b ecause they sp eed up the re- with a brief overview of the client and server execution of ab orted transactions. This mechanism architectures. Next, it describ es ob ject naming and is essential for our optimistic concurrency control indirect swizzling. scheme to outp erform lo cking alternatives [7 ]. The space dedicated to holding the undo log has a 2.1 Clients and Servers limited size; when it lls up, no more copies are created. We exp ect a small bu er to be capable The system is made up of clients and servers. of holding copies of all mo di ed ob jects for most Servers provide p ersistent highly available stor- transactions [7 ]. age for ob jects. Clients cache copies of p ersistent When a transaction commits, the client sends the ob jects. Application transactions run entirely at new versions of all ob jects mo di ed or created by clients, on the cached copies. More information the committing transaction to a server, along with ab out the client interface to the database can be 2 the names of ob jects that were read and written swizzle table; it is used to translate ob ject names during the current transaction. The server vali- into p ointers to indirection table entries. The dates the transaction against those that have al- table is implemented as an over ow chaining hash ready committed or prepared we use a two-phase table. Eachentry in the indirection table contains proto col if the transaction used ob jects at multiple a p ointer to the elds of some ob ject or null if that servers. If validation succeeds, information ab out ob ject has b een discarded, a reference count, and the committing transaction, including all its mo di- a next p ointer used to link the entries that make up a hash table bucket. cations is forced to the transaction log; only after the information has b een recorded on stable stor- 3 Reference Count Management age do es the server inform the client of the commit. When a transaction that mo di ed ob ject o Indirection table entries are freed using the lazy commits, it causes all other clients that cache o reference counting scheme. The scheme takes ad- to contain out of date information. We cause vantage of the copies maintained by our concur- invalid information to be ushed from caches rency control algorithm in the undo log to up- by sending invalidations piggybacked on other date reference counts and free entries eciently at messages already b eing sent.
Recommended publications
  • Virtual Memory
    Topic 18: Virtual Memory COS / ELE 375 Computer Architecture and Organization Princeton University Fall 2015 Prof. David August 1 Virtual Memory Any time you see virtual, think “using a level of indirection” Virtual memory: level of indirection to physical memory • Program uses virtual memory addresses • Virtual address is converted to a physical address • Physical address indicates physical location of data • Physical location can be memory or disk! 0x800 Disk:Mem: 0x803C4 0x3C00 Virtual address Physical address 2 Virtual Memory 3 Virtual Memory 1 4 Virtual Memory: Take 1 Main memory may not be large enough for a task • Programmers turn to overlays and disk • Many programs would have to do this • Programmers should have to worry about main memory size across machines Use virtual memory to make memory look bigger for all programs 5 A System with Only Physical Memory Examples: Most Cray machines, early PCs, nearly all current embedded systems, etc. Memory 0: 1: Store 0x10 CPU Load 0xf0 N-1: CPU’s load or store addresses used directly to access memory. 6 A System with Virtual Memory Examples: modern workstations, servers, PCs, etc. Memory 0: Page Table 1: Virtual Physical Addresses 0: Addresses 1: Store 0x10 CPU Load 0xf0 P-1: N-1: Disk Address Translation: the hardware converts virtual addresses into physical addresses via an OS-managed lookup table (page table) 7 Page Faults (Similar to “Cache Misses”) What if an object is on disk rather than in memory? 1. Page table indicates that the virtual address is not in memory 2. OS trap handler is invoked, moving data from disk into memory • Current process suspends, others can resume • OS has full control over placement, etc.
    [Show full text]
  • Concept-Oriented Programming: References, Classes and Inheritance Revisited
    Concept-Oriented Programming: References, Classes and Inheritance Revisited Alexandr Savinov Database Technology Group, Technische Universität Dresden, Germany http://conceptoriented.org Abstract representation and access is supposed to be provided by the translator. Any object is guaranteed to get some kind The main goal of concept-oriented programming (COP) is of primitive reference and a built-in access procedure describing how objects are represented and accessed. It without a possibility to change them. Thus there is a makes references (object locations) first-class elements of strong asymmetry between the role of objects and refer- the program responsible for many important functions ences in OOP: objects are intended to implement domain- which are difficult to model via objects. COP rethinks and specific structure and behavior while references have a generalizes such primary notions of object-orientation as primitive form and are not modeled by the programmer. class and inheritance by introducing a novel construct, Programming means describing objects but not refer- concept, and a new relation, inclusion. An advantage is ences. that using only a few basic notions we are able to describe One reason for this asymmetry is that there is a very many general patterns of thoughts currently belonging to old and very strong belief that it is entity that should be in different programming paradigms: modeling object hier- the focus of modeling (including programming) while archies (prototype-based programming), precedence of identities simply serve entities. And even though object parent methods over child methods (inner methods in identity has been considered “a pillar of object orienta- Beta), modularizing cross-cutting concerns (aspect- tion” [Ken91] their support has always been much weaker oriented programming), value-orientation (functional pro- in comparison to that of entities.
    [Show full text]
  • Efficient Support of Position Independence on Non-Volatile Memory
    Efficient Support of Position Independence on Non-Volatile Memory Guoyang Chen Lei Zhang Richa Budhiraja Qualcomm Inc. North Carolina State University Qualcomm Inc. [email protected] Raleigh, NC [email protected] [email protected] Xipeng Shen Youfeng Wu North Carolina State University Intel Corp. Raleigh, NC [email protected] [email protected] ABSTRACT In Proceedings of MICRO-50, Cambridge, MA, USA, October 14–18, 2017, This paper explores solutions for enabling efficient supports of 13 pages. https://doi.org/10.1145/3123939.3124543 position independence of pointer-based data structures on byte- addressable None-Volatile Memory (NVM). When a dynamic data structure (e.g., a linked list) gets loaded from persistent storage into 1 INTRODUCTION main memory in different executions, the locations of the elements Byte-Addressable Non-Volatile Memory (NVM) is a new class contained in the data structure could differ in the address spaces of memory technologies, including phase-change memory (PCM), from one run to another. As a result, some special support must memristors, STT-MRAM, resistive RAM (ReRAM), and even flash- be provided to ensure that the pointers contained in the data struc- backed DRAM (NV-DIMMs). Unlike on DRAM, data on NVM tures always point to the correct locations, which is called position are durable, despite software crashes or power loss. Compared to independence. existing flash storage, some of these NVM technologies promise This paper shows the insufficiency of traditional methods in sup- 10-100x better performance, and can be accessed via memory in- porting position independence on NVM. It proposes a concept called structions rather than I/O operations.
    [Show full text]
  • English Arabic Technical Computing Dictionary
    English Arabic Technical Computing Dictionary Arabeyes Arabisation Team http://wiki.arabeyes.org/Technical Dictionary Versin: 0.1.29-04-2007 April 29, 2007 This is a compilation of the Technical Computing Dictionary that is under development at Arabeyes, the Arabic UNIX project. The technical dictionary aims to to translate and standardise technical terms that are used in software. It is an effort to unify the terms used across all Open Source projects and to present the user with consistant and understandable interfaces. This work is licensed under the FreeBSD Documentation License, the text of which is available at the back of this document. Contributors are welcome, please consult the URL above or contact [email protected]. Q Ì ÉJ ªË@ éÒ¢@ Ñ«YË QK AK.Q« ¨ðQåÓ .« èQK ñ¢ ÕæK ø YË@ úæ®JË@ úGñAm '@ ñÓA®ÊË éj èYë . l×. @QK. éÔg. QK ú¯ éÊÒªJÖÏ@ éJ J®JË@ HAjÊ¢Ö Ï@ YJ kñKð éÔg. QK úÍ@ ñÓA®Ë@ ¬YîE .ºKñJ ËAK. éîD J.Ë@ ÐYjJÒÊË éÒj. Óð éÓñê®Ó H. ñAg éêk. @ð Õç'Y®JË ð á ÔgQÖÏ@ á K. H. PAJË@ øXA®JË ,H. ñAmÌ'@ . ¾JÖ Ï .ñÓA®Ë@ éK AîE ú ¯ èQ¯ñJÖÏ@ ð ZAKñÊË ø X @ ú G. ø Q¯ ékP ù ë ñÓA®Ë@ ékP . éJ K.QªËAK. ÕÎ @ [email protected] . úΫ ÈAB@ ð@ èC«@ à@ñJªË@ úÍ@ H. AëYË@ ZAg. QË@ ,á ÒëAÖÏ@ ɾK. I. kQK A Abortive release êm .× (ú¾J.) ¨A¢®K@ Abort Aêk . @ Abscissa ú æJ Absolute address Ê¢Ó à@ñ J« Absolute pathname Ê¢Ó PAÓ Õæ @ Absolute path Ê¢Ó PAÓ Absolute Ê¢Ó Abstract class XQm.× ­J Abstract data type XQm.× HA KAJ K.
    [Show full text]
  • Chapter 9 Pointers
    Chapter 9 Pointers Objectives ❏ To understand the concept and use of pointers ❏ To be able to declare, define, and initialize pointers ❏ To write programs that access data through pointers ❏ To use pointers as parameters and return types ❏ To understand pointer compatibility, especially regarding pointers to pointers ❏ To understand the role of quality in software engineering Computer Science: A Structured Programming Approach Using C 1 FIGURE 9-1 Derived Types Computer Science: A Structured Programming Approach Using C 2 9-1 Introduction A pointer is a constant or variable that contains an address that can be used to access data. Pointers are built on the basic concept of pointer constants. Topics discussed in this section: Pointer Constants Pointer Values Pointer Variables Accessing Variables Through Pointers Pointer Declaration and Definition Declaration versus Redirection Initialization of Pointer Variables Computer Science: A Structured Programming Approach Using C 3 FIGURE 9-2 Character Constants and Variables Computer Science: A Structured Programming Approach Using C 4 FIGURE 9-3 Pointer Constants Computer Science: A Structured Programming Approach Using C 5 Note Pointer constants, drawn from the set of addresses for a computer, exist by themselves. We cannot change them; we can only use them. Computer Science: A Structured Programming Approach Using C 6 Note An address expression, one of the expression types in the unary expression category, consists of an ampersand (&) and a variable name. Computer Science: A Structured Programming Approach Using C 7 FIGURE 9-4 Print Character Addresses Computer Science: A Structured Programming Approach Using C 8 Note A variable’s address is the first byte occupied by the variable.
    [Show full text]
  • Pointers Pointers – Getting the Address of a Value the Address Operator (&) Returns the Memory Address of a Variable
    System Design and Programming II CSCI – 194 Section 01 CRN: 10968 Fall 2017 David L. Sylvester, Sr., Assistant Professor Chapter 9 Pointers Pointers – Getting the Address of a Value The address operator (&) returns the memory address of a variable. Every variable is allocated a section of memory large enough to hold a value of the variable data type. Commonly char one bytes shorts two bytes int, long, float four bytes double eight bytes Each byte of memory has a memory address. A variable’s address is the address of the first byte allocated to that variable. Ex: char letter; short number; float amount; letter number amount 1200 1201 1203 The addresses of the variables above are used as an example. Getting the address of a variable is accomplished by using the (&) operator in front of the variable name. It allows the system to return the address of that variable in hexadecimal. Ex: &amount //returns the variable’s address cout << &amount // displays the variable’s address Note: Do not confuse the address operator with the & symbol used when defining a referenced variable. Pointers – Sample Program // This program uses the & operator to determine a variable's // address and the sizeof operator to determine its size. #include <iostream> using namespace std; int main() { int x = 25; cout << "The address of x is " << &x << endl; cout << "The size of x is " << sizeof(x) << " bytes\n"; cout << "The value of x is "<< x << endl; } Sample output Pointers Variables Pointer variables or pointers, are special variables that hold a memory address. Just as int variables are designed to hold integers, pointers variables are designed to hold memory addresses.
    [Show full text]
  • Database : a Toolkit for Constructing Memory Mapped Databases Peter A
    Database : A Toolkit for Constructing Memory Mapped Databases Peter A. Buhr, Anil K. Goel and Anderson Wai Dept. of Computer Science, University of Waterloo Waterloo, Ontario, Canada, N2L 3G1 Abstract The main objective of this work was an ef®cient methodology for constructing low-level database tools that are built around a single-level store implemented using memory mapping. The methodology allowed normal programming pointers to be stored directly onto secondary storage, and subsequently retrieved and manipulated by other programs without the need for relocation, pointer swizzling or reading all the data. File structures for a database, e.g. a B- Tree, built using this approach are signi®cantly simpler to build, test, and maintain than traditional ®le structures. All access methods to the ®le structure are statically type-safe and ®le structure de®nitions can be generic in the type of the record and possibly key(s) stored in the ®le structure, which affords signi®cant code reuse. An additional design requirement is that multiple ®le structures may be simultaneously accessible by an application. Concurrency at both the front end (multiple accessors) and the back end (®le structure partitioned over multiple disks) are possible. Finally, experimental results between traditional and memory mapped ®les structures show that performance of a memory mapped ®le structure is as good or better than the traditional approach. 1 Introduction The main objective of this work was an ef®cient methodology for constructing low-level database tools that are built around a single-level store. A single-level store gives the illusion that data on disk (secondary storage) is accessible in the same way as data in main memory (primary storage), which is analogous to the goals of virtual memory.
    [Show full text]
  • A Theory of Indirection Via Approximation
    A Theory of Indirection via Approximation Aquinas Hobor ∗† Robert Dockins† Andrew W. Appel † National University of Singapore Princeton University Princeton University [email protected] [email protected] [email protected] Abstract Consider general references in the polymorphic λ-calculus. Building semantic models that account for various kinds of indirect Here is a flawed semantic model of types for this calculus: reference has traditionally been a difficult problem. Indirect refer- value ≡ loc of address + num of N + ... ence can appear in many guises, such as heap pointers, higher-order type ≡ (memtype × value) → T (1) functions, object references, and shared-memory mutexes. memtype ≈ address * type We give a general method to construct models containing indi- rect reference by presenting a “theory of indirection”. Our method Values are a tagged disjoint union, with the tag loc indicating can be applied in a wide variety of settings and uses only simple, a memory address. T is some notion of truth values (e.g., the elementary mathematics. In addition to various forms of indirect propositions of the metalogic or a boolean algebra) and a natural reference, the resulting models support powerful features such as interpretation of the type A → T is the characteristic function for a impredicative quantification and equirecursion; moreover they are set of A. We write ≈ to mean “we wish we could define things this compatible with the kind of powerful substructural accounting re- way” and A*B to indicate a finite partial function from A to B. quired to model (higher-order) separation logic. In contrast to pre- The typing judgment has the form ψ ` v : τ, where ψ is vious work, our model is easy to apply to new settings and has a a memory typing (memtype), v is a value, and τ is a type; the simple axiomatization, which is complete in the sense that all mod- semantic model for the typing judgment is ψ ` v : τ ≡ τ(ψ, v).
    [Show full text]
  • Exact Positioning of Data Approach to Memory Mapped Persistent Stores: Design, Analysis and Modelling
    Exact Positioning of Data Approach to Memory Mapped Persistent Stores: Design, Analysis and Modelling by Anil K. Goel A thesis presented to the University of Waterloo in fulfilment of the thesis requirement for the degree of Doctor of Philosophy in Computer Science Waterloo, Ontario, Canada, 1996 c Anil K. Goel 1996 I hereby declare that I am the sole author of this thesis. I authorize the University of Waterloo to lend this thesis to other institutions or indi- viduals for the purpose of scholarly research. I further authorize the University of Waterloo to reproduce this thesis by photocopy- ing or by other means, in total or in part, at the request of other institutions or individuals for the purpose of scholarly research. iii The University of Waterloo requires the signatures of all persons using or photocopy- ing this thesis. Please sign below, and give address and date. v Abstract One of the primary functions of computers is to store information, i.e., to deal with long lived or persistent data. Programmers working with persistent data structures are faced with the problem that there are two, mostly incompatible, views of structured data, namely data in primary and secondary storage. Traditionally, these two views of data have been dealt with independently by researchers in the programming language and database communities. Significant research has occurred over the last decade on efficient and easy-to-use methods for manipulating persistent data structures in a fashion that makes the sec- ondary storage transparent to the programmer. Merging primary and secondary storage in this manner produces a single-level store, which gives the illusion that data on sec- ondary storage is accessible in the same way as data in primary storage.
    [Show full text]
  • Encapsulation and Inheritance in Object-Oriented Programming Languages
    Encapsulation and Inheritance in Object-Oriented Programming Languages Alan Snyder Affiliation: Software Technology Laboratory Hewlett-Packard Laboratories P.O. Box 10490, Palo Alto, CA , 94303-0971 (415) 857-8764 Abstract Object-oriented programming is a practical and useful programming methodology that encourages modular design and software reuse. Most object-oriented programming languages support data Abstraction by preventing an object from being manipulated except via its defined external operations. In most languages, however, the introduction of inheritanceseverely compromises the benefits of this encapsulation. Furthermore, the use of inheritance itself is globally visible in most languages, so that changes to the inheritance hierarchy cannot be made safely. This paper examines the relationship between inheritance and encapsulation and develops requirements for full support of encapsulation with inheritance. Introduction. Object-oriented programming is a practical and useful programming methodology that encourages modular design and software reuse. One of its prime features is support for data Abstraction, the ability to define new types of objects whose behavior is defined Abstractly, without reference to implementation details such as the data structure used to represent the objects. Most object-oriented languages support data Abstraction by preventing an object from being manipulated except via its defined external operations. Encapsulation has many advantages in terms of improving the understandability of programs and facilitating program modification. Unfortunately, in most object-oriented languages, the introduction of inheritance severely compromises encapsulation. This paper examines the issue of encapsulation and its support in object-oriented languages. We begin by reviewing the concepts of encapsulation and data Abstraction, as realized by most object-oriented language.
    [Show full text]
  • Specification and Verification with References Bruce W
    Specification and Verification with References Bruce W. Weide and Wayne D. Heym Computer and Information Science The Ohio State University Columbus, OH 43210 +1-614-292-1517 {weide,heym}@cis.ohio-state.edu ABSTRACT pleteness of Hoare logic [3] identified aliasing (of arguments to calls, i.e., even in a language without pointer variables) as Modern object-oriented programming languages demand that the key technical impediment to modular verification. There component designers, specifiers, and clients deal with refer- have been recent papers (e.g., [19, 23]) showing how it is tech- ences. This is true despite the fact that some programming nically possible to overcome such problems, but apparently language and formal methods researchers have been announc- only at the cost of even further complicating the programming ing for decades, in effect, that pointers/references are harmful model that a language presents to a software engineer. to the reasoning process. Their wise counsel to bury point- ers/references as deeply as possible, or to eliminate them en- Why do we need another paper about this issue? The conse- tirely, hasn’t been heeded. What can be done to reconcile the quences of programming with pointers have been examined so practical need to program in the languages provided to us by far primarily in the context of programming language design the commercial powers-that-be, with the need to reason and formal methods. We take a position in the context of the soundly about the behavior of component-based software sys- human element of specification and verification: tems? By directly comparing specifications for value and ref- erence types, it is possible to assess the impact of visible Making pointers/references visible to component clients pointers/references.
    [Show full text]
  • Leanstore: In-Memory Data Management Beyond Main Memory
    LeanStore: In-Memory Data Management Beyond Main Memory Viktor Leis, Michael Haubenschild∗, Alfons Kemper, Thomas Neumann Technische Universitat¨ Munchen¨ Tableau Software∗ fleis,kemper,[email protected] [email protected]∗ Abstract—Disk-based database systems use buffer managers 60K in order to transparently manage data sets larger than main 40K memory. This traditional approach is effective at minimizing the number of I/O operations, but is also the major source of 20K overhead in comparison with in-memory systems. To avoid this TPC-C [txns/s] 0 overhead, in-memory database systems therefore abandon buffer BerkeleyDB LeanStore in-memoryWiredTiger management altogether, which makes handling data sets larger Fig. 1. Single-threaded in-memory TPC-C performance (100 warehouses). than main memory very difficult. In this work, we revisit this fundamental dichotomy and design Two representative proposals for efficiently managing larger- a novel storage manager that is optimized for modern hardware. Our evaluation, which is based on TPC-C and micro benchmarks, than-RAM data sets in main-memory systems are Anti- shows that our approach has little overhead in comparison Caching [7] and Siberia [8], [9], [10]. In comparison with a with a pure in-memory system when all data resides in main traditional buffer manager, these approaches exhibit one major memory. At the same time, like a traditional buffer manager, weakness: They are not capable of maintaining a replacement it is fully transparent and can manage very large data sets strategy over relational and index data. Either the indexes, effectively. Furthermore, due to low-overhead synchronization, our implementation is also highly scalable on multi-core CPUs.
    [Show full text]