envoy icon indicating copy to clipboard operation
envoy copied to clipboard

Poor Performance of Envoy-contrib VS Envoy

Open lizj3624 opened this issue 10 months ago • 5 comments

I‘m testing the contrib version of Envoy and found that the performance of the contrib version of Envoy is 3 times different from the standard version. 一、Test Env:

1、Envoy version

    1)./bin/envoy  version: c7e8e7356d3a969c1b8e4e1f2687699acd91c6a1/1.26.1/Distribution/DEBUG/BoringSSL

    2)./bin/envoy-contrib  version: c7e8e7356d3a969c1b8e4e1f2687699acd91c6a1/1.26.1/Distribution/DEBUG/BoringSSL

3、OS: CentOS8,4.18.0-193.28.1.el8_2.x86_64

4、CPU: Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz,48 core

5、Envoy 30 workers

6、Envoy Conf

admin:
  address:
    socket_address: { address: 127.0.0.1, port_value: 19000 }

static_resources:
  listeners:
  - name: listener_0
    address:
      socket_address: { address: 172.11.112.101, port_value: 80 }
    enable_reuse_port: true
    filter_chains:
    - filters:
      - name: envoy.filters.network.http_connection_manager
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
          stat_prefix: ingress_http
          codec_type: AUTO
          upgrade_configs:
          - upgrade_type: websocket
          access_log:
          - name: envoy.access_loggers.file
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
              path: "/etc/envoy/logs/access.log"
              log_format:
                text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
          route_config:
            name: local_route
            virtual_hosts:
            - name: local_service
              domains: ["envoytest.my.com"]
              routes:
              - match:
                  prefix: "/"
                route:
                  cluster: envoy-test-cluster
          http_filters:
          - name: envoy.filters.http.router
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router

# about 70 endpoints
 - name: envoy-test-cluster
    connect_timeout: 0.25s
    type: STATIC
    lb_policy: ROUND_ROBIN
    health_checks:
    - timeout: 5s
      interval: 10s
      unhealthy_threshold: 2
      healthy_threshold: 2
      tcp_health_check: {}
    load_assignment:
      cluster_name: envoy-test-cluster
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address:
                address: 172.11.1.2
                port_value: 80
        - endpoint:
            address:
              socket_address:
                address: 172.11.1.3
                port_value: 80

        - endpoint:
            address:
              socket_address:
                address: 172.11.1.4
                port_value: 80
        - endpoint:
            address:
              socket_address:
                address: 172.11.1.5
                port_value: 80

二、Test Results

版本 CPU QPS
Envoy 70% 50000
Envoy-contrib 90% 16000

01

02

20240410234257829

03

lizj3624 avatar Apr 10 '24 15:04 lizj3624

CC: @wbpcode @jmarantz

RyanTheOptimist avatar Apr 10 '24 18:04 RyanTheOptimist

nice test; contrib is a bunch of optional filters, right? None of it enabled by default even if linked in?

And still it impacts perf so much?

Or were you somehow configuring some or all of the filters?

jmarantz avatar Apr 10 '24 18:04 jmarantz

@jmarantz I use the contrib version of Envoy mainly because I want to use the Go plugin, but this test did not enable the Go plugin, only supported contrib during compilation.

lizj3624 avatar Apr 11 '24 02:04 lizj3624

build cmd: bazel build //contrib/exe:envoy-static

lizj3624 avatar Apr 11 '24 02:04 lizj3624

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

github-actions[bot] avatar May 11 '24 04:05 github-actions[bot]

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

github-actions[bot] avatar May 18 '24 08:05 github-actions[bot]