You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Determine ideal value for chunk_processing_semaphore #2392
I think backfilling on rotational drives has become somewhat slow in 1.12. I noticed this especially when backfilling a large number of small documents.
When I introduced chunk_processing_semaphore (src/clustering/immediate_consistency/branch) to throttle backfilling, I set it to a rather conservative limit of 1 concurrently processed backfill chunks.
The main benefit of a small value is a low performance impact of backfills on other queries.
We have introduced a limit on the number of concurrent backfills since then, and it probably makes sense to re-evaluate the choice for this limit and to optimize it for the best compromise between backfill throughput and limiting the performance impact of backfilling.
Increasing the capacity of the chunk_processing_semaphore increases backfill throughput a lot. on SSDs, it goes from 6K writes/s up to 21K writes/s when increasing it from 1 to 8 (11K at 2, 15K at 4).
In the more interesting case of rotational disks, I tested the backfill throughput between two nodes, in comparison to the impact that backfilling has on a single client inserting documents into the table.
Without backfilling, the insert throughput (soft durability, small documents) is roughly 400 documents/s. At capacities for the chunk_processing_semaphore of 1 and 2, the effect on the inserts is minimal, while a value of 2 almost doubles the backfill throughput. At 4 concurrently processed chunks, the impact on the insert queries is still quite reasonable, with backfill throughput now being three times the speed of what we had for a value of 1.
I think the best compromise is a value of 4. Unless we want to be really conservative, in which case we should set it to 2.
Activity
danielmewes commentedon May 27, 2014
Increasing the capacity of the
chunk_processing_semaphoreincreases backfill throughput a lot. on SSDs, it goes from 6K writes/s up to 21K writes/s when increasing it from 1 to 8 (11K at 2, 15K at 4).In the more interesting case of rotational disks, I tested the backfill throughput between two nodes, in comparison to the impact that backfilling has on a single client inserting documents into the table.

Without backfilling, the insert throughput (soft durability, small documents) is roughly 400 documents/s. At capacities for the
chunk_processing_semaphoreof 1 and 2, the effect on the inserts is minimal, while a value of 2 almost doubles the backfill throughput. At 4 concurrently processed chunks, the impact on the insert queries is still quite reasonable, with backfill throughput now being three times the speed of what we had for a value of 1.I think the best compromise is a value of 4. Unless we want to be really conservative, in which case we should set it to 2.
Increased capacity of chunk_processing_semaphore to 4
danielmewes commentedon May 27, 2014
A capacity change to 4 is in code review 1548.
danielmewes commentedon May 27, 2014
Merged into next. Will ship with 1.13