Skip to content

feat(streamer): Replicate journal items from different fiber #5225

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

Closed
wants to merge 1 commit into from

Conversation

mkaruza
Copy link
Contributor

@mkaruza mkaruza commented Jun 4, 2025

No description provided.

@mkaruza mkaruza marked this pull request as draft June 4, 2025 09:53
@mkaruza
Copy link
Contributor Author

mkaruza commented Jun 4, 2025

Create additional fiber in JournalStreamer that will be used for sending journal items for replication. Fiber waits with baseline of 10000 us but if there is influx of journal items that period will be shorter by factor of 2.

Testing with dfly_bench

Both master and replicate nodes were running locally o 6 proactor threads and 8GB of RAM and dfly_bench was running as:

./dfly_bench --qps -100 --pipeline 150 -test_time 60 --ratio=1:0 -d 32 --proactor_threads=2 -c 5
~ NO REPLICATION (single node) ~

Total time: 5m0.010367772s. Overall number of requests: 45003000, QPS: 150010, P99 lat: 3497.56us
Latency summary, all times are in usec:
Count: 45003000 Average: 1844.1646  StdDev: 534958.76
Min: 10.0000  Median: 1791.4340  Max: 20280.0000

~ BASELINE REPLICATION ~

Total time: 5m0.010323251s. Overall number of requests: 45003000, QPS: 150010, P99 lat: 7763.2us
Latency summary, all times are in usec:
Count: 45003000 Average: 2846.6449  StdDev: 909460.22
Min: 17.0000  Median: 2605.8893  Max: 57202.0000
~ SPSC QUEUE REPLICATION ~

Total time: 5m0.01019038s. Overall number of requests: 45003000, QPS: 150010, P99 lat: 3551.86us
Latency summary, all times are in usec:
Count: 45003000 Average: 1622.9450  StdDev: 392480.80
Min: 11.0000  Median: 1565.2629  Max: 12383.0000

PROFILING

MainLoop
NO REPLICATION 3.26%
BASELINE REPLICATION 9.10%
SPSC REPLICATION 6.38%

////

For more concrete test results there will be more testing needed.

@mkaruza mkaruza force-pushed the mkaruza/github#4974 branch from ddebaba to 1be3767 Compare June 10, 2025 07:55
@mkaruza
Copy link
Contributor Author

mkaruza commented Jun 12, 2025

Closing this draft. As discussed, replication improvement changes would be done gradually with few PRs.

@mkaruza mkaruza closed this Jun 12, 2025
@mkaruza mkaruza deleted the mkaruza/github#4974 branch June 24, 2025 09:58
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