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

Add WriteTo trait and implement it for Message struct #666

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

YHM404
Copy link
Contributor

@YHM404 YHM404 commented Feb 9, 2024

As we talked in #650 (review)

Write SendMessages directly to the stream to avoid unnecessary memory copies.

I compared the BenchMark results and found that the performance did not improve. I haven't figured out why yet.

Before:

send-and-poll
2024-02-09T08:33:58.789986Z  INFO iggy_bench::benchmark_runner: Producer results: total throughput: 2961.25 MB/s, 2961249 messages/s, average latency: 3.38 ms, average throughput: 148.06 MB/s, total duration: 3.38 s, Consumer results: total throughput: 3029.55 MB/s, 2899094 messages/s, average latency: 3.30 ms, average  throughput: 151.48 MB/s, total duration: 3.45 s
2024-02-09T08:33:58.789989Z  INFO iggy_bench::benchmark_runner: Results: total throughput: 2995.76 MB/s, 2929842 messages/s, average latency: 6.68 ms, average  throughput: 149.79 MB/s, total duration: 6.83 s

After:

send-and-poll
2024-02-09T08:56:44.146056Z  INFO iggy_bench::benchmark_runner: Producer results: total throughput: 3617.91 MB/s, 3617908 messages/s, average latency: 2.76 ms, average throughput: 180.90 MB/s, total duration: 2.76 s, Consumer results: total throughput: 2355.45 MB/s, 2254022 messages/s, average latency: 3.80 ms, average  throughput: 117.77 MB/s, total duration: 4.44 s
2024-02-09T08:56:44.146059Z  INFO iggy_bench::benchmark_runner: Results: total throughput: 2840.06 MB/s, 2777568 messages/s, average latency: 6.56 ms, average  throughput: 142.00 MB/s, total duration: 7.20 s

  

@YHM404 YHM404 marked this pull request as ready for review February 9, 2024 08:58
@YHM404 YHM404 force-pushed the ano/write_buffer_to_avoid_mem_allocate branch from ce39622 to 6032e1d Compare February 9, 2024 09:16
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.

1 participant