-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
repair: Adjust parallelism according to memory size (#4696)
After commit 8a0c4d5 (Merge "Repair switch to rpc stream" from Asias), we increased the row buffer size for repair from 512KiB to 32MiB per repair instance. We allow repairing 16 ranges (16 repair instance) in parallel per repair request. So, a node can consume 16 * 32MiB = 512MiB per user requested repair. In addition, the repair master node can hold data from all the repair followers, so the memory usage on repair master can be larger than 512MiB. We need to provide a way to limit the memory usage. In this patch, we limit the total memory used by repair to 10% of the shard memory. The ranges that can be repaired in parallel is: max_repair_ranges_in_parallel = max_repair_memory / max_repair_memory_per_range. For example, if each shard has 4096MiB of memory, then we will have max_repair_ranges_in_parallel = 4096MiB / 32MiB = 12. Fixes #4675
- Loading branch information
Showing
5 changed files
with
27 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters