Accelerating NoSQL. Running Voldemort on HailDB. Sunny Gleason March 11, 2011

Similar documents
Jargons, Concepts, Scope and Systems. Key Value Stores, Document Stores, Extensible Record Stores. Overview of different scalable relational systems

CIB Session 12th NoSQL Databases Structures

NoSQL systems. Lecture 21 (optional) Instructor: Sudeepa Roy. CompSci 516 Data Intensive Computing Systems

Introduction to NoSQL Databases

HyperDex. A Distributed, Searchable Key-Value Store. Robert Escriva. Department of Computer Science Cornell University

NOSQL EGCO321 DATABASE SYSTEMS KANAT POOLSAWASD DEPARTMENT OF COMPUTER ENGINEERING MAHIDOL UNIVERSITY

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Winter 2015 Lecture 14 NoSQL

Benchmarking Cloud Serving Systems with YCSB 詹剑锋 2012 年 6 月 27 日

CompSci 516 Database Systems

Accelerate MySQL for Demanding OLAP and OLTP Use Cases with Apache Ignite. Peter Zaitsev, Denis Magda Santa Clara, California April 25th, 2017

Why NoSQL? Why Riak?

CISC 7610 Lecture 5 Distributed multimedia databases. Topics: Scaling up vs out Replication Partitioning CAP Theorem NoSQL NewSQL

Cassandra, MongoDB, and HBase. Cassandra, MongoDB, and HBase. I have chosen these three due to their recent

Accelerate MySQL for Demanding OLAP and OLTP Use Case with Apache Ignite December 7, 2016

CISC 7610 Lecture 2b The beginnings of NoSQL

Building High Performance Apps using NoSQL. Swami Sivasubramanian General Manager, AWS NoSQL

Scaling with mongodb

NoSQL Databases MongoDB vs Cassandra. Kenny Huynh, Andre Chik, Kevin Vu

Voldemort. Smruti R. Sarangi. Department of Computer Science Indian Institute of Technology New Delhi, India. Overview Design Evaluation

Spotify. Scaling storage to million of users world wide. Jimmy Mårdell October 14, 2014

Big Data Infrastructure CS 489/698 Big Data Infrastructure (Winter 2017)

<Insert Picture Here> Oracle NoSQL Database A Distributed Key-Value Store

DEMYSTIFYING BIG DATA WITH RIAK USE CASES. Martin Schneider Basho Technologies!

CIT 668: System Architecture. Distributed Databases

The NoSQL Ecosystem. Adam Marcus MIT CSAIL

CS 655 Advanced Topics in Distributed Systems

Introduction to Big Data. NoSQL Databases. Instituto Politécnico de Tomar. Ricardo Campos

NoVA MySQL October Meetup. Tim Callaghan VP/Engineering, Tokutek

Dynamo: Amazon s Highly Available Key-Value Store

Goal of the presentation is to give an introduction of NoSQL databases, why they are there.

Presented by Sunnie S Chung CIS 612

Database Availability and Integrity in NoSQL. Fahri Firdausillah [M ]

Improvements in MySQL 5.5 and 5.6. Peter Zaitsev Percona Live NYC May 26,2011

PROFESSIONAL. NoSQL. Shashank Tiwari WILEY. John Wiley & Sons, Inc.

Design Patterns for Large- Scale Data Management. Robert Hodges OSCON 2013

/ Cloud Computing. Recitation 10 March 22nd, 2016

NoSQL Databases. Amir H. Payberah. Swedish Institute of Computer Science. April 10, 2014

Sources. P. J. Sadalage, M Fowler, NoSQL Distilled, Addison Wesley

Perspectives on NoSQL

<Insert Picture Here> MySQL Cluster What are we working on

Oral Questions and Answers (DBMS LAB) Questions & Answers- DBMS

MySQL Database Scalability

MySQL & NoSQL: The Best of Both Worlds

SQL, NoSQL, MongoDB. CSE-291 (Cloud Computing) Fall 2016 Gregory Kesden

MySQL Storage Engines Which Do You Use? April, 25, 2017 Sveta Smirnova

Advances in Data Management - NoSQL, NewSQL and Big Data A.Poulovassilis

Challenges for Data Driven Systems

Introduction Aggregate data model Distribution Models Consistency Map-Reduce Types of NoSQL Databases

10/18/2017. Announcements. NoSQL Motivation. NoSQL. Serverless Architecture. What is the Problem? Database Systems CSE 414

Preventing and Resolving MySQL Downtime. Jervin Real, Michael Coburn Percona

Distributed Systems. 29. Distributed Caching Paul Krzyzanowski. Rutgers University. Fall 2014

Introduction to MySQL InnoDB Cluster

Percona XtraDB Cluster

TALK 1: CONVINCE YOUR BOSS: CHOOSE THE "RIGHT" DATABASE. Prof. Dr. Stefan Edlich Beuth University of Technology Berlin (App.Sc.)

DATABASE DESIGN II - 1DL400

MySQL Performance Optimization and Troubleshooting with PMM. Peter Zaitsev, CEO, Percona Percona Technical Webinars 9 May 2018

