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

use "wrk" tool to test it for prologue. #27

Closed
lihf8515 opened this issue Jul 1, 2020 · 2 comments
Closed

use "wrk" tool to test it for prologue. #27

lihf8515 opened this issue Jul 1, 2020 · 2 comments

Comments

@lihf8515
Copy link

lihf8515 commented Jul 1, 2020

This is a wrk test of httpbeast hello word:wrk -c1000 -d10s http://192.12.1.22:8080/

Running 10s test @ http://192.12.1.22:8080/
2 threads and 1000 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 8.01ms 12.16ms 215.10ms 99.05%
Req/Sec 71.46k 5.27k 76.81k 81.31%
1407514 requests in 10.05s, 154.37MB read
Non-2xx or 3xx responses: 1407514
Requests/sec: 140036.79
Transfer/sec: 15.36MB

This is a wrk test of prologue hello word.:wrk -c1000 -d10s http://192.12.1.22:8080/

Running 10s test @ http://192.12.1.22:8080/
2 threads and 1000 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 34.58ms 0.96ms 39.56ms 78.50%
Req/Sec 14.51k 1.18k 16.28k 85.35%
286065 requests in 10.02s, 43.65MB read
Requests/sec: 28538.37
Transfer/sec: 4.35MB

Why is the difference so big?which place cause it so low, suggest to optimize.

@lihf8515 lihf8515 changed the title use "wrk" tool to test it for pressure. use "wrk" tool to test it for prologue. Jul 1, 2020
@ringabout
Copy link
Member

I haven't used valgrind to profile it.
But I guess there may exists some aspects which caused its slowness:

  1. httpbeast uses nil HttpHeaders default, Prologue uses empty HttpHeaders default.
  2. Prologue uses middlewares which increases overhead.
  3. Prologue parses query parameters, form parameters and so on.
  4. It has startup, shutdown event, static file, to check whether exist.
  5. Prologue uses logging to print msgs.
  6. Request and Response encapsulation increase overhead.
    Also lot of implementation defects will make it slow. I will improve its speed when I have free time.

@lihf8515
Copy link
Author

lihf8515 commented Jul 1, 2020 via email

@lihf8515 lihf8515 closed this as completed Jul 1, 2020
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