Databases & External Memory

Total Page:16

File Type:pdf, Size:1020Kb

Databases & External Memory Databases & External Memory Indexes, Write Optimization, and Crypto-searches Michael A. Bender Martin Farach-Colton Tokutek & Stony Brook Tokutek & Rutgers What’s a Database? DBs are systems for: • Storing data • Querying data. 9 count (*) where a<120; 5 809 99 20 8 202 16 1 14 STOC ’12 Tutorial: Databases and External Memory What’s a Database? DBs are systems for: • Storing data • Querying data. DBs can have SQL interface or something else. • We’ll talk some about so-called NoSQL systems. Data consists of a set of key,value pairs. • Each value can consist of a well defined tuple, where each component is called a field (e.g. relational DBs). Big Data. • Big data = bigger than RAM. STOC ’12 Tutorial: Databases and External Memory What’s this database tutorial? Traditionally: • Fast queries ⇒ sophisticated indexes and slow inserts. • Fast inserts ⇒ slow queries. 9 count (*) where a<120; 5 809 99 20 8 202 16 1 14 We want fast data ingestion + fast queries. STOC ’12 Tutorial: Databases and External Memory What’s this database tutorial? Database tradeoffs: • There is a query/insertion tradeoff. ‣ Algorithmicists mean one thing by this claim. ‣ DB users mean something different. • We’ll look at both. Overview of Tutorial: • Indexes: The DB tool for making queries fast • The difficulty of indexing under heavy data loads • Theory and Practice of write optimization • From data structure to database • Algorithmic challenges from maintaining two indexes STOC ’12 Tutorial: Databases and External Memory Row, Index, and Table a b c Row 100 5 45 • Key,value pair 101 92 2 • key = a, value = b,c 156 56 45 Index 165 6 2 • Ordering of rows by key 198 202 56 • Used to make queries fast 206 23 252 256 56 2 Table 412 43 45 • Set of indexes create table foo (a int, b int, c int, primary key(a)); STOC ’12 Tutorial: Databases and External Memory An index can select needed rows a b c 100 5 45 101 92 2 156 56 45 165 6 2 198 202 56 206 23 252 256 56 2 412 43 45 count (*) where a<120; STOC ’12 Tutorial: Databases and External Memory An index can select needed rows a b c 100 5 45 100 5 45 101 92 2 101 92 2 } 156 56 45 165 6 2 198 202 56 206 23 252 2 256 56 2 412 43 45 count (*) where a<120; STOC ’12 Tutorial: Databases and External Memory No good index means slow table scans a b c 100 5 45 101 92 2 156 56 45 165 6 2 198 202 56 206 23 252 256 56 2 412 43 45 count (*) where b>50 and b<100; STOC ’12 Tutorial: Databases and External Memory No good index means slow table scans a b c 100 5 45 100 5 45 101 92 2 101 92 2 156 56 45 156 56 45 165 6 2 165 6 2 1230 198 202 56 198 202 56 206 23 252 206 23 252 256 56 2 256 56 2 412 43 45 412 43 45 count (*) where b>50 and b<100; STOC ’12 Tutorial: Databases and External Memory You can add an index a b c b a 100 5 45 5 100 101 92 2 6 165 156 56 45 23 206 165 6 2 43 412 198 202 56 56 156 206 23 252 56 256 256 56 2 92 101 412 43 45 202 198 alter table foo add key(b); STOC ’12 Tutorial: Databases and External Memory A selective index speeds up queries a b c b a 100 5 45 5 100 101 92 2 6 165 156 56 45 23 206 165 6 2 43 412 198 202 56 56 156 206 23 252 56 256 256 56 2 92 101 412 43 45 202 198 count (*) where b>50 and b<100; STOC ’12 Tutorial: Databases and External Memory A selective index speeds up queries a b c b a 100 5 45 5 100 101 92 2 6 165 156 56 45 23 206 165 6 2 43 412 56 156 198 202 56 56 156 56 256 206 23 252 56 156256 } 92 101 256 56 2 5692 256101 412 43 45 20292 101198 3 count (*) where b>50 and b<100; STOC ’12 Tutorial: Databases and External Memory Selective indexes can still be slow a b c b a 100 5 45 5 100 101 92 2 6 165 156 56 45 23 206 165 6 2 43 412 198 202 56 56 156 206 23 252 56 256 256 56 2 92 101 412 43 45 202 198 sum(c) where b>50; STOC ’12 Tutorial: Databases and External Memory Selective indexes can still be slow 56 156 56 256 a b c b a 92 101 Selecting 100 5 45 5 100 202 198 fast b: on 101 92 2 6 165 156 56 45 23 206 165 6 2 43 412 198 202 56 56 156 206 23 252 56 256 256 56 2 92 101 412 43 45 202 198 sum(c) where b>50; STOC ’12 Tutorial: Databases and External Memory Selective indexes can still be slow 56 156 56 256 a b c b a 92 101 Selecting 100 5 45 5 100 202 198 fast b: on 101 92 2 6 165 156 56 45 23 206 165 6 2 43 412 198 202 56 56 156 206 23 252 56 256 256 56 2 92 101 summing c: slow c: summing 412 43 45 202 198 for info Fetching sum(c) where b>50; STOC ’12 Tutorial: Databases and External Memory Selective indexes can still be slow 56 156 56 256 a b c b a 92 101 Selecting 100 5 45 5 100 202 198 fast b: on 101 92 2 6 165 156 56 45 23 206 156 56 45 165 6 2 43 412 198 202 56 56 156 206 23 252 56 256 256 56 2 92 101 summing c: slow c: summing 412 43 45 202 198 for info Fetching sum(c) where b>50; STOC ’12 Tutorial: Databases and External Memory Selective indexes can still be slow 56 156 56 256 a b c b a 92 101 Selecting 100 5 45 5 100 202 198 fast b: on 101 92 2 6 165 156 56 45 23 206 156 56 45 165 6 2 43 412 198 202 56 56 156 206 23 252 56 256 256 56 2 92 101 summing c: slow c: summing 412 43 45 202 198 for info Fetching sum(c) where b>50; STOC ’12 Tutorial: Databases and External Memory Selective indexes can still be slow 56 156 56 256 a b c b a 92 101 Selecting 100 5 45 5 100 202 198 fast b: on 101 92 2 6 165 156 56 45 23 206 156 56 45 165 6 2 43 412 256 56 2 198 202 56 56 156 206 23 252 56 256 256 56 2 92 101 summing c: slow c: summing 412 43 45 202 198 for info Fetching sum(c) where b>50; STOC ’12 Tutorial: Databases and External Memory Selective indexes can still be slow 56 156 56 256 a b c b a 92 101 Selecting 100 5 45 5 100 202 198 fast b: on 101 92 2 6 165 156 56 45 23 206 156 56 45 165 6 2 43 412 256 56 2 198 202 56 56 156 101 92 2 Poor data locality data Poor 206 23 252 56 256 198 202 56 256 56 2 92 101 summing c: slow c: summing 412 43 45 202 198 for info Fetching 105 sum(c) where b>50; STOC ’12 Tutorial: Databases and External Memory Covering indexes speed up queries a b c b,c a 100 5 45 5,45 100 101 92 2 6,2 165 156 56 45 23,252 206 165 6 2 43,45 412 198 202 56 56,2 256 206 23 252 56,45 156 256 56 2 92,2 101 412 43 45 202,56 198 alter table foo add key(b,c); sum(c) where b>50; STOC ’12 Tutorial: Databases and External Memory Covering indexes speed up queries 56,56,22 256 a b c b,c a 56,56,4545 156 100 5 45 5,45 100 92,92,22 101 101 92 2 6,2 165 202,202,5656 198 156 56 45 23,252 206 165 6 2 43,45 412 198 202 56 56,2 256 105 206 23 252 56,45 156 256 56 2 92,2 101 412 43 45 202,56 198 alter table foo add key(b,c); sum(c) where b>50; STOC ’12 Tutorial: Databases and External Memory DB Performance and Indexes Read performance depends on having the right indexes for a query workload. • We’ve scratched the surface of index selection. • And there’s interesting query optimization going on. Write performance depends on speed of maintaining those indexes. Next: how to implement indexes and tables. STOC ’12 Tutorial: Databases and External Memory An index is a dictionary Dictionary API: maintain a set S subject to • insert(x): S ← S ∪ {x} • delete(x): S ← S - {x} • search(x): is x ∊ S? • successor(x): return min y > x s.t. y ∊ S • predecessor(y): return max y < x s.t. y ∊ S STOC ’12 Tutorial: Databases and External Memory A table is a set of indexes A table is a set of indexes with operations: • Add index: add key(f1,f2,...); • Drop index: drop key(f1,f2,...); • Add column: adds a field to primary key value.
Recommended publications
  • Betrfs: a Right-Optimized Write-Optimized File System
    BetrFS: A Right-Optimized Write-Optimized File System William Jannen, Jun Yuan, Yang Zhan, Amogh Akshintala, Stony Brook University; John Esmet, Tokutek Inc.; Yizheng Jiao, Ankur Mittal, Prashant Pandey, and Phaneendra Reddy, Stony Brook University; Leif Walsh, Tokutek Inc.; Michael Bender, Stony Brook University; Martin Farach-Colton, Rutgers University; Rob Johnson, Stony Brook University; Bradley C. Kuszmaul, Massachusetts Institute of Technology; Donald E. Porter, Stony Brook University https://www.usenix.org/conference/fast15/technical-sessions/presentation/jannen This paper is included in the Proceedings of the 13th USENIX Conference on File and Storage Technologies (FAST ’15). February 16–19, 2015 • Santa Clara, CA, USA ISBN 978-1-931971-201 Open access to the Proceedings of the 13th USENIX Conference on File and Storage Technologies is sponsored by USENIX BetrFS: A Right-Optimized Write-Optimized File System William Jannen, Jun Yuan, Yang Zhan, Amogh Akshintala, John Esmet∗, Yizheng Jiao, Ankur Mittal, Prashant Pandey, Phaneendra Reddy, Leif Walsh∗, Michael Bender, Martin Farach-Colton†, Rob Johnson, Bradley C. Kuszmaul‡, and Donald E. Porter Stony Brook University, ∗Tokutek Inc., †Rutgers University, and ‡Massachusetts Institute of Technology Abstract (microwrites). Examples include email delivery, creat- The Bε -tree File System, or BetrFS, (pronounced ing lock files for an editing application, making small “better eff ess”) is the first in-kernel file system to use a updates to a large file, or updating a file’s atime. The un- write-optimized index. Write optimized indexes (WOIs) derlying problem is that many standard data structures in are promising building blocks for storage systems be- the file-system designer’s toolbox optimize for one case cause of their potential to implement both microwrites at the expense of another.
    [Show full text]
  • Algorithms and Complexity (AL)
    Algorithms and Complexity (AL) Algorithms are fundamental to computer science and software engineering. The real-world performance of any software system depends on the algorithms chosen and the suitability of the various layers of implementation. Good algorithm design is therefore crucial for the performance of all software systems. Moreover, the study of algorithms provides insight into the intrinsic nature of the problem as well as possible solution techniques independent of programming language, programming paradigm, computer hardware, or any other implementation aspect. An important part of computing is the ability to select algorithms appropriate to particular purposes and to apply them, recognizing the possibility that no suitable algorithm may exist. This facility relies on understanding the range of algorithms that address an important set of well-defined problems, recognizing their strengths and weaknesses, and their suitability in particular contexts. Efficiency is a pervasive theme throughout this area. This knowledge area defines the central concepts and skills required to design, implement, and analyze algorithms for solving problems. Algorithms are essential in all advanced areas of computer science: artificial intelligence, databases, distributed computing, graphics, networking, operating systems, programming languages, security, and so on. Algorithms that have specific utility in each of these are listed in the relevant knowledge areas. Cryptography, for example, appears in the new Knowledge Area on Information Assurance and Security (IAS), while parallel and distributed algorithms appear in the Knowledge Area in Parallel and Distributed Computing (PD). As with all knowledge areas, the order of topics and their groupings do not necessarily correlate to a specific order of presentation. Different programs will teach the topics in different courses and should do so in the order they believe is most appropriate for their students.
    [Show full text]
  • Assignment of Master's Thesis
    CZECH TECHNICAL UNIVERSITY IN PRAGUE FACULTY OF INFORMATION TECHNOLOGY ASSIGNMENT OF MASTER’S THESIS Title: Approximate Pattern Matching In Sparse Multidimensional Arrays Using Machine Learning Based Methods Student: Bc. Anna Kučerová Supervisor: Ing. Luboš Krčál Study Programme: Informatics Study Branch: Knowledge Engineering Department: Department of Theoretical Computer Science Validity: Until the end of winter semester 2018/19 Instructions Sparse multidimensional arrays are a common data structure for effective storage, analysis, and visualization of scientific datasets. Approximate pattern matching and processing is essential in many scientific domains. Previous algorithms focused on deterministic filtering and aggregate matching using synopsis style indexing. However, little work has been done on application of heuristic based machine learning methods for these approximate array pattern matching tasks. Research current methods for multidimensional array pattern matching, discovery, and processing. Propose a method for array pattern matching and processing tasks utilizing machine learning methods, such as kernels, clustering, or PSO in conjunction with inverted indexing. Implement the proposed method and demonstrate its efficiency on both artificial and real world datasets. Compare the algorithm with deterministic solutions in terms of time and memory complexities and pattern occurrence miss rates. References Will be provided by the supervisor. doc. Ing. Jan Janoušek, Ph.D. prof. Ing. Pavel Tvrdík, CSc. Head of Department Dean Prague February 28, 2017 Czech Technical University in Prague Faculty of Information Technology Department of Knowledge Engineering Master’s thesis Approximate Pattern Matching In Sparse Multidimensional Arrays Using Machine Learning Based Methods Bc. Anna Kuˇcerov´a Supervisor: Ing. LuboˇsKrˇc´al 9th May 2017 Acknowledgements Main credit goes to my supervisor Ing.
    [Show full text]
  • UNIVERSIDAD SAN FRANCISCO DE QUITO USFQ Optimizing Large
    UNIVERSIDAD SAN FRANCISCO DE QUITO USFQ Colegio de Ciencias e Ingenierías Optimizing Large Databases: A Study on Index Structures Proyecto de Investigación . Ricardo Andres Leon Ruiz Ingeniería en Sistemas Trabajo de titulación presentado como requisito para la obtención del título de Ingeniero en Sistemas Quito, 22 de Diciembre de 2017 2 UNIVERSIDAD SAN FRANCISCO DE QUITO USFQ COLEGIO DE CIENCIAS E INGENIERÍAS HOJA DE CALIFICACIÓN DE TRABAJO DE TITULACIÓN Optimizing Large Databases: A Study on Index Structures Ricardo Andres Leon Ruiz Calificación: Nombre del profesor, Título académico Aldo Cassola, Ph.D. Firma del profesor Quito, Diciembre de 2017 3 Derechos de Autor Por medio del presente documento certifico que he leído todas las Políticas y Manuales de la Universidad San Francisco de Quito USFQ, incluyendo la Política de Propiedad Intelectual USFQ, y estoy de acuerdo con su contenido, por lo que los derechos de propiedad intelectual del presente trabajo quedan sujetos a lo dispuesto en esas Políticas. Asimismo, autorizo a la USFQ para que realice la digitalización y publicación de este trabajo en el repositorio virtual, de conformidad a lo dispuesto en el Art. 144 de la Ley Orgánica de Educación Superior. Firma del estudiante: Nombres y Apellidos: Ricardo Andres Leon Ruiz Código de estudiante: 110346 C. I.: 1714286265 Lugar, Fecha Quito, 22 de Diciembre de 2017 4 RESUMEN La siguiente investigación trata sobre comparar estructuras de índice para grandes bases de datos, tanto analíticamente, como experimentalmente. El estudio se encuentra dividido en dos partes principales. La primera parte se centra en índices de hash y B-trees. Ambas estructuras son estudiadas en el contexto del modelo de acceso de disco tradicional.
    [Show full text]
  • Conception Et Exploitation D'une Base De Modèles: Application Aux Data
    Conception et exploitation d’une base de modèles : application aux data sciences Cyrille Ponchateau To cite this version: Cyrille Ponchateau. Conception et exploitation d’une base de modèles : application aux data sciences. Autre [cs.OH]. ISAE-ENSMA Ecole Nationale Supérieure de Mécanique et d’Aérotechique - Poitiers, 2018. Français. NNT : 2018ESMA0005. tel-01939430 HAL Id: tel-01939430 https://tel.archives-ouvertes.fr/tel-01939430 Submitted on 29 Nov 2018 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. THESE pour l’obtention du Grade de DOCTEUR DE L'ÉCOLE NATIONALE SUPÉRIEURE DE MÉCANIQUE ET D'AÉROTECHNIQUE (Diplôme National — Arrêté du 25 mai 2016) Ecole Doctorale : Sciences et Ingénierie des Systèmes, Mathématiques, Informatique (SISMI) Secteur de Recherche : INFORMATIQUE ET APPLICATIONS Présentée par : Cyrille PONCHATEAU ******************************************************** Conception et exploitation d’une base de modèles : application aux data sciences ******************************************************** Directeur de thèse : Ladjel BELLATRECHE
    [Show full text]
  • Big Data Solutions and Applications
    P. Bellini, M. Di Claudio, P. Nesi, N. Rauch Slides from: M. Di Claudio, N. Rauch Big Data Solutions and applications Slide del corso: Sistemi Collaborativi e di Protezione Corso di Laurea Magistrale in Ingegneria 2013/2014 http://www.disit.dinfo.unifi.it Distributed Data Intelligence and Technology Lab 1 Related to the following chapter in the book: • P. Bellini, M. Di Claudio, P. Nesi, N. Rauch, "Tassonomy and Review of Big Data Solutions Navigation", in "Big Data Computing", Ed. Rajendra Akerkar, Western Norway Research Institute, Norway, Chapman and Hall/CRC press, ISBN 978‐1‐ 46‐657837‐1, eBook: 978‐1‐ 46‐657838‐8, july 2013, in press. http://www.tmrfindia.org/b igdata.html 2 Index 1. The Big Data Problem • 5V’s of Big Data • Big Data Problem • CAP Principle • Big Data Analysis Pipeline 2. Big Data Application Fields 3. Overview of Big Data Solutions 4. Data Management Aspects • NoSQL Databases • MongoDB 5. Architectural aspects • Riak 3 Index 6. Access/Data Rendering aspects 7. Data Analysis and Mining/Ingestion Aspects 8. Comparison and Analysis of Architectural Features • Data Management • Data Access and Visual Rendering • Mining/Ingestion • Data Analysis • Architecture 4 Part 1 The Big Data Problem. 5 Index 1. The Big Data Problem • 5V’s of Big Data • Big Data Problem • CAP Principle • Big Data Analysis Pipeline 2. Big Data Application Fields 3. Overview of Big Data Solutions 4. Data Management Aspects • NoSQL Databases • MongoDB 5. Architectural aspects • Riak 6 What is Big Data? Variety Volume Value 5V’s of Big Data Velocity Variability 7 5V’s of Big Data (1/2) • Volume: Companies amassing terabytes/petabytes of information, and they always look for faster, more efficient, and lower‐ cost solutions for data management.
    [Show full text]
  • The Tokufs Streaming File System
    The TokuFS Streaming File System John Esmet Michael A. Bender Martin Farach-Colton Bradley C. Kuszmaul Tokutek & Tokutek & Tokutek & Tokutek & Rutgers Stony Brook Rutgers MIT Abstract files can be created and updated rapidly, but queries, such as reads or metadata lookups, may suffer from the lack The TokuFS file system outperforms write-optimized file of an up-to-date index or from poor locality in indexes systems by an order of magnitude on microdata write that are spread through the log. workloads, and outperforms read-optimized file systems by an order of magnitude on read workloads. Microdata Large-block reads and writes, which we call macro- write workloads include creating and destroying many data operations, can easily run at disk bandwidth. For small files, performing small unaligned writes within small writes, which we call microdata operations, in large files, and updating metadata. TokuFS is imple- which the bandwidth time to write the data is much mented using Fractal Tree indexes, which are primarily smaller than a disk seek, the tradeoff becomes more se- used in databases. TokuFS employs block-level com- vere. Examples of microdata operations include creating pression to reduce its disk usage. or destroying microfiles (small files), performing small writes within large files, and updating metadata (e.g., in- ode updates). 1 Introduction In this paper, we introduce the TokuFS file system. File system designers often must choose between good TokuFS achieves good performance for both reads and read performance and good write performance. For ex- writes and for both microdata and macrodata. Compared ample, most of today’s file systems employ some com- to ext4, XFS, Btrfs, and ZFS, TokuFS runs at least 18.4 bination of B-trees and log-structured updates to achieve times faster than the nearest competitor (Btrfs) for cre- a good tradeoff between reads and writes.
    [Show full text]
  • Data Structures  Dagstuhl Seminar 
    10091 Abstracts Collection Data Structures Dagstuhl Seminar Lars Arge1, Erik Demaine2 and Raimund Seidel3 1 Univ. of Aarhus, DK [email protected] 2 MIT - Cambridge, US [email protected] 3 Saarland University, DE [email protected] Abstract. From February 28th to March 5th 2010, the Dagstuhl Sem- inar 10091 "Data Structures" was held in Schloss Dagstuhl Leibniz Center for Informatics. It brought together 45 international researchers to discuss recent developments concerning data structures in terms of re- search, but also in terms of new technologies that impact how data can be stored, updated, and retrieved. During the seminar a fair number of participants presented their current research and open problems where discussed. This document rst briey describes the seminar topics and then gives the abstracts of the presentations given during the seminar. Keywords. Data structures, information retrieval, complexity, algorithms 10091 Summary - Data Structures The purpose of this workshop was to discuss recent developments in various aspects of data structure research, and also to familiarize the community with some of the problems that arise in the context of modern commodity parallel hardware architectures, such as multicore and GPU architectures. Thus while several attendees reported on progress on (twists on) old fundamental problems in data structures e.g. Gerth Brodal, Rolf Fagerberg, John Iacono and Sid- dharrha Sen on search tree and dictionary structures, Bob Tarjan on heaps, Kasper D. Larsen and Peyman Afshani on range search data structures, and Peter Sanders and Michiel Smid on proximity data structures there were also very inspiring presentations on new models of computation by Erik Demaine and on data structures on the GPU by John Owens.
    [Show full text]
  • Workload Analysis of Key-Value Stores on Non-Volatile Media Vishal Verma (Performance Engineer, Intel) Tushar Gohad (Cloud Software Architect, Intel)
    Workload Analysis of Key-Value Stores on Non-Volatile Media Vishal Verma (Performance Engineer, Intel) Tushar Gohad (Cloud Software Architect, Intel) 1 2017 Storage Developer Conference. © Intel Corporation. All Rights Reserved. Outline KV Stores – What and Why Data Structures for KV Stores Design Choices and Trade-offs Performance on Non-Volatile Media Key Takeaways 2 2017 Storage Developer Conference. © Intel Corporation. All Rights Reserved. Intro to KV stores 3 2017 Storage Developer Conference. © Intel Corporation. All Rights Reserved. What are KV Stores Type of NoSQL database that uses simple key/value pair mechanism to store data Alternative to limitations of traditional relational databases (DB): Data structured and schema pre-defined Mismatch with today’s workloads. Data: Large and unstructured, lots of random writes and reads. Most flexible NoSQL model as application has complete control over what is stored inside the value 4 2017 Storage Developer Conference. © Intel Corporation. All Rights Reserved. What are KV Stores Key in a key-value pair must (or at least, should) be unique. Values identified via a key, and stored values can be numbers, strings, images, videos etc API operations: get(key) for reading data, put(key, value) for writing data and delete(key) for deleting keys. Phone Directory example: Key Value Bob (123) 456-7890 Kyle (245) 675-8888 Richard (787) 122-2212 5 2017 Storage Developer Conference. © Intel Corporation. All Rights Reserved. KV Stores benefits High performance: Enable fast location of object rather than searching through columns or tables to find an object in traditional relational DB Highly scalable: Can scale over several machines or devices by several orders of magnitude, without the need for significant redesign Flexible : No enforcement of any structure to data Low TCO: Simplify operations of adding or removing capacity as needed.
    [Show full text]
  • Data Management Organization Charter
    Large Synoptic Survey Telescope (LSST) Database Design Jacek Becla, Daniel Wang, Serge Monkewitz, K-T Lim, Douglas Smith, Bill Chickering LDM-135 08/02/2013 LSST Database Design LDM-135 08/02/13 Change Record Version Date Description Revision Author 1.0 6/15/2009 Initial version Jacek Becla 2.0 7/12/2011 Most sections rewritten, added scalability test Jacek Becla section 2.1 8/12/2011 Refreshed future-plans and schedule of testing Jacek Becla, sections, added section about fault tolerance Daniel Wang 3.0 8/2/2013 Synchronized with latest changes to the Jacek Becla, requirements (LSE-163). Rewrote most of the Daniel Wang, “Implementation” chapter. Documented new Serge Monkewitz, tests, refreshed all other chapters. Kian-Tat Lim, Douglas Smith, Bill Chickering 2 LSST Database Design LDM-135 08/02/13 Table of Contents 1. Executive Summary.....................................................................................................................8 2. Introduction..................................................................................................................................9 3. Baseline Architecture.................................................................................................................10 3.1 Alert Production and Up-to-date Catalog..........................................................................10 3.2 Data Release Production....................................................................................................13 3.3 User Query Access.............................................................................................................13
    [Show full text]
  • Optimizing Space Amplification in Rocksdb
    Optimizing Space Amplification in RocksDB Siying Dong1, Mark Callaghan1, Leonidas Galanis1, Dhruba Borthakur1, Tony Savor1 and Michael Stumm2 1Facebook, 1 Hacker Way, Menlo Park, CA USA 94025 {siying.d, mcallaghan, lgalanis, dhruba, tsavor}@fb.com 2Dept. Electrical and Computer Engineering, University of Toronto, Canada M8X 2A6 [email protected] ABSTRACT Facebook has one of the largest MySQL installations in RocksDB is an embedded, high-performance, persistent key- the world, storing many 10s of petabytes of online data. The value storage engine developed at Facebook. Much of our underlying storage engine for Facebook's MySQL instances current focus in developing and configuring RocksDB is to is increasingly being switched over from InnoDB to My- give priority to resource efficiency instead of giving priority Rocks, which in turn is based on Facebook's RocksDB. The to the more standard performance metrics, such as response switchover is primarily motivated by the fact that MyRocks time latency and throughput, as long as the latter remain uses half the storage InnoDB needs, and has higher average acceptable. In particular, we optimize space efficiency while transaction throughput, yet has only marginally worse read ensuring read and write latencies meet service-level require- latencies. ments for the intended workloads. This choice is motivated RocksDB is an embedded, high-performance, persistent key-value storage system [1] that was developed by Face- by the fact that storage space is most often the primary 1 bottleneck when using Flash SSDs under typical production book after forking the code from Google's LevelDB [2, 3]. workloads at Facebook. RocksDB uses log-structured merge RocksDB was open-sourced in 2013 [5].
    [Show full text]
  • A Big Data Revolution Cloud Computing, 22 Aerospike, 91, 217 Competing Definitions, 21 Aerospike Query Language (AQL), 218 Industrial Revolution, 22 AJAX
    Index A Big Data revolution cloud computing, 22 Aerospike, 91, 217 competing definitions, 21 Aerospike query language (AQL), 218 industrial revolution, 22 AJAX. See Asynchronous JavaScript and IoT, 22 XML (AJAX) social networks and Alternative persistence model, 92 smartphones, 22 Amazon Binary JSON (BSON), 157 ACID RDBMS, 46 Blockchain, 212 Dynamo, 14, 45–46 Bloom filters, 161 DynamoDB, 219 Boolean bit logic, 214 hashing, 47–48 B-tree index structure, 158–159 key–value stores, 51 Business intelligence (BI) practices, 193 NWR notation, 49–50 SOA, 45 Amazon Web Services (AWS), 15 C Apache Cassandra , 218. See also Cassandra Cache-less architecture, 92 Apache HBase, 220 CAP theorem Apache Kudu, 211. See also Hbase partition tolerance, 44 Append only file (AOF), 94 RAC solution, 44 Asynchronous JavaScript and Cascading Style Sheets (CSS), 54 XML (AJAX), 15 Cassandra, 211 Atomic, Consistent, Independent, and Durable cluster node, 120 (ACID) transactions, 9–10, 128 consistent hashing, 120–121 AWS. See Amazon Web Services (AWS) data model, 153, 155 gossip, 119 node adding, 122 B order-preserving Berkeley analytics data stack and spark partitioners, 124 AMPlab, 99 replicas, 124–125 BDAS, 100 snitches, 126 DAG, 101 virtual nodes, 122–123 Hadoop, 99–100 Cassandra consistency JDBC-compliant database, 101 hinted handoff, 136–137 MapReduce, 99 LWT (see Lightweight MLBase component, 100 transactions (LWT)) RDD, 101 read consistency, 135 spark architecture, 101 read repair, 136–137 spark processing replication factor, 134 elements, 102 timestamps and granularity, 137 spark SQL, 100 vector clocks, 138–140 spark streaming, 100 write consistency, 134–135 229 ■ INDEX Cassandra Query Language (CQL), 218 D column structures, 175 cqlsh program, 175 DAG.
    [Show full text]