Skip to content

stable sync elevated CPU usage #4974

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

Open
romange opened this issue Apr 21, 2025 · 3 comments
Open

stable sync elevated CPU usage #4974

romange opened this issue Apr 21, 2025 · 3 comments
Assignees
Labels
enhancement New feature or request rockstar Improvements that make us shine like stars

Comments

@romange
Copy link
Collaborator

romange commented Apr 21, 2025

to reproduce, run on server with replica and without:

./dfly_bench --qps -100 --pipeline 150 -test_time 300 --ratio=1:0 -d 32 --proactor_threads=2 -c 5

Also attaching pprof files (can be shown with pprof -http localhost:8080 profile_norepl.pb.gz)
It clearly shows that MainLoop grows from 7% to 31%.

profile_norepl.pb.gz

profile_withrepl.pb.gz

@romange romange added enhancement New feature or request rockstar Improvements that make us shine like stars labels Apr 21, 2025
@adiholden adiholden assigned mkaruza and abhijat and unassigned mkaruza Apr 23, 2025
@adiholden
Copy link
Collaborator

We suspect that master sends lots of small packets to replica in stable sync, meaning that we don't aggregate a lot of journal changes before sending to master, but instead send small amount of journal changes in each packet. We should verify this is the case and if so try to understand what is the reason for it and how to solve this.
@mkaruza already did some local testing with master replica and dfly bench while using wireshark and saw small packets. I suggest @abhijat try to run the setup locally your self and if need any help with wireshark ping Mario.

@romange
Copy link
Collaborator Author

romange commented Apr 23, 2025

Note, it's not urgent but important to attend at some point.

Maybe first step would be to reproduce it.

@romange
Copy link
Collaborator Author

romange commented Apr 23, 2025

My setup was: master/replica on r6g.xlarge, dfly_bench on another machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rockstar Improvements that make us shine like stars
Projects
None yet
Development

No branches or pull requests

4 participants