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

Adjust client payload benchmarks to better represent real world cases #9835

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Nov 12, 2024

We are interested in benchmarking various payload sizes at different buffering cut offs to see the memcpy and buffering impacts

2048 was too high as most small payloads are < 1024
32768 was two high as it always did two reads for this case so it wasn't giving us a case for a single large read.
1MiB was fine but 512KiB is also fine as it still gives us a benchmark for a multi-read case but there was no need to go that high as it didn't change the profile and only made the benchmark run longer

Note I'm testing on mac. I'm going to test on linux shortly since thats where the bulk of our users are. The breakpoints are going to be dictated by the kernel. If the linux buffer sizes are lower by default, I'll adjust the 2nd one down some more. Ideally we keep it as high as possible to see the memcpy effects but not so high that the message ends up in multiple reads

The 30000 size is good for linux as well as it results in a single read.

@bdraco bdraco requested a review from asvetlov as a code owner November 12, 2024 16:02
@bdraco bdraco added bot:chronographer:skip This PR does not need to include a change note backport-3.10 backport-3.11 Trigger automatic backporting to the 3.11 release branch by Patchback robot labels Nov 12, 2024
Copy link

codspeed-hq bot commented Nov 12, 2024

CodSpeed Performance Report

Merging #9835 will not alter performance

Comparing adjust_client_payload_benchmarks (3e25382) with master (14fcfd4)

Summary

✅ 17 untouched benchmarks

🆕 6 new benchmarks
⁉️ 6 (👁 6) dropped benchmarks

Benchmarks breakdown

Benchmark master adjust_client_payload_benchmarks Change
🆕 test_one_hundred_get_requests_with_1024_chunked_payload[pyloop] N/A 38.8 ms N/A
🆕 test_one_hundred_get_requests_with_1024_content_length_payload[pyloop] N/A 38.6 ms N/A
👁 test_one_hundred_get_requests_with_1mib_chunked_payload[pyloop] 320 ms N/A N/A
👁 test_one_hundred_get_requests_with_1mib_content_length_payload[pyloop] 300.2 ms N/A N/A
👁 test_one_hundred_get_requests_with_2048_chunked_payload[pyloop] 39 ms N/A N/A
👁 test_one_hundred_get_requests_with_2048_content_length_payload[pyloop] 38.8 ms N/A N/A
🆕 test_one_hundred_get_requests_with_30000_chunked_payload[pyloop] N/A 48 ms N/A
🆕 test_one_hundred_get_requests_with_30000_content_length_payload[pyloop] N/A 42.6 ms N/A
👁 test_one_hundred_get_requests_with_32768_chunked_payload[pyloop] 49 ms N/A N/A
👁 test_one_hundred_get_requests_with_32768_content_length_payload[pyloop] 43.1 ms N/A N/A
🆕 test_one_hundred_get_requests_with_512kib_chunked_payload[pyloop] N/A 262.3 ms N/A
🆕 test_one_hundred_get_requests_with_512kib_content_length_payload[pyloop] N/A 180.8 ms N/A

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.70%. Comparing base (14fcfd4) to head (3e25382).
Report is 2 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9835   +/-   ##
=======================================
  Coverage   98.70%   98.70%           
=======================================
  Files         118      118           
  Lines       36148    36148           
  Branches     4294     4294           
=======================================
  Hits        35680    35680           
  Misses        315      315           
  Partials      153      153           
Flag Coverage Δ
CI-GHA 98.59% <100.00%> (ø)
OS-Linux 98.27% <100.00%> (ø)
OS-Windows 96.07% <100.00%> (ø)
OS-macOS 97.35% <100.00%> (ø)
Py-3.10.11 97.20% <100.00%> (+<0.01%) ⬆️
Py-3.10.15 97.76% <100.00%> (ø)
Py-3.11.10 97.80% <100.00%> (ø)
Py-3.11.9 97.25% <100.00%> (ø)
Py-3.12.7 98.35% <100.00%> (ø)
Py-3.13.0 98.32% <100.00%> (-0.01%) ⬇️
Py-3.9.13 97.12% <100.00%> (ø)
Py-3.9.20 97.72% <100.00%> (+0.04%) ⬆️
Py-pypy7.3.16 97.29% <100.00%> (ø)
VM-macos 97.35% <100.00%> (ø)
VM-ubuntu 98.27% <100.00%> (ø)
VM-windows 96.07% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bdraco bdraco merged commit 32ccfc9 into master Nov 12, 2024
43 of 44 checks passed
@bdraco bdraco deleted the adjust_client_payload_benchmarks branch November 12, 2024 16:34
Copy link
Contributor

patchback bot commented Nov 12, 2024

Backport to 3.10: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.10/32ccfc9a19c63041c3e0f3166f9e14ba16b113e6/pr-9835

Backported as #9836

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

Copy link
Contributor

patchback bot commented Nov 12, 2024

Backport to 3.11: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.11/32ccfc9a19c63041c3e0f3166f9e14ba16b113e6/pr-9835

Backported as #9837

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Nov 12, 2024
bdraco added a commit that referenced this pull request Nov 12, 2024
…o better represent real world cases (#9837)

Co-authored-by: J. Nick Koston <nick@koston.org>
bdraco added a commit that referenced this pull request Nov 12, 2024
bdraco added a commit that referenced this pull request Nov 12, 2024
…o better represent real world cases (#9836)

Co-authored-by: J. Nick Koston <nick@koston.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-3.11 Trigger automatic backporting to the 3.11 release branch by Patchback robot bot:chronographer:skip This PR does not need to include a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant