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

Handle buffer pool for oxy #3450

Merged
merged 1 commit into from
Jun 7, 2018
Merged

Handle buffer pool for oxy #3450

merged 1 commit into from
Jun 7, 2018

Conversation

juliens
Copy link
Member

@juliens juliens commented Jun 6, 2018

What does this PR do?

Add a buffer pool to handle the copy of body in oxy.
vulcand/oxy#138

Motivation

Better performance
Fixes #3422

More

Some benchmark:
I use emilevauge/whoami binary, and traefik binary (without docker)

$ ./whoamI -port 8090

traefik.toml

maxIdleConnsPerHost = 100000
defaultEntryPoints = ["http"]

loglevel="ERROR"

[entryPoints]
  [entryPoints.http]
  address = ":8081"

[file]
  [frontends.frontend-f]
    backend = "b" 
  [frontends.frontend-f.routes.test_1]
  rule = "Host:localhost"
  [backends]
    [backends.b]
        [backends.b.servers.website]
            url = "http://127.0.0.1:8090"

Træfik v1.4

$ wrk -t20 -c1000 -d60s -H "Host: localhost" --latency  http://127.0.0.1:8081/bench
Running 1m test @ http://127.0.0.1:8081/bench
  20 threads and 1000 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    30.45ms   21.50ms 467.58ms   61.19%
    Req/Sec     1.69k   241.43     7.55k    88.77%
  Latency Distribution
     50%   29.68ms
     75%   44.56ms
     90%   56.40ms
     99%   84.52ms
  2013008 requests in 1.00m, 195.81MB read
Requests/sec:  33499.60
Transfer/sec:      3.26MB

PR version

$ wrk -t20 -c1000 -d60s -H "Host: localhost" --latency  http://127.0.0.1:8081/bench
Running 1m test @ http://127.0.0.1:8081/bench
  20 threads and 1000 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    27.10ms   15.42ms 208.96ms   70.76%
    Req/Sec     1.87k   209.22    11.31k    82.94%
  Latency Distribution
     50%   28.99ms
     75%   36.52ms
     90%   44.77ms
     99%   63.80ms
  2237140 requests in 1.00m, 217.62MB read
Requests/sec:  37222.81
Transfer/sec:      3.62MB

Copy link
Contributor

@ldez ldez left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@dtomcej dtomcej left a comment

Choose a reason for hiding this comment

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

LGTM
:shipit:

Copy link
Member

@mmatur mmatur left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants