-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
eds_speed_test: add GrpcMuxImpl config ingestion path to benchmark. #11566
Conversation
A lot of the overhead we see in envoyproxy#11362 has to do with the overhead from the GrpcMuxImpl ingestion path, and helps put the EDS cluster overhead in context. This patch adds a GrpcMuxImpl and GrpcSubscription to the test, allowing a fairly realistic cost of EDS update to be obtained. Below is the example output. We're seeing v3 costs ~3.2x of the v2 ingestion. Future patches will narrow this. --------------------------------------------------------------------------------- Benchmark Time CPU Iterations --------------------------------------------------------------------------------- priorityAndLocalityWeighted/0/0/2000 6277063 ns 6276456 ns 113 priorityAndLocalityWeighted/1/0/2000 20236878 ns 20236505 ns 35 priorityAndLocalityWeighted/0/1/2000 4589757 ns 4588833 ns 154 priorityAndLocalityWeighted/1/1/2000 14853274 ns 14850006 ns 42 priorityAndLocalityWeighted/0/0/4096 11865838 ns 11865314 ns 59 priorityAndLocalityWeighted/1/0/4096 39787876 ns 39787716 ns 18 priorityAndLocalityWeighted/0/1/4096 8186874 ns 8185724 ns 87 priorityAndLocalityWeighted/1/1/4096 29376139 ns 29374980 ns 24 priorityAndLocalityWeighted/0/0/32768 110248743 ns 110246101 ns 6 priorityAndLocalityWeighted/1/0/32768 343826306 ns 343761359 ns 2 priorityAndLocalityWeighted/0/1/32768 76962915 ns 76953406 ns 7 priorityAndLocalityWeighted/1/1/32768 254426231 ns 254401890 ns 3 priorityAndLocalityWeighted/0/0/100000 352576987 ns 352550994 ns 2 priorityAndLocalityWeighted/1/0/100000 1100804152 ns 1100646263 ns 1 priorityAndLocalityWeighted/0/1/100000 253870688 ns 253857626 ns 3 priorityAndLocalityWeighted/1/1/100000 808080918 ns 808028852 ns 1 Risk level: Low (test only) Testing: Added ASSERTs to validate that we're loaded all the hosts at the end of the benchmark. Signed-off-by: Harvey Tuch <[email protected]>
CC @pgenera |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can address the nit in a follow-up where I assume we make this go faster :)
: "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment"), | ||
subscription_stats_(Config::Utility::generateStats(stats_)), | ||
api_(Api::createApiForTest(stats_)), async_client_(new Grpc::MockAsyncClient()), | ||
grpc_mux_(new Config::GrpcMuxImpl( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::make_shared?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, out of curiosity, what is the performance difference here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably makes it slower if anything, but more conformant to modern style, no?
…nvoyproxy#11566) A lot of the overhead we see in envoyproxy#11362 has to do with the overhead from the GrpcMuxImpl ingestion path, and helps put the EDS cluster overhead in context. This patch adds a GrpcMuxImpl and GrpcSubscription to the test, allowing a fairly realistic cost of EDS update to be obtained. Below is the example output. We're seeing v3 costs ~3.2x of the v2 ingestion. Future patches will narrow this. --------------------------------------------------------------------------------- Benchmark Time CPU Iterations --------------------------------------------------------------------------------- priorityAndLocalityWeighted/0/0/2000 6277063 ns 6276456 ns 113 priorityAndLocalityWeighted/1/0/2000 20236878 ns 20236505 ns 35 priorityAndLocalityWeighted/0/1/2000 4589757 ns 4588833 ns 154 priorityAndLocalityWeighted/1/1/2000 14853274 ns 14850006 ns 42 priorityAndLocalityWeighted/0/0/4096 11865838 ns 11865314 ns 59 priorityAndLocalityWeighted/1/0/4096 39787876 ns 39787716 ns 18 priorityAndLocalityWeighted/0/1/4096 8186874 ns 8185724 ns 87 priorityAndLocalityWeighted/1/1/4096 29376139 ns 29374980 ns 24 priorityAndLocalityWeighted/0/0/32768 110248743 ns 110246101 ns 6 priorityAndLocalityWeighted/1/0/32768 343826306 ns 343761359 ns 2 priorityAndLocalityWeighted/0/1/32768 76962915 ns 76953406 ns 7 priorityAndLocalityWeighted/1/1/32768 254426231 ns 254401890 ns 3 priorityAndLocalityWeighted/0/0/100000 352576987 ns 352550994 ns 2 priorityAndLocalityWeighted/1/0/100000 1100804152 ns 1100646263 ns 1 priorityAndLocalityWeighted/0/1/100000 253870688 ns 253857626 ns 3 priorityAndLocalityWeighted/1/1/100000 808080918 ns 808028852 ns 1 Risk level: Low (test only) Testing: Added ASSERTs to validate that we're loaded all the hosts at the end of the benchmark. Signed-off-by: Harvey Tuch <[email protected]> Signed-off-by: yashwant121 <[email protected]>
…nvoyproxy#11566) A lot of the overhead we see in envoyproxy#11362 has to do with the overhead from the GrpcMuxImpl ingestion path, and helps put the EDS cluster overhead in context. This patch adds a GrpcMuxImpl and GrpcSubscription to the test, allowing a fairly realistic cost of EDS update to be obtained. Below is the example output. We're seeing v3 costs ~3.2x of the v2 ingestion. Future patches will narrow this. --------------------------------------------------------------------------------- Benchmark Time CPU Iterations --------------------------------------------------------------------------------- priorityAndLocalityWeighted/0/0/2000 6277063 ns 6276456 ns 113 priorityAndLocalityWeighted/1/0/2000 20236878 ns 20236505 ns 35 priorityAndLocalityWeighted/0/1/2000 4589757 ns 4588833 ns 154 priorityAndLocalityWeighted/1/1/2000 14853274 ns 14850006 ns 42 priorityAndLocalityWeighted/0/0/4096 11865838 ns 11865314 ns 59 priorityAndLocalityWeighted/1/0/4096 39787876 ns 39787716 ns 18 priorityAndLocalityWeighted/0/1/4096 8186874 ns 8185724 ns 87 priorityAndLocalityWeighted/1/1/4096 29376139 ns 29374980 ns 24 priorityAndLocalityWeighted/0/0/32768 110248743 ns 110246101 ns 6 priorityAndLocalityWeighted/1/0/32768 343826306 ns 343761359 ns 2 priorityAndLocalityWeighted/0/1/32768 76962915 ns 76953406 ns 7 priorityAndLocalityWeighted/1/1/32768 254426231 ns 254401890 ns 3 priorityAndLocalityWeighted/0/0/100000 352576987 ns 352550994 ns 2 priorityAndLocalityWeighted/1/0/100000 1100804152 ns 1100646263 ns 1 priorityAndLocalityWeighted/0/1/100000 253870688 ns 253857626 ns 3 priorityAndLocalityWeighted/1/1/100000 808080918 ns 808028852 ns 1 Risk level: Low (test only) Testing: Added ASSERTs to validate that we're loaded all the hosts at the end of the benchmark. Signed-off-by: Harvey Tuch <[email protected]> Signed-off-by: yashwant121 <[email protected]> Signed-off-by: yashwant121 <[email protected]> Signed-off-by: yashwant121 <[email protected]>
…nvoyproxy#11566) A lot of the overhead we see in envoyproxy#11362 has to do with the overhead from the GrpcMuxImpl ingestion path, and helps put the EDS cluster overhead in context. This patch adds a GrpcMuxImpl and GrpcSubscription to the test, allowing a fairly realistic cost of EDS update to be obtained. Below is the example output. We're seeing v3 costs ~3.2x of the v2 ingestion. Future patches will narrow this. --------------------------------------------------------------------------------- Benchmark Time CPU Iterations --------------------------------------------------------------------------------- priorityAndLocalityWeighted/0/0/2000 6277063 ns 6276456 ns 113 priorityAndLocalityWeighted/1/0/2000 20236878 ns 20236505 ns 35 priorityAndLocalityWeighted/0/1/2000 4589757 ns 4588833 ns 154 priorityAndLocalityWeighted/1/1/2000 14853274 ns 14850006 ns 42 priorityAndLocalityWeighted/0/0/4096 11865838 ns 11865314 ns 59 priorityAndLocalityWeighted/1/0/4096 39787876 ns 39787716 ns 18 priorityAndLocalityWeighted/0/1/4096 8186874 ns 8185724 ns 87 priorityAndLocalityWeighted/1/1/4096 29376139 ns 29374980 ns 24 priorityAndLocalityWeighted/0/0/32768 110248743 ns 110246101 ns 6 priorityAndLocalityWeighted/1/0/32768 343826306 ns 343761359 ns 2 priorityAndLocalityWeighted/0/1/32768 76962915 ns 76953406 ns 7 priorityAndLocalityWeighted/1/1/32768 254426231 ns 254401890 ns 3 priorityAndLocalityWeighted/0/0/100000 352576987 ns 352550994 ns 2 priorityAndLocalityWeighted/1/0/100000 1100804152 ns 1100646263 ns 1 priorityAndLocalityWeighted/0/1/100000 253870688 ns 253857626 ns 3 priorityAndLocalityWeighted/1/1/100000 808080918 ns 808028852 ns 1 Risk level: Low (test only) Testing: Added ASSERTs to validate that we're loaded all the hosts at the end of the benchmark. Signed-off-by: Harvey Tuch <[email protected]>
…nvoyproxy#11566) A lot of the overhead we see in envoyproxy#11362 has to do with the overhead from the GrpcMuxImpl ingestion path, and helps put the EDS cluster overhead in context. This patch adds a GrpcMuxImpl and GrpcSubscription to the test, allowing a fairly realistic cost of EDS update to be obtained. Below is the example output. We're seeing v3 costs ~3.2x of the v2 ingestion. Future patches will narrow this. --------------------------------------------------------------------------------- Benchmark Time CPU Iterations --------------------------------------------------------------------------------- priorityAndLocalityWeighted/0/0/2000 6277063 ns 6276456 ns 113 priorityAndLocalityWeighted/1/0/2000 20236878 ns 20236505 ns 35 priorityAndLocalityWeighted/0/1/2000 4589757 ns 4588833 ns 154 priorityAndLocalityWeighted/1/1/2000 14853274 ns 14850006 ns 42 priorityAndLocalityWeighted/0/0/4096 11865838 ns 11865314 ns 59 priorityAndLocalityWeighted/1/0/4096 39787876 ns 39787716 ns 18 priorityAndLocalityWeighted/0/1/4096 8186874 ns 8185724 ns 87 priorityAndLocalityWeighted/1/1/4096 29376139 ns 29374980 ns 24 priorityAndLocalityWeighted/0/0/32768 110248743 ns 110246101 ns 6 priorityAndLocalityWeighted/1/0/32768 343826306 ns 343761359 ns 2 priorityAndLocalityWeighted/0/1/32768 76962915 ns 76953406 ns 7 priorityAndLocalityWeighted/1/1/32768 254426231 ns 254401890 ns 3 priorityAndLocalityWeighted/0/0/100000 352576987 ns 352550994 ns 2 priorityAndLocalityWeighted/1/0/100000 1100804152 ns 1100646263 ns 1 priorityAndLocalityWeighted/0/1/100000 253870688 ns 253857626 ns 3 priorityAndLocalityWeighted/1/1/100000 808080918 ns 808028852 ns 1 Risk level: Low (test only) Testing: Added ASSERTs to validate that we're loaded all the hosts at the end of the benchmark. Signed-off-by: Harvey Tuch <[email protected]> Signed-off-by: yashwant121 <[email protected]>
A lot of the overhead we see in
#11362 has to do with the
overhead from the GrpcMuxImpl ingestion path, and helps put the EDS
cluster overhead in context.
This patch adds a GrpcMuxImpl and GrpcSubscription to the test,
allowing a fairly realistic cost of EDS update to be obtained.
Below is the example output. We're seeing v3 costs ~3.2x of the v2
ingestion. Future patches will narrow this.
Benchmark Time CPU
Iterations
priorityAndLocalityWeighted/0/0/2000 6277063 ns 6276456 ns
113
priorityAndLocalityWeighted/1/0/2000 20236878 ns 20236505 ns
35
priorityAndLocalityWeighted/0/1/2000 4589757 ns 4588833 ns
154
priorityAndLocalityWeighted/1/1/2000 14853274 ns 14850006 ns
42
priorityAndLocalityWeighted/0/0/4096 11865838 ns 11865314 ns
59
priorityAndLocalityWeighted/1/0/4096 39787876 ns 39787716 ns
18
priorityAndLocalityWeighted/0/1/4096 8186874 ns 8185724 ns
87
priorityAndLocalityWeighted/1/1/4096 29376139 ns 29374980 ns
24
priorityAndLocalityWeighted/0/0/32768 110248743 ns 110246101 ns
6
priorityAndLocalityWeighted/1/0/32768 343826306 ns 343761359 ns
2
priorityAndLocalityWeighted/0/1/32768 76962915 ns 76953406 ns
7
priorityAndLocalityWeighted/1/1/32768 254426231 ns 254401890 ns
3
priorityAndLocalityWeighted/0/0/100000 352576987 ns 352550994 ns
2
priorityAndLocalityWeighted/1/0/100000 1100804152 ns 1100646263 ns
1
priorityAndLocalityWeighted/0/1/100000 253870688 ns 253857626 ns
3
priorityAndLocalityWeighted/1/1/100000 808080918 ns 808028852 ns
1
Risk level: Low (test only)
Testing: Added ASSERTs to validate that we're loaded all the hosts at
the end of the benchmark.
Signed-off-by: Harvey Tuch [email protected]