Ceph replication vs erasure coding

Ceph implements resilience thru replication. An erasure coded backend is being worked on. The following diagram compares the two and is hopefully somewhat self explanatory. It was created in the context of the the Ceph BOF at OSCON and is available in ASCII as well as images generated from Ditaa and Shaky. A two minute presentation is derived from it to explain how to read the drawing.


                       Client
                         |
                         v
                    +----------+
                    |   10MB   |
                    +--+-+-+---+
                       | | |
  3 replicas Ceph pool | | |
                       | | |
      +----------------+ | +------+
      |             +----+        |
      |             |             |
      v             v             v
    OSD 1         OSD 2         OSD 3         OSD 4         OSD 5
 +---------+   +---------+   +---------+   +---------+   +---------+
 |  10MB   |   |  10MB   |   |  10MB   |   |         |   |         |
 +-+-------+   +-+-------+   +-+-------+   +-+-------+   +-+-------+
 |0|       |   |1|       |   |2|       |   |3|       |   |4|       |
 +-+-------+   +-+-------+   +-+-------+   +-+-------+   +-+-------+

    OSD 6         OSD 7         OSD 8         OSD 9         OSD 10
 +---------+   +---------+   +---------+   +---------+   +---------+
 |         |   |         |   |         |   |         |   |         |
 +-+-------+   +-+-------+   +-+-------+   +-+-------+   +-+-------+
 |5|       |   |6|       |   |7|       |   |8|       |   |9|       |
 +-+-------+   +-+-------+   +-+-------+   +-+-------+   +-+-------+
                                             ^            ^
    OSD 11        OSD 12        OSD 13       |            |
 +---------+   +---------+   +---------+     |            |
 |         |   |         |   |         |     |            |
 +-+-------+   +-+-------+   +-+-------+     |            |
 |a|       |   |b|       |   |c|       |     |            |
 +-+-------+   +-+-------+   +-+-------+     |            |
   ^             ^             ^             |            |
   |             |             |             |            |
   +-+  +--------+             |             |            |
     |  |  +-------------------+ .. etc.     |  +---------+
     |  |  |                                 |  |
    ++ ++ ++        ++ ++ ++ ++ ++ ++ ++ ++ ++ ++
    || || ||        || || || || || || || || || ||
    ++ ++ ++        ++ ++ ++ ++ ++ ++ ++ ++ ++ ++
       parity                  data
        K=3              ^     M=10
                         |
                         |
                         | encode
  M is 10, K is 3        |
  erasure coded          |
       pool         +----+-----+
                    |   10MB   |
                    +----------+
                       Client
This entry was posted in ceph. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>