Large-Scale Web Applications

MySQL Replication Options. Peter Zaitsev, CEO, Percona Moscow MySQL User Meetup Moscow,Russia

Next-Generation Cloud Platform

A Review Of Non Relational Databases, Their Types, Advantages And Disadvantages

What s New in MySQL 5.7 Geir Høydalsvik, Sr. Director, MySQL Engineering. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Switching to Innodb from MyISAM. Matt Yonkovit Percona

MySQL Performance Optimization and Troubleshooting with PMM. Peter Zaitsev, CEO, Percona

MySQL High Availability. Michael Messina Senior Managing Consultant, Rolta-AdvizeX /

How do we build TiDB. a Distributed, Consistent, Scalable, SQL Database

Distributed Data Store

Relational databases

Agenda. AWS Database Services Traditional vs AWS Data services model Amazon RDS Redshift DynamoDB ElastiCache

HyperDex: Next Generation NoSQL

Databases and Big Data Today. CS634 Class 22

Distributed Databases: SQL vs NoSQL

Introduction Storage Processing Monitoring Review. Scaling at Showyou. Operations. September 26, 2011

Performance improvements in MySQL 5.5

Scaling. Yashh Nelapati Gotham City. Marty Weiner Krypton. Friday, July 27, 12

A BigData Tour HDFS, Ceph and MapReduce

In-Memory Data processing using Redis Database

CSE 344 JULY 9 TH NOSQL

Administration Naive DBMS CMPT 454 Topics. John Edgar 2

MySQL for Database Administrators Ed 3.1

5/2/16. Announcements. NoSQL Motivation. The New Hipster: NoSQL. Serverless. What is the Problem? Database Systems CSE 414

10 Million Smart Meter Data with Apache HBase

Overview. * Some History. * What is NoSQL? * Why NoSQL? * RDBMS vs NoSQL. * NoSQL Taxonomy. *TowardsNewSQL

MySQL Database Administrator Training NIIT, Gurgaon India 31 August-10 September 2015

Database Systems CSE 414

Advanced Data Management Technologies

Scaling. Marty Weiner Grayskull, Eternia. Yashh Nelapati Gotham City

Advanced Database Technologies NoSQL: Not only SQL

Resolving and Preventing MySQL Downtime

Enabling Persistent Memory Use in Java. Steve Dohrmann Sr. Staff Software Engineer, Intel

Beyond MySQL 5.1 What is happening in MySQL Space. Feb 16, 2011 Percona Live San Francisco,CA by Peter Zaitsev, Percona Inc

Middle East Technical University. Jeren AKHOUNDI ( ) Ipek Deniz Demirtel ( ) Derya Nur Ulus ( ) CENG553 Database Management Systems

MongoDB and Mysql: Which one is a better fit for me? Room 204-2:20PM-3:10PM

Essential Skills - RDBMS and SQL

/ Cloud Computing. Recitation 8 October 18, 2016

Why we re excited about MySQL 8

Topics. History. Architecture. MongoDB, Mongoose - RDBMS - SQL. - NoSQL

Everything You Need to Know About MySQL Group Replication

InnoDB: Status, Architecture, and Latest Enhancements

Why Choose Percona Server For MySQL? Tyler Duzan

Distributed PostgreSQL with YugaByte DB

Transcription:

Accelerating NoSQL Running Voldemort on HailDB Sunny Gleason March 11, 2011

whoami Sunny Gleason, human passion: distributed systems engineering previous... Ning : custom social networks Amazon.com : infra & web services now... building cloud infrastructure

whereami twitter : twitter.com/sunnygleason github : github.com/sunnygleason linkedin : linkedin.com/in/sunnygleason

what s in this presentation? NoSQL Roundup Voldemort who? HailDB wha? Results & Next Steps Special Bonus Material

NoSQL Not Only SQL What s the point? Proponent: reaching next level of scale Cynic: cloud is hype, ops nightmare

what does it gain? Higher performance, scalability, availability More robust fault-tolerance Simplified systems design Easier operations

what does it lose? Reduced / simplified programming model No ad-hoc queries, no joins, no txns Not ACID: Atomicity / Consistency / Isolation / Durability Operations / management is still evolving Challenging to quantify health of system Fewer domain experts

NoSQL Map KV Stores (volatile) Memcached, Redis Key-Value Store KV Stores (durable) Dynamo, Voldemort, Riak NoSQL Document Store CouchDB, MongoDB Column Store Cassandra, BigTable, HBase Graph Store Neo4J

NoSQL Map KV Stores (volatile) Key-Value Store KV Stores (durable) Dynamo, Voldemort, Riak NoSQL Document Store Column Store Graph Store

motivation database on 1 box : ok database with master/slave replication : ok database on cluster : tricky database on SAN : time bomb

performance + Sharding Complexity +SSD +FusionIO MySQL Voldemort +Cluster Memcached 1K 10K 100K 1M Aggregate Operations / Sec

dynamo case study Amazon : high read throughput, alwaysaccessible writes Shopping cart application Glitches ok, duplicate or missing item Data loss or unavailability is unacceptable Solution: K-V schema plus smart routing & data placement

