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

eds_speed_test: add GrpcMuxImpl config ingestion path to benchmark. #11566

Merged
merged 1 commit into from
Jun 16, 2020

Conversation

htuch
Copy link
Member

@htuch htuch commented Jun 11, 2020

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]

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]>
@htuch
Copy link
Member Author

htuch commented Jun 11, 2020

CC @pgenera

Copy link
Contributor

@jmarantz jmarantz left a 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(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::make_shared?

Copy link
Member Author

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?

Copy link
Contributor

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?

@htuch htuch merged commit 0125d6f into envoyproxy:master Jun 16, 2020
@htuch htuch deleted the grpc-eds-speed-test branch June 16, 2020 00:30
yashwant121 pushed a commit to yashwant121/envoy that referenced this pull request Jun 24, 2020
…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]>
yashwant121 pushed a commit to yashwant121/envoy that referenced this pull request Jun 24, 2020
…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]>
songhu pushed a commit to songhu/envoy that referenced this pull request Jun 25, 2020
…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]>
yashwant121 pushed a commit to yashwant121/envoy that referenced this pull request Jul 24, 2020
…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]>
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