]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
erasure-code: set max_size to chunk_count() instead of 20
authorLoic Dachary <ldachary@redhat.com>
Thu, 18 Dec 2014 00:25:54 +0000 (01:25 +0100)
committerLoic Dachary <ldachary@redhat.com>
Thu, 15 Jan 2015 20:26:53 +0000 (21:26 +0100)
commit8b64fe93b088a3a33d357869c47e6bf928c3f0e4
tree414bad3fe0df25e4153756a3792adc8b7b43af4a
parent2f87ac807f3cc7ac55d9677d2051645bf5396a62
erasure-code: set max_size to chunk_count() instead of 20

The ruleset created for an erasure coded pool has max_size set to a
fixed value of 20, which may be incorrect when more than 20 chunks are
needed and lead to obscure errors. Set it to the number of chunks,
i.e. k+m most of the time.

In a cluster with few OSDs (9 for instance), setting max_size to 20
causes performance problems when injecting a new crushmap. The monitor
will call CrushTester::test which tries 1024 mappins for all sizes
ranging from min_size to max_size. Each attempt to map more OSDs than
available will exhaust all retries (50 by default) and it takes a
significant amount of time. In a cluster with 9 OSDs, testing one such
ruleset can take up to 5 seconds.

Since the test blocks the monitor leader, a few erasure coded rulesets
will block the monitor long enough to exceed the timeouts and trigger an
election.

http://tracker.ceph.com/issues/10363 Fixes: #10363

Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/crush/CrushWrapper.h
src/erasure-code/isa/ErasureCodeIsa.cc
src/erasure-code/jerasure/ErasureCodeJerasure.cc
src/erasure-code/lrc/ErasureCodeLrc.cc