56
ceph workshop GridKA School 2015 Diana Gudu Uros Stevanovic September 8, 2015 Karlsruhe Institute of Technology

ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

ceph workshopGridKA School 2015

Diana GuduUros StevanovicSeptember 8, 2015

Karlsruhe Institute of Technology

Page 2: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

introduction round

Page 3: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

diana gudu

∙ PhD researcher in Computer Science @KIT (SCC)∙ distributed multi-agent framework for trading cloud resources

∙ working in HBP @SCC on cloud storage∙ MSc in Computational Science and Engineering @TU Munich∙ BSc in Computer Science @Polytechnic University of Bucharest

2

Page 4: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

uros stevanovic

∙ working in AARC project @KIT (SCC)∙ PhD @KIT (IPE): 2010-2015

∙ building a custom smart camera framework∙ using FPGAs∙ implementing image processing algorithms

∙ studied Electrical Engineering @University of Belgrade

3

Page 5: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

you

Your turn!

4

Page 6: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

evolution of storage

Page 7: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

evolution of storage

Human

Computer

Disk

6

Page 9: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

evolution of storage

Human

Computer

Disk Disk DiskDiskDisk

HumanHuman

6

Page 10: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

evolution of storage

Human

Computer

Disk Disk DiskDiskDisk

HumanHuman

HumanHuman HumanHuman

Human Human

Human

HumanHuman Human

Human

6

Page 11: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

evolution of storage

Human

Computer

Disk Disk DiskDiskDisk

HumanHuman

HumanHuman HumanHuman

Human Human

Human

HumanHuman Human

Human

Big Expensive Computer

6

Page 12: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

evolution of storage

Human HumanHuman

Computer Computer ComputerComputerComputer

Disk Disk DiskDiskDisk

6

Page 13: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

evolution of storage

Human HumanHuman

Storage appliance

Computer Computer ComputerComputerComputer

Disk Disk DiskDiskDisk

6

Page 14: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

storage appliance

Oracle http://www.e-business.com/zfs-7420-storage-appliance

7

Page 15: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

future of storage

Support and maintenance

Proprietary software

Proprietary hardware

Computer Computer ComputerComputerComputer

Disk Disk DiskDiskDisk

8

Page 16: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

future of storage

Support and maintenance

Proprietary software

Proprietary hardware

Computer Computer ComputerComputerComputer

Disk Disk DiskDiskDisk

Enterprise subscription (optional)

Open-source software

Commodity hardware

Computer Computer ComputerComputerComputer

Disk Disk DiskDiskDisk

8

Page 17: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

ceph

Page 18: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

ceph

Philosophy

∙ open-source

∙ community focused∙ software-defined∙ scale-out hardware, no SPF∙ self-managing∙ failure is normal

10

Page 19: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

ceph

Philosophy

∙ open-source∙ community focused

∙ software-defined∙ scale-out hardware, no SPF∙ self-managing∙ failure is normal

10

Page 20: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

ceph

Philosophy

∙ open-source∙ community focused∙ software-defined

∙ scale-out hardware, no SPF∙ self-managing∙ failure is normal

10

Page 21: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

ceph

Philosophy

∙ open-source∙ community focused∙ software-defined∙ scale-out hardware, no SPF

∙ self-managing∙ failure is normal

10

Page 22: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

ceph

Philosophy

∙ open-source∙ community focused∙ software-defined∙ scale-out hardware, no SPF∙ self-managing

∙ failure is normal

10

Page 23: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

ceph

Philosophy

∙ open-source∙ community focused∙ software-defined∙ scale-out hardware, no SPF∙ self-managing∙ failure is normal

10

Page 24: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

ceph

Philosophy

∙ open-source∙ community focused∙ software-defined∙ scale-out hardware, no SPF∙ self-managing∙ failure is normal

History

2004

2006

2010

2012

2014

10

Page 25: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

ceph

Philosophy

∙ open-source∙ community focused∙ software-defined∙ scale-out hardware, no SPF∙ self-managing∙ failure is normal

History

2004

2006

2010

2012

2014

PhD thesis at UCSC

10

Page 26: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

ceph

Philosophy

∙ open-source∙ community focused∙ software-defined∙ scale-out hardware, no SPF∙ self-managing∙ failure is normal

History

2004

2006

2010

2012

2014

PhD thesis at UCSC

Project is open-sourced

10

Page 27: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

ceph

Philosophy

∙ open-source∙ community focused∙ software-defined∙ scale-out hardware, no SPF∙ self-managing∙ failure is normal

History

2004

2006

2010

2012

2014

PhD thesis at UCSC

Project is open-sourced

Included in Linux kernel

10

Page 28: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

ceph

Philosophy

∙ open-source∙ community focused∙ software-defined∙ scale-out hardware, no SPF∙ self-managing∙ failure is normal

History

2004

2006

2010

2012

2014

PhD thesis at UCSC

Project is open-sourced

Included in Linux kernel

Integrated into CloudStack

10

Page 29: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

ceph

Philosophy

∙ open-source∙ community focused∙ software-defined∙ scale-out hardware, no SPF∙ self-managing∙ failure is normal

History

2004

2006

2010

2012

2014

PhD thesis at UCSC

Project is open-sourced

Included in Linux kernel

Integrated into CloudStack

RedHat acquisition

10

Page 30: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

ceph architecture

Ceph Object Gateway

S3- and Swift-compatible

Ceph Block Device

virtual block device

Ceph Filesystem

POSIX-compliant

Ceph storage cluster

A reliable, easy to manage, distributed object store

Objects Virtual disks Files and directories

11

Page 31: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

ceph architecture

RADOSGW

bucket-based REST gateway

S3- and Swift-compatible

RBD

virtual block device

Linux kernel client

QEMU/KVM driver

librados

allows apps direct access to RADOS

support for C, C++, Java, Python, Ruby, PHP

CephFS

POSIX-compliant

Linux kernel client

FUSE support

RADOS

A reliable, autonomous, distributed object store

consisting of self-healing, self-managing, intelligent storage nodes

Application REST Host/VM FS client

11

Page 32: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

rados

OSD

OSD

OSD

MON

OSD

OSD

OSD

OSD

OSD

OSD

MON

OSD

OSD

OSD

OSD

OSD

OSD

MON

12

Page 33: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

ceph daemons

OSD∙ serve objects to clients∙ one per disk∙ backend: btrfs, xfs, ext4∙ peer-to-peer replication andrecovery

∙ write-ahead journal

MON∙ maintain cluster state andmembership

∙ vote for distributeddecision-making

∙ small, odd number

13

Page 34: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

data placement

Page 35: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

hotels

http://free-stock-illustration.com/hotel+key+card

15

Page 36: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

hotels

http://2.bp.blogspot.com/-o-rlIrv094E/TXxj8D-B2LI/AAAAAAAAGh8/VEbrbHpxVxo/s1600/DSC02213.JPG 15

Page 37: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

hotels

∙ What if the hotel had 1 billion rooms? Or ∞?#13,565,983

15

Page 38: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

hotels

What if the hotel changed constantly?

http://waltonian.com/news/eastern-library-renovations-continue/

15

Page 39: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

hotels

Scale-up everything?

http://www.millenniumhotels.com/content/dam/global/en/the-heritage-hotel-manila/images/cons-photographics-lobby-reception-desk%2003062011_34-basicB-preview-2048.jpg

15

Page 40: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

hotels

∙ The hotel itself must assign people to rooms instead of acentralized place

∙ The hotel should grow itself organically

∙ Deterministic placement algorithm∙ Intelligent nodes

15

Page 41: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

hotels

∙ The hotel itself must assign people to rooms instead of acentralized place

∙ The hotel should grow itself organically∙ Deterministic placement algorithm∙ Intelligent nodes

15

Page 42: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

crush

011101010100011010101010

placement group

OSD

OSD OSD

hash obj id + pool

CRUSH

16

Page 43: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

crush

011101010100011010101010

placement group

OSD

OSD OSD

hash obj id + pool

CRUSH

obj=’foo’

pool=’bar’

5.23

hash(’foo’) % 256 = 0x23

’bar’ = 5

crush(5.23) = [2, 14, 29]

osd.2

osd.14 osd.29

16

Page 44: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

crush

Controlled Replication Under Scalable Hashing

∙ Pseudo-random placement algorithm∙ Repeatable, deterministic∙ Statistically uniform distribution∙ Stable mapping: minimal data migration∙ Rule-based configuration, topology aware

17

Page 45: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

crush

Controlled Replication Under Scalable Hashing

∙ Pseudo-random placement algorithm∙ Repeatable, deterministic∙ Statistically uniform distribution∙ Stable mapping: minimal data migration∙ Rule-based configuration, topology aware

rack bucket

host bucket host bucket

osd bucket osd bucket osd bucket osd bucket

17

Page 46: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

ceph clients

Page 47: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

librados

∙ direct access to RADOS for applications∙ C, C++, Python, Java, Erlang, PHP∙ native socket access, no HTTP overhead

19

Page 48: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

radosgw

∙ RESTful API∙ unified object namespace∙ S3 and Swift compatible∙ user database and access control∙ usage accounting, billing

20

Page 49: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

rbd

∙ Storage of disk images in RADOS∙ Images are striped across the cluster∙ Decoupling of VMs from host∙ Thin provisioning

∙ physical storage only used once you begin writing

∙ Snaphots, copy-on-write clones∙ Support in Qemu, KVM

21

Page 50: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

CephFS

MDS

OSD

OSD

MON

OSD

OSD

OSD

MDS

OSD

OSD

MON

OSD

OSD

OSD

MDS

OSD

OSD

MON

FS client

datametadata

22

Page 51: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

CephFS

Metadata Server

∙ Manages metadata for POSIX-compliant filesystem∙ directory hierarchy∙ file metadata: owner, timestamps, mode etc

∙ Stores metadata in RADOS∙ Multiple MDS for HA and load balancing

23

Page 52: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

dynamic subtree partitioning

MDS MDS MDS MDS

24

Page 53: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

tutorial

Page 54: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

overview

∙ Deploy a Ceph cluster∙ Basic operations with the storage cluster∙ Data placement: CRUSH∙ Ceph Filesystem∙ Block storage: RBD∙ Advanced topics: erasure coding∙ Troubleshooting challenge

26

Page 55: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

cluster set-up

admin MONOSD

MONOSD

MONOSD

MDS OSD

/dev/vdb

/dev/vdb

/dev/vdb

/dev/vdb

ceph-5 ceph-1

ceph-2

ceph-3

ceph-4

27

Page 56: ceph workshop - GridKA School 2015 · ceph workshop GridKA School 2015 DianaGudu UrosStevanovic September8,2015 Karlsruhe Institute of Technology. introduction round. diana gudu ∙

Questions?

28