Petabyte Scale Data at Facebook. Dhruba Borthakur, Engineer at Facebook, SIGMOD, New York, June 2013



Similar documents
Petabyte Scale Data at Facebook. Dhruba Borthakur, Engineer at Facebook, UC Berkeley, Nov 2012

Petabyte Scale Data at Facebook. Dhruba Borthakur, Engineer at Facebook, XLDB Conference at Stanford University, Sept 2012

Big Data. Facebook Wall Data using Graph API. Presented by: Prashant Patel Jaykrushna Patel

Data Warehousing and Analytics Infrastructure at Facebook. Ashish Thusoo & Dhruba Borthakur athusoo,dhruba@facebook.com

Apache Hadoop FileSystem and its Usage in Facebook

Realtime Apache Hadoop at Facebook. Jonathan Gray & Dhruba Borthakur June 14, 2011 at SIGMOD, Athens

Design and Evolution of the Apache Hadoop File System(HDFS)

BENCHMARKING CLOUD DATABASES CASE STUDY on HBASE, HADOOP and CASSANDRA USING YCSB

Hadoop & its Usage at Facebook

Hadoop & its Usage at Facebook

Hadoop Architecture and its Usage at Facebook

Hadoop Scalability at Facebook. Dmytro Molkov YaC, Moscow, September 19, 2011

America s Most Wanted a metric to detect persistently faulty machines in Hadoop

Apache Hadoop FileSystem Internals

Hadoop and its Usage at Facebook. Dhruba Borthakur June 22 rd, 2009

Hadoop Distributed File System. Dhruba Borthakur Apache Hadoop Project Management Committee

Big Fast Data Hadoop acceleration with Flash. June 2013

Facebook s Petabyte Scale Data Warehouse using Hive and Hadoop

Unified Big Data Processing with Apache Spark. Matei

Real-time Analytics at Facebook: Data Freeway and Puma. Zheng Shao 12/2/2011

