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

Implement parallel recovery #97

Merged
merged 16 commits into from
Sep 16, 2021
Merged

Conversation

MrCroxx
Copy link
Member

@MrCroxx MrCroxx commented Sep 8, 2021

  • Add config recovery_threads to control concurrency of recovery.
  • Implement parallel recovery & apply.
  • Update unit tests.

TODOs:

  • Unittests for all conditions.
  • Benchmark (final version).

Signed-off-by: MrCroxx mrcroxx@outlook.com

+ Add config `recovery_threads` to control concurrency of recovery.
+ Implement parallel recovery & apply.
+ Update unit tests.

Signed-off-by: MrCroxx <mrcroxx@outlook.com>
Signed-off-by: MrCroxx <mrcroxx@outlook.com>
Signed-off-by: MrCroxx <mrcroxx@outlook.com>
@MrCroxx
Copy link
Member Author

MrCroxx commented Sep 8, 2021

Parallel Recovery Benchmark

Configuration

config value
total size 10GB
region count 1000
batch size 1MB
item size 1KB
entry size 256B
compression threshold -

Benchmark

benchmark
Note: PRSA stands for "parallel read sequential apply" referring to my own branch concurrent-reader. PRPA stands for "parallel read parallel apply" which refers to this pr.

@tabokie tabokie self-requested a review September 8, 2021 03:35
src/config.rs Outdated Show resolved Hide resolved
src/engine.rs Outdated Show resolved Hide resolved
src/file_pipe_log.rs Outdated Show resolved Hide resolved
src/engine.rs Outdated Show resolved Hide resolved
src/engine.rs Outdated Show resolved Hide resolved
src/engine.rs Outdated Show resolved Hide resolved
src/memtable.rs Outdated Show resolved Hide resolved
src/recover.rs Outdated Show resolved Hide resolved
MrCroxx and others added 9 commits September 9, 2021 16:29
Signed-off-by: MrCroxx <mrcroxx@outlook.com>
Signed-off-by: MrCroxx <mrcroxx@outlook.com>
Signed-off-by: MrCroxx <mrcroxx@outlook.com>
Signed-off-by: MrCroxx <mrcroxx@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: MrCroxx <mrcroxx@outlook.com>
Signed-off-by: MrCroxx <mrcroxx@outlook.com>
@MrCroxx
Copy link
Member Author

MrCroxx commented Sep 14, 2021

Benchmark

Call FADV_DONTNEED before reading disks. Measuerd on slow SSD.

Configuration

config total size region count batch size item size entry size compression threshold
default 1GB 100 1MB 1KB 256B -
compressed 1GB 100 1MB 1KB 256B 8KB
small batch 1GB 100 1KB 256B 64B -
10GB 10GB 1000 1MB 1KB 256B -

Measurement

default compressed small batch 10GB
baseline 1.0650s 1.1071s 5.3022s 13.869s
1-thread 1.2436s 1.2060s 6.5620s 15.395s
4-thread 702.21ms 707.39ms 5.2430s 8.7042s
8-thread 630.79ms 612.19ms 4.2615s 6.7961s
16-thread 547.59ms 556.91ms 3.9654s 6.1792s

Signed-off-by: MrCroxx <mrcroxx@outlook.com>
src/engine.rs Show resolved Hide resolved
src/engine.rs Outdated Show resolved Hide resolved
Signed-off-by: MrCroxx <mrcroxx@outlook.com>
@tabokie tabokie merged commit 3a12e9b into tikv:master Sep 16, 2021
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.

2 participants