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

Framework vibora was committed to the repository with an error, fixing which reduces speed by 30% #8065

Closed
remittor opened this issue Mar 24, 2023 · 1 comment

Comments

@remittor
Copy link
Contributor

remittor commented Mar 24, 2023

Original vibora repo: https://github.com/vibora-io/vibora (latest commit of 2019)
Used by TFB vibora: https://github.com/IterableTrucks/vibora.git

git+https://github.com/IterableTrucks/vibora.git@f622101bbf9d4fb045b04afcb32221a5c0673ed9#egg=vibora[fast]

Author @IterableTrucks created a fork on github and committed several important fixes.
But committer @IterableTrucks in the project's dependencies specified to use a branch that is missing the latest commit.
And the last commit contained very very important fixes: vibora-io/vibora#240

It is these fixes that give a drawdown in speed by 30%.

Server: HP Z6 G4 Dual Xeon Gold 5120 (TurboBoost off), Net link 10Gbps, Debian 11, Python 3.9
$ python3 server_vi.py -t 28 (28 workers)

Client (20 CPU, Net 10Gbps):

vibora 0.0.7 with path fixes (commit a24bbf417a84df3a25f7e8901613a1c50ccfe63f):

$ wrk -t20 -c512 -d15 -H 'Connection: keep-alive' http://10.12.0.2:5000/json
Running 15s test @ http://10.12.0.2:5000/json
  20 threads and 512 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   457.11us    1.06ms  70.54ms   99.88%
    Req/Sec    58.38k     4.50k  117.67k    77.70%
  17532500 requests in 15.10s, 2.47GB read
Requests/sec: 1161151.16
Transfer/sec:    167.21MB

vibora 0.0.7 without path fixes (commit f622101bbf9d4fb045b04afcb32221a5c0673ed9):

$ wrk -t20 -c512 -d15 -H 'Connection: keep-alive' http://10.12.0.2:5000/json
Running 15s test @ http://10.12.0.2:5000/json
  20 threads and 512 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   324.76us    1.13ms  84.38ms   99.91%
    Req/Sec    83.45k     4.84k  147.21k    80.59%
  25067382 requests in 15.10s, 3.53GB read
Requests/sec: 1660127.36
Transfer/sec:    239.07MB

I suggest replacing the commit id : f622101bbf9d4fb045b04afcb32221a5c0673ed9 -> a24bbf417a84df3a25f7e8901613a1c50ccfe63f

So it will be fair, because now the vibora framework does not correctly process requests.

@remittor
Copy link
Contributor Author

remittor commented Mar 24, 2023

Results of 20 Round (2021-02-08):

image

This is how can add a Cython + 1 bug into code and increase performance from 241,581 req/sec to 1,019,668 req/sec

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

No branches or pull requests

2 participants