key-value storage Essentially, a gigantic hash table Typically assign byte[] values to byte[] keys Plus versioning mixed in to handle failures and conflicts Yes, you *can* do range partitioning; in practice, avoid it because of hot spots

k-v: durable vs. volatile RAM is ridiculous speed (ns), not durable Disk is persistent and slow (3-7ms) RAID eases the pain a bit (4-8x throughput) SSD is providing good promise (100-300us) FusionIO is redefining the space (30-100us)

dynamo clones Voldemort : from LinkedIn, dynamo implementation in Java (default: BDB-JE) Riak : from Basho, dynamo implementation in Erlang (default: embedded InnoDB)

Voldemort Developed at LinkedIn Scalable Key-Value Storage Based on Amazon Dynamo model High Read Throughput Always Writable

Voldemort features Consistent Hashing Quorum settings : R, W, N Auto-sharding & rebalancing Pluggable storage engines

Consistent Hashing * Arrange keys around ring * Compute token in ring using hash function * Determine nodes responsible for token using live set

R/W/N N : maximum number of nodes to query for an operation R : read quorum W : write quorum Can adjust quorum to balance throughput and fault-tolerance

setting up Voldemort 1 Step 1: Download the code Download either a recent stable release or, for those who like to live more dangerously, the up-to-the-minute build from the build server. Step 2: Start single node cluster > bin/voldemort-server.sh config/single_node_cluster > /tmp/voldemort.log & Step 3: Start commandline test client and do some operations > bin/voldemort-shell.sh test tcp://localhost:6666 Established connection to test via tcp://localhost:6666 > put "hello" "world" > get "hello" version(0:1): "world" > delete "hello" > get "hello" null > exit k k thx bye.

setting up Voldemort 2 For a cluster, use cloud startup scripts Works with Amazon EC2 See https://github.com/voldemort/ voldemort/wiki/ec2-testing-infrastructure

Voldemort client libraries Java, Scala, Clojure Ruby Python C++

storage engines BDB-JE (Oracle Sleepycat, the original) Krati (LinkedIn, pretty new) HailDB (new!) MySQL (old / dated)

BDB-JE Log-Structured B-Tree Fast Storage When Mostly Cached Configured without fsync() by default - writes are batched and flushed periodically

Krati Fast Hash-Oriented Storage Uses memory-mapped files for speed Configured without fsync() by default - writes are batched and flushed periodically

HailDB Fork of MySQL InnoDB plugin (contributors : Oracle, Google, Facebook, Percona) Higher stability for large data sets Fast crash recovery External from Java heap (ease GC pain) apt-get install haildb (from launchpad PPA) Use flush-once-per-second mode

HailDB, Java & Voldemort Voldemort Client Voldemort Node Voldemort Node Voldemort Node v-storage-inno g414-haildb JNA HailDB (log, buffer pool, tablespace)

HailDB & Java g414-haildb : where the magic happens uses JNA: Java Native Access dynamic binding to libhaildb shared library auto-generated from.h file (w/ JNAerator) Pointer classes & other shenanigans

HailDB schema _key VARBINARY(200) _version VARBINARY(200) _value BLOB PRIMARY KEY(_key, _version)

implementation gotchas InnoDB API-level usage is unclear Synchronization & locking is unclear Therefore... I learned to love reading C Error handling is *nasty* Installation a bit of a pain

experimental setup OS X: 8-Core Xeon, 32GB RAM, 200GB OWC SSD Faban Benchmark : PUT 64-byte key, 1024- byte value Scenarios:1, 2, 4, 8 threads 512M Java Heap

Perf: BDB Put

Perf: Krati Put

Perf: HailDB Put

future work Improve Packaging / Installation Schema refinements & perf enhancements Online backup/export with XtraBackup JNI Bindings

schema refinements Build upon Nokia work on fast k-v schema 8-byte long key hash vs. full key bytes Smart use of secondary indexes Native representation of vector clocks Delayed / soft deletion Expect 40-50% performance boost

InnoDB tuning Skinny columns, skinny rows! (esp. Primary Key) Varchar enum bad, int or smallint good fixed-width rows allows in-place updates Use covering indexes strategically More data per page means faster index scans, more efficient buffer pool utilization You only get so many trx s on given CPU/RAM configuration - benchmark this!

refined schema _id BIGINT (auto increment) _key_hash BIGINT _key VARBINARY(200) _version VARBINARY(200) _value BLOB PRIMARY KEY(_id) KEY(_key_hash)

online backup hot backup of data to other machine / destination test Percona Xtrabackup with HailDB next step: backup/export to Hadoop/HDFS (similar to Cloudera Sqoop tool)

JNI bindings JNI can get 2-5x perf boost vs. JNA... at the expense of nasty code Will go for schema optimizations and InnoDB tuning tips *first*

resources github.com/voldemort/voldemort freenode #voldemort github.com/sunnygleason/v-storage-haildb github.com/sunnygleason/v-storage-bench github.com/sunnygleason/g414-haildb jna.dev.java.net

more resources Amazon Dynamo Faban / XFaban HailDB Drizzle PBXT

Thank You!