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

[NEW] Save RDB in the replica Using a separate thread instead of the mainthread to speed up disk-based full sync #1529

Open
xbasel opened this issue Jan 8, 2025 · 3 comments

Comments

@xbasel
Copy link
Member

xbasel commented Jan 8, 2025

The problem/use-case that the feature addresses

Offload RDB saving to disk into a separate thread (currently it is done in the main threads), this speeds up disk-based full synchronization, especially when the replica is busy processing client requests.

Description of the feature
Speeds up disk-based full sync.

Alternatives you've considered

An alternative could to prioritize RDB traffic in the replica over normal client requests. But I think a separate thread doing this:

while (!eof)
  buf=read(primaryFd)
  write(rdbFileFd, buf)

is simpler.

@madolson
Copy link
Member

madolson commented Jan 8, 2025

@xbasel I'm not sure there is that much value in prioritizing disk based full sync when it is already much slower than directly serializing the data into memory.

@xbasel
Copy link
Member Author

xbasel commented Jan 8, 2025

@madolson IMHO there is still value in disk-based fullsync on the replica side if administrators prefer the replica to continue serving clients with stale data while downloading the RDB (as it improves replica availability).

@madolson
Copy link
Member

madolson commented Jan 9, 2025

Sounds good.

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

No branches or pull requests

2 participants