Haystack full of needles. Beaver, D., Kumar, S., Li, H.C., Sobel, - - PowerPoint PPT Presentation

haystack full of needles
SMART_READER_LITE
LIVE PREVIEW

Haystack full of needles. Beaver, D., Kumar, S., Li, H.C., Sobel, - - PowerPoint PPT Presentation

Haystack full of needles. Beaver, D., Kumar, S., Li, H.C., Sobel, J., and Vajgel, P.: Finding a Needle in Haystack: Facebook's Photo Storage, in Proceedings USENIX OSDI 2010. Introduction 65 billion photos (in 4 copies) 260


slide-1
SLIDE 1

Haystack full of needles.

Beaver, D., Kumar, S., Li, H.C., Sobel, J., and Vajgel, P.: “Finding a Needle in Haystack: Facebook's Photo Storage,” in Proceedings USENIX OSDI 2010.

slide-2
SLIDE 2

Introduction

 65 billion photos (in 4 copies)  260 billion images  20 petabytes of data  1 billion photos each week (~60 terabytes)  1 million views per second (at peak)

slide-3
SLIDE 3

System specification

System stores specific data which is:

 Written once  Read often  Never modified  Rarely deleted

slide-4
SLIDE 4

Requirements

 High throughput  Low latency  Fault-tolerant  Cost-effective  Simple

slide-5
SLIDE 5

Problem?

All exisiting storage system performed poorly

  • n facebook workload.
slide-6
SLIDE 6

Background

slide-7
SLIDE 7

NFS-based Design

slide-8
SLIDE 8

NFS-based Design

 NFS directories – large directory blockmap.

10 op. before reducing directory size. After reducing – 3 op. :

 Read directory metadata  Load inode  Read file content

 CDNs effectively serve cached photos (new

  • nes) Problem? Long tail!
slide-9
SLIDE 9

Solution

 Store files metadata in main memory  Problem? Inode size...

 xfs_inode_t takes 536 bytes

 So let's make metadata smaller!

slide-10
SLIDE 10

Haystack overview

 Haystack Store  Haystack Cache  Haystack Directory

slide-11
SLIDE 11

Haystack overview

slide-12
SLIDE 12

Haystack Store

 Manages filesystem metadata for photos  Storing data in few copies  Why is effective?

slide-13
SLIDE 13

Store layout

slide-14
SLIDE 14

Needle metadata

slide-15
SLIDE 15

Store index

slide-16
SLIDE 16

Store index

 Can be stored in main memory  Despite asynchronous update can be updated

  • n reboot (or on photo demand)
slide-17
SLIDE 17

Store usecases

 Photo read  Photo write  Photo delete  Photo change?

slide-18
SLIDE 18

Store optimizations

 Compaction – coping (skiping deleted and

altered files)

 Reducing metadata (now it is 40bytes per

image)

 Batch upload. Better performance when

writes/read only

slide-19
SLIDE 19

Haystack Directory

 Mapping from logical volumes to physical

(used during uploads and for URL construct)

 Balances writes across logical volumes and

reads across physical

 Determines whether use CDN or not  Identifies read-only volumes.

slide-20
SLIDE 20

Haystack Cache

 Extended cache  Cache only data when:

 Request is direct form user  Photo is fetched form write enabled vloume

 Used to protect write-enabled volumes

slide-21
SLIDE 21

Evaluation: Daily traffic

slide-22
SLIDE 22

Evaluation: Directory

slide-23
SLIDE 23

Evaluation: Cache

slide-24
SLIDE 24

Evaluation: write-enabled machine

slide-25
SLIDE 25

Evaluation: read-only machine

slide-26
SLIDE 26

Concusion

 System handling long tail content (crucial in

social network)

 Fault-tolerant  Higher troughput  Less cost  Simple  Scalable

slide-27
SLIDE 27

Questions?

slide-28
SLIDE 28

Thank you!

Przemysław Spodymek