compressor filter: add benchmark#10464
Merged
mattklein123 merged 32 commits intoenvoyproxy:masterfrom Apr 24, 2020
Merged
Conversation
I am debugging a case of slow responses possibly due to compression, so throwing in some benchmarks to get some perf data about this filter. ``` $ ./bazel-bin/test/extensions/filters/http/common/compressor/compressor_filter_speed_test 2020-03-20 00:15:07 Running ./bazel-bin/test/extensions/filters/http/common/compressor/compressor_filter_speed_test Run on (8 X 2300 MHz CPU s) CPU Caches: L1 Data 32K (x4) L1 Instruction 32K (x4) L2 Unified 262K (x4) L3 Unified 6291K (x1) Load Average: 2.17, 2.14, 2.00 ***WARNING*** Library was built as DEBUG. Timings may be affected. --------------------------------------------------------- Benchmark Time CPU Iterations --------------------------------------------------------- FilterCompress 24674140 ns 24616586 ns 29 ``` Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Member
|
Thanks! This looks good to me. BTW, what kind of slowness you're debugging? Bad latency or throughput? |
Member
Author
Latency -- with big responses (> 100kb)... |
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Member
Author
|
/retest |
|
🔨 rebuilding |
added 11 commits
March 21, 2020 19:45
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Turns out, instantiating this Mock takes ~6ms (!!). Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
This brings time down to < 5ms (way better!). Turns we were using a lot of time calling TestUtility::feedBufferWithRandomCharacters(). Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Member
Author
|
Once #10508 lands, I'll update this to exercise different chunk sizes. We can still land this as is, and I'll do a follow-up -- no need to wait. |
rojkov
reviewed
Mar 25, 2020
test/extensions/filters/http/common/compressor/compressor_filter_speed_test.cc
Outdated
Show resolved
Hide resolved
|
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
added 4 commits
April 1, 2020 18:13
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
added 2 commits
April 2, 2020 11:12
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Member
Author
added 3 commits
April 7, 2020 16:16
Per: https://github.com/envoyproxy/envoy/blob/master/source/common/network/raw_buffer_socket.cc#L21 Envoy reads 16kb at a time from upstream. Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
added 4 commits
April 8, 2020 13:02
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
rojkov
previously approved these changes
Apr 14, 2020
added 2 commits
April 14, 2020 09:54
This actually makes the difference between different chunk size mostly dissapear. I suspect the previous differences were due to chunks being the same, since the seed for the random data isn't changing. Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Member
Author
added 2 commits
April 15, 2020 18:32
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Member
Author
|
@dio PTAL. |
Member
Author
|
ping? |
spenceral
added a commit
to spenceral/envoy
that referenced
this pull request
Apr 27, 2020
Signed-off-by: Spencer Lewis <slewis@squareup.com> * master: fault injection: add support for setting gRPC status (envoyproxy#10841) tests: tag tests that fail on Windows with fails_on_windows (envoyproxy#10940) Fix typo on Postgres Proxy documentation. (envoyproxy#10930) fuzz: improve header/data stop/continue modeling in HCM fuzzer. (envoyproxy#10931) gzip filter: allow setting zlib compressor's chunk size (envoyproxy#10508) http: replace vector/reserve with InlinedVector in codec helper (envoyproxy#10941) stats: add utilities to create stats from a vector of tokens, mixing dynamic and symbolic elements. (envoyproxy#10735) hcm: avoid invoking 100-continue handling on decode filter. (envoyproxy#10929) prometheus stats: Correctly group lines of the same metric name. (envoyproxy#10833) status: Fix ASAN error in Status payload handling (envoyproxy#10906) path: Fix merge slash for paths ending with slash and present query args (envoyproxy#10922) compressor filter: add benchmark (envoyproxy#10464) xray: expected_span_name is not captured by the lambda with MSVC (envoyproxy#10934) ci: update before purge in cleanup (envoyproxy#10938) tracer: Improve test coverage for x-ray (envoyproxy#10890) Revert "init: order dynamic resource initialization to make RTDS always be first (envoyproxy#10362)" (envoyproxy#10919)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I am debugging a case of slow responses possibly due to compression, so
throwing in some benchmarks to get some perf data about this filter.
Signed-off-by: Raul Gutierrez Segales rgs@pinterest.com