Ceph Maximum number of replication

30 views Asked by At

I am studying about Replication in Ceph. I can't find about max number of copies in replication. I guess maximum value depends on size of object, but I want to know about max value approximately.

I just figured out minimum and default(also recommended) value of replication is 2 and 3 in several documents

1

There are 1 answers

0
eblock On

The smallest entity for replication is the OSD (where the placement groups are stored), so in theory one could set the pool size to the number of OSDs (ignoring the fact that it doesn't make any sense). It doesn't depend on the object size. And just to avoid misinterpretation regarding minimal size. What you refer to is the recommended pool min_size, this is something like a safety switch to prevent data loss while the cluster is degraded (e. g. if not all OSDs are up). The recommendation for replicated pools is min_size = 2 and size = 3. It means that each object is stored three times. And as long as at least two of those replicas are available, you can read/write from/to the cluster.

You can reduce a pool's size (let's say to 2) for experimental reasons or if you only store not important data. But if you value your data, don't use a pool size of 2. There are plenty of explanations and discussions about it.

Erasure-coded pools have a default min_size = k + 1, this is also some sort of safety switch. The size is k + m, where k is the number of data chunks and m is the number of coding chunks, they are determined by the profile you create.