Ceph: Difference between revisions
Initial content |
mNo edit summary |
||
| Line 18: | Line 18: | ||
; CRUSH | ; CRUSH | ||
: Controlled Replication Under Scalable Hashing. A pseudo-random data distribution function that efficiently maps each Placement Group (PG) to an ordered list of OSDs upon which to store object replicas. | : Controlled Replication Under Scalable Hashing. A pseudo-random data distribution function that efficiently maps each Placement Group (PG) to an ordered list of OSDs upon which to store object replicas. | ||
; OSD Cluster Map | |||
: a compact, hierarchical description of the devices comprising the storage cluster. | |||
=== Client === | === Client === | ||
The Ceph Client codebase runs entirely in userspace. Applications can make use of Ceph by link to a client library or accessing files through FUSE. | The Ceph Client codebase runs entirely in userspace. Applications can make use of Ceph by link to a client library or accessing files through FUSE. | ||
Ceph utilizes a range of striping strategies to map file data into a series of objects. Object names include additional metadata information such as the file inode and stripe number. Object replicas are assigned to OSDs using CRUSH. | Ceph utilizes a range of striping strategies to map file data into a series of predictably named objects. Object names include additional metadata information such as the file inode and stripe number. Object replicas are assigned to OSDs using CRUSH. | ||
When accessing a file, the MDS translates the filename to the | When accessing a file, the MDS translates the filename to the predictably named objects which are then retrieved from the appropriate OSD without requiring a lookup. | ||
=== Cluster of OSDs === | === Cluster of OSDs === | ||
At a high level, a cluster of OSDs provide a single logical object store for clients and metadata servers. This cluster transparently handles the responsibility of data migration, replication, failure detection, and failure recovery. | At a high level, a cluster of OSDs provide a single logical object store for clients and metadata servers. This cluster transparently handles the responsibility of data migration, replication, failure detection, and failure recovery. The underlying technology running these clusters under Ceph is RADOS (Reliable Autonomic Distributed Object Store) which is designed to scale linearly. Each Ceph OSD in this system manages local object storage with EBOFS (Extent and B-tree based Object File System). | ||
Different OSDs could be grouped into different failure domains (such as physical location, hardware type, etc.) to ensure that data replication happens across these groups. Such groups are called Placement Groups (PGs). | |||
The CRUSH algorithm determines which OSDs an object should be placed in such that objects are distributed in such a way that satisfies any placement group requirements. To locate any object, CRUSH requires only the placement group and an OSD cluster map. | |||
Data is replicated in terms of PGs, each of which is mapped to an ordered list of n OSDs (for n-way replication). Clients send all writes to the primary (first) OSD in an object's PG. This primary OSD then assigns a forwards this object to any additional replica OSDs. | |||
=== Metadata Server ==== | |||
The Metadata Server (MDS) is diskless and serves as an index to the OSD cluster to facilitate read and write. All metadata as well as data are stored in the OSD cluster. | |||
Typically there would be around 5 MDSs in a 400 node OSD deployment. This looks like an overkill for just providing an indexing service to the OSD cluster, but actually is required for achieving very high-scalability. Effective metadata management is critical to overall system performance because file system metadata operations make up as much as half of typical file system workloads. | |||
Ceph can delegate MDS responsibilities based on dynamic subtree partitioning in order to dynamically load balance workloads. | |||
== Quick Usage == | |||
== Notes == | == Notes == | ||
Linux 2.6.34 supports RBD (Rados Block Device), a client/driver that supports block device mounts to cephfs | Linux 2.6.34 supports RBD (Rados Block Device), a client/driver that supports block device mounts to cephfs | ||
== See Also == | |||
* https://muratbuffalo.blogspot.com/2011/03/ceph-scalable-high-performance.html | |||
Revision as of 18:38, 10 September 2019
Ceph is an open source distributed storage system that provides object and block storage. Its key feature is the ability to replicate data across many different systems, allowing for the use of commodity components while maintaining reliable storage.
Introduction
Ceph has 3 main components:
- The Client, exposes a POSIX file system interface to a host or process. Performs file IO by communication to OSDs.
- The Cluster of OSDs, collectively stores all data and metadata
- The Metadata Server, manages namespace data (filenames, directories), consistency and coherence
Concepts
Some main concepts to keep in mind when dealing with Ceph are:
- OSD
- Object Storage Device
- Ceph OSD
- Ceph Object Storage Daemon, or ceph-osd handles object data including replication, recovery, rebalancing.
- MDS
- Metadata Server used by Ceph Filesystem on Ceph Block Devices.
- CRUSH
- Controlled Replication Under Scalable Hashing. A pseudo-random data distribution function that efficiently maps each Placement Group (PG) to an ordered list of OSDs upon which to store object replicas.
- OSD Cluster Map
- a compact, hierarchical description of the devices comprising the storage cluster.
Client
The Ceph Client codebase runs entirely in userspace. Applications can make use of Ceph by link to a client library or accessing files through FUSE.
Ceph utilizes a range of striping strategies to map file data into a series of predictably named objects. Object names include additional metadata information such as the file inode and stripe number. Object replicas are assigned to OSDs using CRUSH.
When accessing a file, the MDS translates the filename to the predictably named objects which are then retrieved from the appropriate OSD without requiring a lookup.
Cluster of OSDs
At a high level, a cluster of OSDs provide a single logical object store for clients and metadata servers. This cluster transparently handles the responsibility of data migration, replication, failure detection, and failure recovery. The underlying technology running these clusters under Ceph is RADOS (Reliable Autonomic Distributed Object Store) which is designed to scale linearly. Each Ceph OSD in this system manages local object storage with EBOFS (Extent and B-tree based Object File System).
Different OSDs could be grouped into different failure domains (such as physical location, hardware type, etc.) to ensure that data replication happens across these groups. Such groups are called Placement Groups (PGs).
The CRUSH algorithm determines which OSDs an object should be placed in such that objects are distributed in such a way that satisfies any placement group requirements. To locate any object, CRUSH requires only the placement group and an OSD cluster map.
Data is replicated in terms of PGs, each of which is mapped to an ordered list of n OSDs (for n-way replication). Clients send all writes to the primary (first) OSD in an object's PG. This primary OSD then assigns a forwards this object to any additional replica OSDs.
Metadata Server =
The Metadata Server (MDS) is diskless and serves as an index to the OSD cluster to facilitate read and write. All metadata as well as data are stored in the OSD cluster.
Typically there would be around 5 MDSs in a 400 node OSD deployment. This looks like an overkill for just providing an indexing service to the OSD cluster, but actually is required for achieving very high-scalability. Effective metadata management is critical to overall system performance because file system metadata operations make up as much as half of typical file system workloads.
Ceph can delegate MDS responsibilities based on dynamic subtree partitioning in order to dynamically load balance workloads.
Quick Usage
Notes
Linux 2.6.34 supports RBD (Rados Block Device), a client/driver that supports block device mounts to cephfs