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

opt(Restore): Make restore map phase faster #8038

Merged
merged 16 commits into from
Sep 17, 2021
Merged

Conversation

manishrjain
Copy link
Contributor

@manishrjain manishrjain commented Sep 17, 2021

With this change, this is what we got on a 48 core AWS machine.

alpha1    | I0917 08:03:27.921912      17 restore_map.go:547] Restore MAP 01h04m30s len(reqCh): 0 len(writeCh): 0 read: 472 GiB. output: 1.6 TiB. rate: 437 MiB/sec. nextFileId: 2474 writers: 0 jemalloc: 0 B.
alpha1    | I0917 08:03:27.921934      17 restore_map.go:559] Restore MAP Done in 01h04m30s.

This change is Reviewable

@manishrjain manishrjain merged commit 0060094 into master Sep 17, 2021
aman-bansal pushed a commit that referenced this pull request Sep 21, 2021
With this change, we can get ~450 MBps output throughput for map phase sustained. This is what we got on a 48 core AWS machine.

```
alpha1    | I0917 08:03:27.921912      17 restore_map.go:547] Restore MAP 01h04m30s len(reqCh): 0 len(writeCh): 0 read: 472 GiB. output: 1.6 TiB. rate: 437 MiB/sec. nextFileId: 2474 writers: 0 jemalloc: 0 B.
alpha1    | I0917 08:03:27.921934      17 restore_map.go:559] Restore MAP Done in 01h04m30s.
```

Changes:
* Make numGo equal to number of cores
* Don't throttle.
* Create a bigger buffer before calling merge
* Rewrite mapper to remove sendForWriting out of the critical path.
* Fix up a deadlock
* Fix up the mapper
* add write ch
* Use many goroutines to create map files
* Use fewer goroutines
* Use 75% of the cores for mapping
* Stagger the writes
* Half writers can write at a time
* Print num writers
* Range for file would be 1/4 to 1
* Reduce number of pending requests

Co-authored-by: Ahsan Barkati <[email protected]>
@ahsanbarkati ahsanbarkati deleted the ahsan/restore-numgo branch September 23, 2021 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants