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

setting fasthttp MaxConnsPerHost to be equal to concurrency #18

Merged
merged 3 commits into from
Apr 8, 2016

Conversation

jonoden
Copy link
Contributor

@jonoden jonoden commented Apr 8, 2016

fasthttp has an internal default limit of 512 max connections per host. This causes network errors if you use a concurrency higher than 512. Made a change to set the fasthttp MaxConnsPerHost to be equal to the concurrency configured in the gobench execution.

Before:

$ gobench -c 750 -t 5 -u http:https://openresty/
Dispatching 750 clients
Waiting for results...
Requests:                          4842824 hits
Successful requests:                  5990 hits
Network failed:                    4836833 hits
Bad requests failed (!2xx):              0 hits
Successful requests rate:             1198 hits/sec
Read throughput:                   1435200 bytes/sec
Write throughput:                   105332 bytes/sec
Test time:                               5 sec

After:

$ ./gobench -c 750 -t 5 -u http:https://openresty/
Dispatching 750 clients
Waiting for results...
Requests:                            52296 hits
Successful requests:                 52296 hits
Network failed:                          0 hits
Bad requests failed (!2xx):              0 hits
Successful requests rate:            10459 hits/sec
Read throughput:                  11546956 bytes/sec
Write throughput:                   859345 bytes/sec
Test time:                               5 sec

…passed in. fasthttp has an internal default of 512 which causes network errors if gobench concurrency is set above 512.
@cmpxchg16
Copy link
Owner

Cool :)
Thanks for this update.

@cmpxchg16 cmpxchg16 merged commit 458bdf6 into cmpxchg16:master Apr 8, 2016
@jonoden
Copy link
Contributor Author

jonoden commented Apr 9, 2016

Oops, you might want to revert the error printing, was using it to debug kernel parameter tuning and backend issues. I was going to add a -v parameter that would enabling printing a bunch of errors but I haven't quite finished it yet due to the larger task of benchmarking. :)

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.

None yet

2 participants