Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backupccl: move openSSTs call into the restore workers #98906

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

lidorcarmel
Copy link
Contributor

Currently we see openSSTs being a bottleneck during restore when using more than 4 workers.

This patch moves the openSSTs call into the worker itself, so that this work can be parallelized. This is needed for later PR which will increase the number of workers.

Also, this change simplifies the code a bit and makes it easier to implement #93324, because in that PR we want to produce a few partial SSTs that need to be processed serially. Before this patch it wasn't trivial to make sure that the N workers will not process those partial SSTs in the wrong order, and with this patch each worker will process a single mergedSST, and therefore can serialize the partial SSTs created from that mergedSST.

Tested by running a roachtest (4 nodes, 8 cores) with and without this change. The fixed version was faster: 80MB/s/node vs 60 but some of it is noise, we do expect a perf improvement when using more workers and other params tuned, which is the next step.

Informs: #98015
Epic: CRDB-20916

Release note: None

Currently we see openSSTs being a bottleneck during restore when using
more than 4 workers.

This patch moves the openSSTs call into the worker itself, so that this
work can be parallelized. This is needed for later PR which will increase
the number of workers.

Also, this change simplifies the code a bit and makes it easier to
implement cockroachdb#93324, because in that PR we want to produce a few partial SSTs
that need to be processed serially. Before this patch it wasn't trivial to
make sure that the N workers will not process those partial SSTs in the wrong
order, and with this patch each worker will process a single mergedSST, and
therefore can serialize the partial SSTs created from that mergedSST.

Tested by running a roachtest (4 nodes, 8 cores) with and without this
change. The fixed version was faster: 80MB/s/node vs 60 but some of it is
noise, we do expect a perf improvement when using more workers and other
params tuned, which is the next step.

Informs: cockroachdb#98015
Epic: CRDB-20916

Release note: None
@lidorcarmel lidorcarmel requested review from dt and rhu713 March 17, 2023 23:40
@lidorcarmel lidorcarmel requested a review from a team as a code owner March 17, 2023 23:40
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@lidorcarmel
Copy link
Contributor Author

TFTR!
bors r+

@craig
Copy link
Contributor

craig bot commented Mar 21, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Mar 21, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Mar 21, 2023

Build succeeded:

@craig craig bot merged commit c3b4ec9 into cockroachdb:master Mar 21, 2023
@lidorcarmel lidorcarmel deleted the lidor_openssts_in_workers branch July 14, 2023 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants