Ceph Day Nov 2012 - Sage Weil

  • 666 views
Uploaded on

A Ceph overview from the creator of Ceph, Sage Weil at the first Ceph Day in Amsterdam. Nov 2012.

A Ceph overview from the creator of Ceph, Sage Weil at the first Ceph Day in Amsterdam. Nov 2012.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
666
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
89
Comments
0
Likes
3

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. a unified distributed storage system sage weil ceph day – november 2, 2012
  • 2. outline● why you should care● what is it, what its for● how it works ● architecture● how you can use it ● librados ● radosgw ● RBD, the ceph block device ● distributed file system● roadmap● why we do this, who we are
  • 3. why should you care about another storage system?
  • 4. requirements● diverse storage needs ● object storage ● block devices (for VMs) with snapshots, cloning ● shared file system with POSIX, coherent caches ● structured data... files, block devices, or objects?● scale ● terabytes, petabytes, exabytes ● heterogeneous hardware ● reliability and fault tolerance
  • 5. time● ease of administration● no manual data migration, load balancing● painless scaling ● expansion and contraction ● seamless migration
  • 6. cost● linear function of size or performance● incremental expansion ● no fork-lift upgrades● no vendor lock-in ● choice of hardware ● choice of software● open
  • 7. what is ceph?
  • 8. unified storage system● objects ● native ● RESTful● block ● thin provisioning, snapshots, cloning● file ● strong consistency, snapshots
  • 9. APP APP APP APP HOST/VM HOST/VM CLIENT CLIENT RADOSGW RADOSGW RBD RBD CEPH FS CEPH FSLIBRADOS LIBRADOS A bucket-based A bucket-based A reliable and fully- A reliable and fully- A POSIX-compliant A POSIX-compliant A library allowing A library allowing REST gateway, REST gateway, distributed block distributed block distributed file distributed file apps to directly apps to directly compatible with S3 compatible with S3 device, with aaLinux device, with Linux system, with aa system, with access RADOS, access RADOS, and Swift and Swift kernel client and aa kernel client and Linux kernel client Linux kernel client with support for with support for QEMU/KVM driver QEMU/KVM driver and support for and support for C, C++, Java, C, C++, Java, FUSE FUSE Python, Ruby, Python, Ruby, and PHP and PHPRADOSRADOS A reliable, autonomous, distributed object store comprised of self-healing, self-managing, A reliable, autonomous, distributed object store comprised of self-healing, self-managing, intelligent storage nodes intelligent storage nodes
  • 10. distributed storage system● data center scale ● 10s to 10,000s of machines ● terabytes to exabytes● fault tolerant ● no single point of failure ● commodity hardware● self-managing, self-healing
  • 11. ceph object model● pools ● 1s to 100s ● independent namespaces or object collections ● replication level, placement policy● objects ● bazillions ● blob of data (bytes to gigabytes) ● attributes (e.g., “version=12”; bytes to kilobytes) ● key/value bundle (bytes to gigabytes)
  • 12. why start with objects?● more useful than (disk) blocks ● names in a single flat namespace ● variable size ● simple API with rich semantics● more scalable than files ● no hard-to-distribute hierarchy ● update semantics do not span objects ● workload is trivially parallel
  • 13. DISK DISK DISK DISK DISK DISKHUMANHUMAN COMPUTER COMPUTER DISK DISK DISK DISK DISK DISK DISK DISK
  • 14. DISK DISK DISK DISKHUMANHUMAN DISK DISKHUMANHUMAN COMPUTER COMPUTER DISK DISK DISK DISKHUMANHUMAN DISK DISK DISK DISK
  • 15. HUMAN HUMAN HUMAN HUMAN HUMAN HUMAN HUMAN HUMAN DISK DISK HUMAN HUMANHUMAN HUMAN DISK DISK HUMAN HUMAN HUMAN HUMAN DISK DISK DISK DISK HUMAN HUMAN DISK DISK HUMAN HUMANHUMAN HUMAN DISK DISK (COMPUTER)) (COMPUTER HUMAN HUMAN DISK DISK HUMAN HUMAN HUMAN HUMAN DISK DISK HUMAN HUMAN HUMAN HUMAN DISK DISK HUMAN HUMAN DISK DISK HUMAN HUMAN DISK DISK HUMAN HUMAN HUMAN HUMAN DISK DISK HUMAN HUMAN HUMAN HUMAN (actually more like this…)
  • 16. COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISKHUMANHUMAN COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISKHUMANHUMAN COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISKHUMANHUMAN COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISK
  • 17. OSD OSD OSD OSD OSD FS FS FS FS FS btrfs xfs ext4DISK DISK DISK DISK DISK M M M
  • 18. Monitors: • Maintain cluster membership and stateM • Provide consensus for distributed decision-making • Small, odd number • These do not serve stored objects to clients Object Storage Daemons (OSDs): • At least three in a cluster • One per disk or RAID group • Serve stored objects to clients • Intelligently peer to perform replication tasks
  • 19. HUMAN MM M
  • 20. data distribution● all objects are replicated N times● objects are automatically placed, balanced, migrated in a dynamic cluster● must consider physical infrastructure ● ceph-osds on hosts in racks in rows in data centers● three approaches ● pick a spot; remember where you put it ● pick a spot; write down where you put it ● calculate where to put it, where to find it
  • 21. CRUSH• Pseudo-random placement algorithm• Fast calculation, no lookup• Repeatable, deterministic• Ensures even distribution• Stable mapping • Limited data migration• Rule-based configuration • specifiable replication • infrastructure topology aware • allows weighting
  • 22. 10 10 01 01 10 10 01 11 01 10 10 10 01 01 10 10 01 11 01 10 hash(object name) % num pg10 10 10 10 01 01 01 01 10 10 10 10 01 01 11 11 01 01 10 10 CRUSH(pg, cluster state, policy)
  • 23. 10 10 01 01 10 10 01 11 01 10 10 10 01 01 10 10 01 11 01 1010 10 10 10 01 01 01 01 10 10 10 10 01 01 11 11 01 01 10 10
  • 24. RADOS● monitors publish osd map that describes cluster state ● ceph-osd node status (up/down, weight, IP) M ● CRUSH function specifying desired data distribution● object storage daemons (OSDs) ● safely replicate and store object ● migrate data as the cluster changes over time ● coordinate based on shared view of reality● decentralized, distributed approach allows ● massive scales (10,000s of servers or more) ● the illusion of a single copy with consistent behavior
  • 25. CLIENTCLIENT ??
  • 26. CLIENT ??
  • 27. APP APP APP APP HOST/VM HOST/VM CLIENT CLIENT RADOSGW RADOSGW RBD RBD CEPH FS CEPH FSLIBRADOS A bucket-based A bucket-based A reliable and fully- A reliable and fully- A POSIX-compliant A POSIX-compliant A library allowing REST gateway, REST gateway, distributed block distributed block distributed file distributed file apps to directly compatible with S3 compatible with S3 device, with aaLinux device, with Linux system, with aa system, with access RADOS, and Swift and Swift kernel client and aa kernel client and Linux kernel client Linux kernel client with support for QEMU/KVM driver QEMU/KVM driver and support for and support for C, C++, Java, FUSE FUSE Python, Ruby, and PHPRADOSRADOS A reliable, autonomous, distributed object store comprised of self-healing, self-managing, A reliable, autonomous, distributed object store comprised of self-healing, self-managing, intelligent storage nodes intelligent storage nodes
  • 28. APP APP LIBRADOS LIBRADOS native M MMM M M
  • 29. LIBRADOSL • Provides direct access to RADOS for applications • C, C++, Python, PHP, Java • No HTTP overhead
  • 30. APP APP APP APP HOST/VM HOST/VM CLIENT CLIENT RADOSGW RBD RBD CEPH FS CEPH FSLIBRADOS LIBRADOS A bucket-based A reliable and fully- A reliable and fully- A POSIX-compliant A POSIX-compliant A library allowing A library allowing REST gateway, distributed block distributed block distributed file distributed file apps to directly apps to directly compatible with S3 device, with aaLinux device, with Linux system, with aa system, with access RADOS, access RADOS, and Swift kernel client and aa kernel client and Linux kernel client Linux kernel client with support for with support for QEMU/KVM driver QEMU/KVM driver and support for and support for C, C++, Java, C, C++, Java, FUSE FUSE Python, Ruby, Python, Ruby, and PHP and PHPRADOSRADOS A reliable, autonomous, distributed object store comprised of self-healing, self-managing, A reliable, autonomous, distributed object store comprised of self-healing, self-managing, intelligent storage nodes intelligent storage nodes
  • 31. APP APP APP APP RESTRADOSGWRADOSGW RADOSGW RADOSGW LIBRADOS LIBRADOS LIBRADOS LIBRADOS native M M M M M M
  • 32. RADOS Gateway:• REST-based interface to RADOS• Supports buckets, accounting• Compatible with S3 and Swift applications
  • 33. APP APP APP APP HOST/VM HOST/VM CLIENT CLIENT RADOSGW RADOSGW RBD CEPH FS CEPH FSLIBRADOS LIBRADOS A bucket-based A bucket-based A reliable and fully- A POSIX-compliant A POSIX-compliant A library allowing A library allowing REST gateway, REST gateway, distributed block distributed file distributed file apps to directly apps to directly compatible with S3 compatible with S3 device, with a Linux system, with aa system, with access RADOS, access RADOS, and Swift and Swift kernel client and a Linux kernel client Linux kernel client with support for with support for QEMU/KVM driver and support for and support for C, C++, Java, C, C++, Java, FUSE FUSE Python, Ruby, Python, Ruby, and PHP and PHPRADOSRADOS A reliable, autonomous, distributed object store comprised of self-healing, self-managing, A reliable, autonomous, distributed object store comprised of self-healing, self-managing, intelligent storage nodes intelligent storage nodes
  • 34. COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISKCOMPUTERCOMPUTER COMPUTER COMPUTER DISK DISK DISK DISK COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISK
  • 35. COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISKVMVM COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISKVMVM COMPUTER DISK COMPUTER DISK COMPUTER COMPUTER DISK DISKVMVM COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISK COMPUTER COMPUTER DISK DISK
  • 36. VM VMVIRTUALIZATION CONTAINERVIRTUALIZATION CONTAINER LIBRBD LIBRBD LIBRADOS LIBRADOS M M M M M M
  • 37. CONTAINERCONTAINER VM VM CONTAINER CONTAINER LIBRBD LIBRBD LIBRBD LIBRBD LIBRADOS LIBRADOS LIBRADOS LIBRADOS M M M M M M
  • 38. HOST HOST KRBD (KERNEL MODULE) KRBD (KERNEL MODULE) LIBRADOS LIBRADOS M MMM M M
  • 39. RADOS Block Device:• Storage of virtual disks in RADOS• Decouples VMs and containers • Live migration!• Images are striped across the cluster• Snapshots!• Support in • Qemu/KVM • OpenStack, CloudStack • Mainline Linux kernel
  • 40. HOW DO YOU SPIN UPTHOUSANDS OF VMs INSTANTLY AND EFFICIENTLY?
  • 41. instant copy144 0 0 0 0 = 144
  • 42. write CLIENT write write write144 4 = 148
  • 43. read read CLIENT read144 4 = 148
  • 44. APP APP APP APP HOST/VM HOST/VM CLIENT CLIENT RADOSGW RADOSGW RBD RBD CEPH FSLIBRADOS LIBRADOS A bucket-based A bucket-based A reliable and fully- A reliable and fully- A POSIX-compliant A library allowing A library allowing REST gateway, REST gateway, distributed block distributed block distributed file apps to directly apps to directly compatible with S3 compatible with S3 device, with aaLinux device, with Linux system, with a access RADOS, access RADOS, and Swift and Swift kernel client and aa kernel client and Linux kernel client with support for with support for QEMU/KVM driver QEMU/KVM driver and support for C, C++, Java, C, C++, Java, FUSE Python, Ruby, Python, Ruby, and PHP and PHPRADOSRADOS A reliable, autonomous, distributed object store comprised of self-healing, self-managing, A reliable, autonomous, distributed object store comprised of self-healing, self-managing, intelligent storage nodes intelligent storage nodes
  • 45. CLIENT CLIENTmetadata 01 01 data 10 10 M M M M M M
  • 46. M MMM M M
  • 47. Metadata Server• Manages metadata for a POSIX-compliant shared filesystem • Directory hierarchy • File metadata (owner, timestamps, mode, etc.)• Stores metadata in RADOS• Does not serve file data to clients• Only required for shared filesystem
  • 48. one treethree metadata servers ??
  • 49. DYNAMIC SUBTREE PARTITIONING
  • 50. recursive accounting● ceph-mds tracks recursive directory stats ● file sizes ● file and directory counts ● modification time● virtual xattrs present full stats● efficient $ ls ­alSh | head total 0 drwxr­xr­x 1 root            root      9.7T 2011­02­04 15:51 . drwxr­xr­x 1 root            root      9.7T 2010­12­16 15:06 .. drwxr­xr­x 1 pomceph         pg4194980 9.6T 2011­02­24 08:25 pomceph drwxr­xr­x 1 mcg_test1       pg2419992  23G 2011­02­02 08:57 mcg_test1 drwx­­x­­­ 1 luko            adm        19G 2011­01­21 12:17 luko drwx­­x­­­ 1 eest            adm        14G 2011­02­04 16:29 eest drwxr­xr­x 1 mcg_test2       pg2419992 3.0G 2011­02­02 09:34 mcg_test2 drwx­­x­­­ 1 fuzyceph        adm       1.5G 2011­01­18 10:46 fuzyceph drwxr­xr­x 1 dallasceph      pg275     596M 2011­01­14 10:06 dallasceph
  • 51. snapshots● volume or subvolume snapshots unusable at petabyte scale ● snapshot arbitrary subdirectories● simple interface ● hidden .snap directory ● no special tools $ mkdir foo/.snap/one # create snapshot $ ls foo/.snap one $ ls foo/bar/.snap _one_1099511627776 # parents snap name is mangled $ rm foo/myfile $ ls -F foo bar/ $ ls -F foo/.snap/one myfile bar/ $ rmdir foo/.snap/one # remove snapshot
  • 52. multiple protocols, implementations● Linux kernel client ● mount -t ceph 1.2.3.4:/ /mnt NFS SMB/CIFS ● export (NFS), Samba (CIFS)● ceph-fuse Ganesha Samba libcephfs libcephfs● libcephfs.so ● your app Hadoop your app libcephfs libcephfs ● Samba (CIFS) ● Ganesha (NFS) ceph-fuse ceph fuse ● Hadoop (map/reduce) kernel
  • 53. APP APP APP APP HOST/VM HOST/VM CLIENT CLIENT RADOSGW RADOSGW RBD RBD CEPH FS CEPH FSLIBRADOS LIBRADOS A bucket-based A bucket-based A reliable and fully- A reliable and fully- A POSIX-compliant A POSIX-compliant A library allowing A library allowing REST gateway, REST gateway, distributed block distributed block distributed file distributed file apps to directly apps to directly compatible with S3 compatible with S3 device, with aaLinux device, with Linux system, with aa system, with access RADOS, access RADOS, and Swift and Swift kernel client and aa kernel client and Linux kernel client Linux kernel client with support for with support for QEMU/KVM driver QEMU/KVM driver and support for and support for C, C++, Java, C, C++, Java, FUSE FUSE Python, Ruby, Python, Ruby, and PHP and PHP AWESOME AWESOME NEARLY AWESOME AWESOMERADOSRADOS AWESOME A reliable, autonomous, distributed object store comprised of self-healing, self-managing, A reliable, autonomous, distributed object store comprised of self-healing, self-managing, intelligent storage nodes intelligent storage nodes
  • 54. current status● argonaut stable release v0.48 ● rados, RBD, radosgw● bobtail stable release v0.55 ● RBD cloning ● improved performance, scaling, failure behavior ● radosgw API, performance improvements ● freeze in ~1 week, release in ~4 weeks
  • 55. roadmap● file system ● pivot in engineering focus ● CIFS (Samba), NFS (Ganesha), Hadoop● RBD ● Xen integration, iSCSI● radosgw ● Keystone integration● RADOS ● geo-replication ● PG split
  • 56. why we do this● limited options for scalable open source storage● proprietary solutions ● expensive ● dont scale (well or out) ● marry hardware and software● users hungry for alternatives ● scalability ● cost ● features
  • 57. two fields● green: cloud, big data ● incumbents dont have a viable solution ● most players cant afford to build their own ● strong demand for open source solutions● brown: traditional SAN, NAS; enterprise ● incumbents struggle to scale out ● cant compete on price with open solutions
  • 58. licensing● <yawn>● promote adoption● enable community development● prevent ceph from becoming proprietary● allow organic commercialization
  • 59. ceph license● LGPLv2 ● “copyleft” – free distribution – allow derivative works – changes you distribute/sell must be shared ● ok to link to proprietary code – allow proprietary products to incude and build on ceph – does not allow proprietary derivatives of ceph
  • 60. fragmented copyright● we do not require copyright assignment from contributors ● no single person or entity owns all of ceph ● no single entity can make ceph proprietary● strong community ● many players make ceph a safe technology bet ● project can outlive any single business
  • 61. why its important● ceph is an ingredient ● we need to play nice in a larger ecosystem ● community will be key to cephs success● truly open source solutions are disruptive ● open is a competitive advantage – frictionless integration with projects, platforms, tools – freedom to innovate on protocols – leverage community testing, development resources – open collaboration is efficient way to build technology
  • 62. who we are● Ceph created at UC Santa Cruz (2004-2007)● supported by DreamHost (2008-2011)● Inktank (2012) ● Los Angeles, Sunnyvale, San Francisco, remote● growing user and developer community ● Linux distros, users, cloud stacks, SIs, OEMs http://ceph.com/
  • 63. thankssage weilsage@inktank.com http://github.com/ceph@liewegas http://ceph.com/
  • 64. why we like btrfs● pervasive checksumming● snapshots, copy-on-write● efficient metadata (xattrs)● inline data for small files● transparent compression● integrated volume management ● software RAID, mirroring, error recovery ● SSD-aware● online fsck● active development community