Hypertable Goes Realtime at Baidu. Yang Dong Sherlock Yang(

A REVIEW PAPER ON THE HADOOP DISTRIBUTED FILE SYSTEM

An Industrial Perspective on the Hadoop Ecosystem. Eldar Khalilov Pavel Valov

Using distributed technologies to analyze Big Data

Distributed File System. MCSN N. Tonellotto Complements of Distributed Enabling Platforms

Database Scalability and Oracle 12c

Architectural patterns for building real time applications with Apache HBase. Andrew Purtell Committer and PMC, Apache HBase

Oracle s Big Data solutions. Roger Wullschleger. <Insert Picture Here>

Finding a needle in Haystack: Facebook s photo storage IBM Haifa Research Storage Systems

Four Orders of Magnitude: Running Large Scale Accumulo Clusters. Aaron Cordova Accumulo Summit, June 2014

Moving From Hadoop to Spark

CitusDB Architecture for Real-Time Big Data

Big Data With Hadoop

Hadoop and Hive Development at Facebook. Dhruba Borthakur Zheng Shao {dhruba, Presented at Hadoop World, New York October 2, 2009

Large scale processing using Hadoop. Ján Vaňo

BIG DATA TRENDS AND TECHNOLOGIES

CASE STUDY: Oracle TimesTen In-Memory Database and Shared Disk HA Implementation at Instance level. -ORACLE TIMESTEN 11gR1

Hadoop Ecosystem B Y R A H I M A.

Data Warehouse Overview. Namit Jain

Preview of Oracle Database 12c In-Memory Option. Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Performance Comparison of SQL based Big Data Analytics with Lustre and HDFS file systems

Hadoop IST 734 SS CHUNG

Can the Elephants Handle the NoSQL Onslaught?

CSE-E5430 Scalable Cloud Computing Lecture 2

Lecture 10: HBase! Claudia Hauff (Web Information Systems)!

Amazon Redshift & Amazon DynamoDB Michael Hanisch, Amazon Web Services Erez Hadas-Sonnenschein, clipkit GmbH Witali Stohler, clipkit GmbH

How To Use Big Data For Telco (For A Telco)

Improve Business Productivity and User Experience with a SanDisk Powered SQL Server 2014 In-Memory OLTP Database

How To Scale Out Of A Nosql Database

low-level storage structures e.g. partitions underpinning the warehouse logical table structures

Quantcast Petabyte Storage at Half Price with QFS!

BookKeeper. Flavio Junqueira Yahoo! Research, Barcelona. Hadoop in China 2011

In Memory Accelerator for MongoDB

Luncheon Webinar Series May 13, 2013

Hadoop: Embracing future hardware

Introduction to Hbase Gkavresis Giorgos 1470

Google File System. Web and scalability

News and trends in Data Warehouse Automation, Big Data and BI. Johan Hendrickx & Dirk Vermeiren

Alternatives to HIVE SQL in Hadoop File Structure

An Oracle White Paper June High Performance Connectors for Load and Access of Data from Hadoop to Oracle Database

NextGen Infrastructure for Big DATA Analytics.

A1 and FARM scalable graph database on top of a transactional memory layer

Oracle Database In-Memory The Next Big Thing

Overview on Graph Datastores and Graph Computing Systems. -- Litao Deng (Cloud Computing Group)

Splice Machine: SQL-on-Hadoop Evaluation Guide

BIG DATA CAN DRIVE THE BUSINESS AND IT TO EVOLVE AND ADAPT RALPH KIMBALL BUSSUM 2014

Near Real Time Indexing Kafka Message to Apache Blur using Spark Streaming. by Dibyendu Bhattacharya

Putting Apache Kafka to Use!

Lecture 5: GFS & HDFS! Claudia Hauff (Web Information Systems)! ti2736b-ewi@tudelft.nl

Accelerating Real Time Big Data Applications. PRESENTATION TITLE GOES HERE Bob Hansen

How Companies are! Using Spark

Open source Google-style large scale data analysis with Hadoop

Using RDBMS, NoSQL or Hadoop?

THE HADOOP DISTRIBUTED FILE SYSTEM

Energy Efficient MapReduce

WITH A FUSION POWERED SQL SERVER 2014 IN-MEMORY OLTP DATABASE

Hadoop Distributed File System. Dhruba Borthakur Apache Hadoop Project Management Committee June 3 rd, 2008

Hadoop & Spark Using Amazon EMR

BIG DATA ANALYTICS REFERENCE ARCHITECTURES AND CASE STUDIES

Big Data on AWS. Services Overview. Bernie Nallamotu Principle Solutions Architect

Inge Os Sales Consulting Manager Oracle Norway

SAS BIG DATA SOLUTIONS ON AWS SAS FORUM ESPAÑA, OCTOBER 16 TH, 2014 IAN MEYERS SOLUTIONS ARCHITECT / AMAZON WEB SERVICES

DATA MINING WITH HADOOP AND HIVE Introduction to Architecture

NoSQL for SQL Professionals William McKnight

THE ATLAS DISTRIBUTED DATA MANAGEMENT SYSTEM & DATABASES

How To Store Data On An Ocora Nosql Database On A Flash Memory Device On A Microsoft Flash Memory 2 (Iomemory)

Alexander Rubin Principle Architect, Percona April 18, Using Hadoop Together with MySQL for Data Analysis

Snapshots in Hadoop Distributed File System

Benchmarking Hadoop & HBase on Violin

Cluster Computing. ! Fault tolerance. ! Stateless. ! Throughput. ! Stateful. ! Response time. Architectures. Stateless vs. Stateful.

The Hadoop Distributed File System

Overview. Big Data in Apache Hadoop. - HDFS - MapReduce in Hadoop - YARN. Big Data Management and Analytics

Benchmarking Cassandra on Violin

Constructing a Data Lake: Hadoop and Oracle Database United!

HIVE + AMAZON EMR + S3 = ELASTIC BIG DATA SQL ANALYTICS PROCESSING IN THE CLOUD A REAL WORLD CASE STUDY

Introduction to Big Data! with Apache Spark" UC#BERKELEY#

Future Prospects of Scalable Cloud Computing

Big Data and Market Surveillance. April 28, 2014

Transcription:

Petabyte Scale Data at Facebook Dhruba Borthakur, Engineer at Facebook, SIGMOD, New York, June 2013

Agenda 1 Types of Data 2 Data Model and API for Facebook Graph Data 3 SLTP (Semi-OLTP) and Analytics data 4 Immutable data store for photos, videos, etc 5 Why Hive?

Four major types of storage systems Online Transaction Processing Databases (OLTP) The Facebook Social Graph Semi-online Lightweight Transaction Processing Databases (SLTP) Facebook Messages and Facebook Time Series Immutable DataStore Photos, videos, etc Analytics DataStore Data Warehouse, Logs storage

Size and Scale of Databases Total Size Technology Bottlenecks Facebook Graph Single digit petabytes MySQL and TAO Random read IOPS Facebook Messages and Time Series Data Tens of petabytes HBase and HDFS Write IOPS and storage capacity Facebook Photos Hundreds of petabytes Haystack storage capacity Data Warehouse Hundreds of petabytes Hive, HDFS and Hadoop storage capacity

Characteristics Query Latency Consistency Durability Facebook Graph Facebook Messages and Time Series Data Facebook Photos < few milliseconds < 100 millisec quickly consistent across data centers consistent within a data center No data loss No data loss < 100 millisec immutable No data loss Data Warehouse < 1 min not consistent across data centers No silent data loss

Facebook Graph: Objects and Associations

Data model Objects & Associations likes 8636146 (user) liked by fan friend 18429207554 (page) admin friend 604191769 (user) name: Barack Obama birthday: 08/04/1961 website: http:// verified: 1 6205972929 (story)

Facebook Social Graph: TAO and MySQL An OLTP workload: Uneven read heavy workload Huge working set with creation-time locality Highly interconnected data Constantly evolving As consistent as possible

Data model Objects & Associations Object -> unique 64 bit ID plus a typed dictionary (id) -> (otype, (key -> value)* ) ID 6815841748 -> { type : page, name : Barack Obama, } Association -> typed directed edge between 2 IDs (id1, atype, id2) -> (time, (key -> value)* ) (8636146, RSVP, 130855887032173) -> (1327719600, { response : YES }) Association lists (id1, atype) -> all assocs with given id1, atype in desc order by time

Architecture Cache & Storage Web servers TAO Storage Cache MySQL Storage

Architecture Sharding Object ids and Assoc id1s are mapped to shard ids Web Servers TAO Cache s1 s3 s5 s2 s6 s4 s7 s8 MySQL Storage db2 db4 db1 db3 db8 db7 db5 db6

Workload Read-heavy workload Significant range queries LinkBench benchmark SIGMOD 2013 paper http://www.github.com/facebook/linkbench Real distribution of associations and access patterns

Messages & Time Series Database SLTP workload

Facebook Messages Messages Chats Emails SMS

Why we chose HBase High write throughput Horizontal scalability Automatic Failover Strong consistency within a data center Benefits of HDFS : Fault tolerant, scalable, Map-Reduce toolset, Why is this SLTP? Semi-online: Queries run even if part of the database is offline Lightweight Transactions: single row transactions Storage capacity bound rather than iops or cpu bound

What we store in HBase Small messages Message metadata (thread/message indices) Search index Large attachments stored in Haystack (photo store)

Size and scale of Messages Database 6 Billion messages/day 74 Billion operations/day At peak: 1.5 million operations/sec 55% read, 45% write operations Average write operation inserts 16 records All data is lzo compressed Growing at 8 TB/day

Haystack: The Photo Store

Facebook Photo DataStore 2009 2012 Total Size 15 billion photos 1.5 Petabyte hundred petabytes Upload Rate 30 million photos/day 3 TB/day 300 million photos/day 30 TB/day Serving Rate 555K images/sec

Haystack based Design Haystack Directory Haystack Store Web Server Haystack Cache Browser CDN

Hive Analytics Warehouse

Life of a photo tag in Hadoop/Hive storage Periodic Analysis (HIVE) Daily report on count of photo tags by country (1day) nocron Adhoc Analysis (HIVE) hipal Count photos tagged by females age 20-25 yesterday Hive Warehouse Log line reaches copier/loader warehouse (15 min) Scrapes User info reaches Warehouse (1day) MySQL DB User tags a photo Realtime Analytics (HBASE) puma Count users tagging photos in the last hour (1min) Scribe Log Storage (HDFS) Log line reaches Scribeh (10s) www.facebook.com Log line generated: <user_id, photo_id>

Analytics Data Growth(last 4 years) Facebook Users Queries/Day Scribe Data/ Day Nodes in warehouse Size (Total) Growth 14X 60X 250X 260X 2500X

Why use Hive instead of a Parallel DBMS? Stonebraker/DeWitt from the DBMS community: Quote major step backwards Published benchmark results which show that Hive is not as performant as a traditional DBMS http://database.cs.brown.edu/projects/mapreduce-vs-dbms/

What is BigData? Prospecting for Gold.. Finding Gold in the wild-west A platform for huge data-experiments A majority of queries are searching for a single gold nugget Great advantage in keeping all data in one queryable system No structure to data, specify structure at query time

How to measure performance Traditional database systems: Latency of queries Big Data systems: How much data can we store and query? (the Big in BigData) How much data can we query in parallel? What is the value of this system?

Measure Cost of Storage Distributed Network Encoding of data Encoding is better than replication Use algorithms that minimize network transfer for data repair Tradeoff cpu for storage & network Remember lineage of data, e.g. record query that created it If data is not accessed for sometime, delete it If a query occurs, recompute the data using query lineage

Measure Network Encoding Start the same: triplicate every data block (storage overhead=3) Background encoding A B C Combine third replica of blocks from a single file to create parity block A A B B C C Remove third replica (storage overhead = 2) A+B+C Reed Solomon encoding for much older files (storage overhead = 1.4) A file with three blocks A, B and C (XOR Encoding) http://hadoopblog.blogspot.com/2009/08/hdfs-and-erasure-codes-hdfs-raid.html

Measuring Data Discovery: Crowd Sourcing There are 50K tables in a single warehouse Users are Data Adminstrators themselves Questions about a table are directed to users of that table Automatic query lineage tools

Fault Tolerance and Elasticity Commodity machines Faults are the norm Anomalous behavior rather than complete failures 10% of machines are always 50% slower than the others

Measuring Fault Tolerance and Elasticity Fault tolerance is a must Continuously kill machines during benchmarking Slow down 10% of machine during benchmark Elasticity is necessary Add/remove new machines during benchmarking

Why use Hive instead of a Parallel DBMS? Stonebraker/DeWitt from the DBMS community: Quote Hadoop is a major step backwards Published benchmark results which show that Hadoop/Hive is not as performant as a traditional DBMS http://database.cs.brown.edu/projects/mapreduce-vs-dbms/ Hive query is 50 times slower than DBMS query Conclusion: Facebook s 4000 node cluster (100PB) can be replaced by a 20 node DBMS cluster What is wrong with the above conclusion?

Hive/Hadoop instead of Parallel DBMS? Dr Stonebraker s proposal would put 5 PB per node on DBMS What will be the io throughput of that system? Abysmal How many concurrent queries can it support? Certainly not 100K concurrent clients Query latency is not the only metric to make a conclusion Hive/Hadoop is very very slow Hive/Hadoop needs to be fixed to reduce query latency But an existing DBMS cannot replace Hive/Hadoop

Presto: A Distributed SQL Engine Low Latency, interactive usage Bypasses Map/Reduce Processes Hive/Hadoop data but has pluggable backends Will be open sourced soon Scale 30K daily queries, 300 TB scanned daily Growing fast

Future Challenges

New trends in storage software Analytics Data Streaming queries, low latency queries Cold Storage very low $/GB OLTP Data One size does not fit all: need specialized solutions disk, flash, disk+flash write heavy, point lookups, range scans iops bound, storage bandwidth bound, memory bound

Questions? dhruba@fb.com http://hadoopblog.blogspot.com/