Skip to content

Conversation

@patchback
Copy link
Contributor

@patchback patchback bot commented Nov 12, 2024

This is a backport of PR #9835 as merged into master (32ccfc9).

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 enabled auto-merge (squash) November 12, 2024 16:35
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 12, 2024

CodSpeed Performance Report

Merging #9837 will not alter performance

Comparing patchback/backports/3.11/32ccfc9a19c63041c3e0f3166f9e14ba16b113e6/pr-9835 (47a6d36) with 3.11 (9ef7902)

Summary

✅ 17 untouched benchmarks

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

Benchmarks breakdown

Benchmark 3.11 patchback/backports/3.11/32ccfc9a19c63041c3e0f3166f9e14ba16b113e6/pr-9835 Change
🆕 test_one_hundred_get_requests_with_1024_chunked_payload[pyloop] N/A 38.4 ms N/A
🆕 test_one_hundred_get_requests_with_1024_content_length_payload[pyloop] N/A 38.3 ms N/A
👁 test_one_hundred_get_requests_with_1mib_chunked_payload[pyloop] 319.3 ms N/A N/A
👁 test_one_hundred_get_requests_with_1mib_content_length_payload[pyloop] 299.6 ms N/A N/A
👁 test_one_hundred_get_requests_with_2048_chunked_payload[pyloop] 38.6 ms N/A N/A
👁 test_one_hundred_get_requests_with_2048_content_length_payload[pyloop] 38.4 ms N/A N/A
🆕 test_one_hundred_get_requests_with_30000_chunked_payload[pyloop] N/A 47.6 ms N/A
🆕 test_one_hundred_get_requests_with_30000_content_length_payload[pyloop] N/A 42.1 ms N/A
👁 test_one_hundred_get_requests_with_32768_chunked_payload[pyloop] 48.5 ms N/A N/A
👁 test_one_hundred_get_requests_with_32768_content_length_payload[pyloop] 42.6 ms N/A N/A
🆕 test_one_hundred_get_requests_with_512kib_chunked_payload[pyloop] N/A 261.9 ms N/A
🆕 test_one_hundred_get_requests_with_512kib_content_length_payload[pyloop] N/A 169.2 ms N/A

@codecov
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.98%. Comparing base (9ef7902) to head (47a6d36).
Report is 193 commits behind head on 3.11.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             3.11    #9837   +/-   ##
=======================================
  Coverage   97.98%   97.98%           
=======================================
  Files         119      119           
  Lines       36248    36248           
  Branches     4342     4342           
=======================================
  Hits        35518    35518           
  Misses        546      546           
  Partials      184      184           
Flag Coverage Δ
CI-GHA 97.87% <100.00%> (ø)
OS-Linux 97.57% <100.00%> (ø)
OS-Windows 94.41% <100.00%> (ø)
OS-macOS 96.67% <100.00%> (ø)
Py-3.10.11 96.52% <100.00%> (+<0.01%) ⬆️
Py-3.10.15 97.12% <100.00%> (+<0.01%) ⬆️
Py-3.11.10 97.14% <100.00%> (-0.01%) ⬇️
Py-3.11.9 96.60% <100.00%> (ø)
Py-3.12.7 97.65% <100.00%> (+<0.01%) ⬆️
Py-3.13.0 97.63% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 96.45% <100.00%> (ø)
Py-3.9.20 97.04% <100.00%> (+0.03%) ⬆️
Py-pypy7.3.16 96.60% <100.00%> (-0.01%) ⬇️
VM-macos 96.67% <100.00%> (ø)
VM-ubuntu 97.57% <100.00%> (ø)
VM-windows 94.41% <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 0dfa21d into 3.11 Nov 12, 2024
34 of 35 checks passed
@bdraco bdraco deleted the patchback/backports/3.11/32ccfc9a19c63041c3e0f3166f9e14ba16b113e6/pr-9835 branch November 12, 2024 16:57
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.

2 participants