Conversation
- build and use fortio in perf/standalone scripts - (win) fix for having more connections than requested
Also changing threshold for sleep time histogram to 5%
Now getting exactly the expected number of sockets But performance is still significantly lower than wrk
|
this fixes 2 entries from #453 |
|
this version now uses the exact/expected number of sockets it still uses more cpu than wrk but it can now trigger 60k qps (up from 40 but still lower than wrk's 100k qps) out of echosrv. the profile isn't clear Probably some locking is getting in the way (I tried to avoid all locking by having separate objects in each goroutine but the http client still seems to shares and lock things) |
|
With #470 it's now very close to wrk |
| url, | ||
| req, | ||
| &http.Client{ | ||
| Timeout: 3 * time.Second, |
There was a problem hiding this comment.
curious: any special reason for 3s timeouts ?
There was a problem hiding this comment.
it means (I think) the max duration will be 3000ms before giving up - given we're expecting data in the single digit ms range most of the time, it seemed enough but I don't really have a good reason - probably should make it configurable or not set it
| if useQPS { | ||
| percentNegative := 100. * float64(sleepTime.hdata[0]) / float64(sleepTime.Count) | ||
| if percentNegative > 3 { | ||
| if percentNegative > 5 { |
There was a problem hiding this comment.
worth documenting choice of 5 here?
There was a problem hiding this comment.
I'll add a comment, thx, I think it's somewhat arbitrary - it's how often we are falling behind for the target qps - 5% is in the noise (actually maybe 10) - the only effect is more verbose debugging and the warning
|
Jenkins job istio/presubmit passed |
And misc comment/leftover from #460 etc
* fortio update - build and use fortio in perf/standalone scripts - fix for having more connections than requested * Updating sample to test using echosrv (slightly lower latency) Also changing threshold for sleep time histogram to 5% * Adding -gomaxprocs flag * One client per goroutine Now getting exactly the expected number of sockets But performance is still significantly lower than wrk * Adding profiler option * Homegrown http client On my Mac: Old net/http : 19.7k qps with 2 threads (-http -1) New -http 1 : 30.5k ops with 2 threads And 1/8th of the user cpu Interface to select between the 2 clients * More comments and backtrack test * http_test was missing from bazel ran gazelle * Added benchmark and fix folding bugs Folding is 4x faster than built in, 1/3rd of allocs Search is 10x faster, no alloc instead of a lot ``` BenchmarkASCIIFoldNormalToLower-8 3000000 416 ns/op 96 B/op 3 allocs/op BenchmarkASCIIFoldCustomToLowerMap-8 5000000 371 ns/op 96 B/op 3 allocs/op BenchmarkASCIIToUpper-8 20000000 104 ns/op 32 B/op 1 allocs/op BenchmarkFoldFind0-8 200000 7621 ns/op 2112 B/op 3 allocs/op BenchmarkFoldFind-8 2000000 669 ns/op 0 B/op 0 allocs/op ``` * chunked decoding unit test for parsing, reads the first chunk * fasthttp client wrapper (-http 3) - added some doc in WORKSPACE about wtool - initial support for fasthttp * Make linter happy though I might drop fasthttp as it’s not faster (but it’s more complete) and adds a lot of dependencies * Split connect out * Fixing merge error * adding fortio Logger * Fixing bazel build And misc comment/leftover from #460 etc * Shorter logger names * Switched to new logging * Eradicate Verbosity leftovers * Added -logprefix and -logcaller; Refactor start on http.go also fixed a couple of calls missing % codes * Minor edits, saving to GitHub wip * Woot http1.1 works now Still unwieldy but working ! * Some profiler optimizations * More profiler opt * Make lint happy by making checking connection closed header a flag * Dropping fasthttp dependency * Moved 3 changes to #495 * Minor: use version in echoers, use 3 digits * Code review updates (thx doug!) + serious chunked bug fix Wasn’t working with last chunk (0\r\n\r\n) being in a separate frame * Code review comment thx doug!
…#460) * Implement validation using descriptors for the metrics aspect. * Add back in default for latency expr Former-commit-id: f229ffdf83e68abaf35666e365988e1ebced060f
* fortio update - build and use fortio in perf/standalone scripts - fix for having more connections than requested * Updating sample to test using echosrv (slightly lower latency) Also changing threshold for sleep time histogram to 5% * Adding -gomaxprocs flag * One client per goroutine Now getting exactly the expected number of sockets * Adding profiler option * http_test was missing from bazel ran gazelle Former-commit-id: 01fadb6
* fortio update - build and use fortio in perf/standalone scripts - fix for having more connections than requested * Updating sample to test using echosrv (slightly lower latency) Also changing threshold for sleep time histogram to 5% * Adding -gomaxprocs flag * One client per goroutine Now getting exactly the expected number of sockets But performance is still significantly lower than wrk * Adding profiler option * Homegrown http client On my Mac: Old net/http : 19.7k qps with 2 threads (-http -1) New -http 1 : 30.5k ops with 2 threads And 1/8th of the user cpu Interface to select between the 2 clients * More comments and backtrack test * http_test was missing from bazel ran gazelle * Added benchmark and fix folding bugs Folding is 4x faster than built in, 1/3rd of allocs Search is 10x faster, no alloc instead of a lot ``` BenchmarkASCIIFoldNormalToLower-8 3000000 416 ns/op 96 B/op 3 allocs/op BenchmarkASCIIFoldCustomToLowerMap-8 5000000 371 ns/op 96 B/op 3 allocs/op BenchmarkASCIIToUpper-8 20000000 104 ns/op 32 B/op 1 allocs/op BenchmarkFoldFind0-8 200000 7621 ns/op 2112 B/op 3 allocs/op BenchmarkFoldFind-8 2000000 669 ns/op 0 B/op 0 allocs/op ``` * chunked decoding unit test for parsing, reads the first chunk * fasthttp client wrapper (-http 3) - added some doc in WORKSPACE about wtool - initial support for fasthttp * Make linter happy though I might drop fasthttp as it’s not faster (but it’s more complete) and adds a lot of dependencies * Split connect out * Fixing merge error * adding fortio Logger * Fixing bazel build And misc comment/leftover from #460 etc * Shorter logger names * Switched to new logging * Eradicate Verbosity leftovers * Added -logprefix and -logcaller; Refactor start on http.go also fixed a couple of calls missing % codes * Minor edits, saving to GitHub wip * Woot http1.1 works now Still unwieldy but working ! * Some profiler optimizations * More profiler opt * Make lint happy by making checking connection closed header a flag * Dropping fasthttp dependency * Moved 3 changes to #495 * Minor: use version in echoers, use 3 digits * Code review updates (thx doug!) + serious chunked bug fix Wasn’t working with last chunk (0\r\n\r\n) being in a separate frame * Code review comment thx doug! Former-commit-id: e09dcaf
* Implement validation using descriptors for the metrics aspect. * Add back in default for latency expr Former-commit-id: 28b5ce56493e385b065f1e7c50d7cab335bae37c
* fortio update - build and use fortio in perf/standalone scripts - fix for having more connections than requested * Updating sample to test using echosrv (slightly lower latency) Also changing threshold for sleep time histogram to 5% * Adding -gomaxprocs flag * One client per goroutine Now getting exactly the expected number of sockets * Adding profiler option * http_test was missing from bazel ran gazelle Former-commit-id: 01fadb6
* fortio update - build and use fortio in perf/standalone scripts - fix for having more connections than requested * Updating sample to test using echosrv (slightly lower latency) Also changing threshold for sleep time histogram to 5% * Adding -gomaxprocs flag * One client per goroutine Now getting exactly the expected number of sockets But performance is still significantly lower than wrk * Adding profiler option * Homegrown http client On my Mac: Old net/http : 19.7k qps with 2 threads (-http -1) New -http 1 : 30.5k ops with 2 threads And 1/8th of the user cpu Interface to select between the 2 clients * More comments and backtrack test * http_test was missing from bazel ran gazelle * Added benchmark and fix folding bugs Folding is 4x faster than built in, 1/3rd of allocs Search is 10x faster, no alloc instead of a lot ``` BenchmarkASCIIFoldNormalToLower-8 3000000 416 ns/op 96 B/op 3 allocs/op BenchmarkASCIIFoldCustomToLowerMap-8 5000000 371 ns/op 96 B/op 3 allocs/op BenchmarkASCIIToUpper-8 20000000 104 ns/op 32 B/op 1 allocs/op BenchmarkFoldFind0-8 200000 7621 ns/op 2112 B/op 3 allocs/op BenchmarkFoldFind-8 2000000 669 ns/op 0 B/op 0 allocs/op ``` * chunked decoding unit test for parsing, reads the first chunk * fasthttp client wrapper (-http 3) - added some doc in WORKSPACE about wtool - initial support for fasthttp * Make linter happy though I might drop fasthttp as it’s not faster (but it’s more complete) and adds a lot of dependencies * Split connect out * Fixing merge error * adding fortio Logger * Fixing bazel build And misc comment/leftover from istio#460 etc * Shorter logger names * Switched to new logging * Eradicate Verbosity leftovers * Added -logprefix and -logcaller; Refactor start on http.go also fixed a couple of calls missing % codes * Minor edits, saving to GitHub wip * Woot http1.1 works now Still unwieldy but working ! * Some profiler optimizations * More profiler opt * Make lint happy by making checking connection closed header a flag * Dropping fasthttp dependency * Moved 3 changes to istio#495 * Minor: use version in echoers, use 3 digits * Code review updates (thx doug!) + serious chunked bug fix Wasn’t working with last chunk (0\r\n\r\n) being in a separate frame * Code review comment thx doug! Former-commit-id: e09dcaf
* Default to POD_NAMESPACE for -n flag * Fix bad merge
* fortio update - build and use fortio in perf/standalone scripts - fix for having more connections than requested * Updating sample to test using echosrv (slightly lower latency) Also changing threshold for sleep time histogram to 5% * Adding -gomaxprocs flag * One client per goroutine Now getting exactly the expected number of sockets * Adding profiler option * http_test was missing from bazel ran gazelle Former-commit-id: 01fadb6
* fortio update - build and use fortio in perf/standalone scripts - fix for having more connections than requested * Updating sample to test using echosrv (slightly lower latency) Also changing threshold for sleep time histogram to 5% * Adding -gomaxprocs flag * One client per goroutine Now getting exactly the expected number of sockets But performance is still significantly lower than wrk * Adding profiler option * Homegrown http client On my Mac: Old net/http : 19.7k qps with 2 threads (-http -1) New -http 1 : 30.5k ops with 2 threads And 1/8th of the user cpu Interface to select between the 2 clients * More comments and backtrack test * http_test was missing from bazel ran gazelle * Added benchmark and fix folding bugs Folding is 4x faster than built in, 1/3rd of allocs Search is 10x faster, no alloc instead of a lot ``` BenchmarkASCIIFoldNormalToLower-8 3000000 416 ns/op 96 B/op 3 allocs/op BenchmarkASCIIFoldCustomToLowerMap-8 5000000 371 ns/op 96 B/op 3 allocs/op BenchmarkASCIIToUpper-8 20000000 104 ns/op 32 B/op 1 allocs/op BenchmarkFoldFind0-8 200000 7621 ns/op 2112 B/op 3 allocs/op BenchmarkFoldFind-8 2000000 669 ns/op 0 B/op 0 allocs/op ``` * chunked decoding unit test for parsing, reads the first chunk * fasthttp client wrapper (-http 3) - added some doc in WORKSPACE about wtool - initial support for fasthttp * Make linter happy though I might drop fasthttp as it’s not faster (but it’s more complete) and adds a lot of dependencies * Split connect out * Fixing merge error * adding fortio Logger * Fixing bazel build And misc comment/leftover from #460 etc * Shorter logger names * Switched to new logging * Eradicate Verbosity leftovers * Added -logprefix and -logcaller; Refactor start on http.go also fixed a couple of calls missing % codes * Minor edits, saving to GitHub wip * Woot http1.1 works now Still unwieldy but working ! * Some profiler optimizations * More profiler opt * Make lint happy by making checking connection closed header a flag * Dropping fasthttp dependency * Moved 3 changes to #495 * Minor: use version in echoers, use 3 digits * Code review updates (thx doug!) + serious chunked bug fix Wasn’t working with last chunk (0\r\n\r\n) being in a separate frame * Code review comment thx doug! Former-commit-id: e09dcaf
* Update global dictionary for new attributes. * Move new attributes to the bottom of the file for backward compatible.
Co-authored-by: maistra-bot <null>
…ter-merge_upstream_istio_master-6253864e Automator: merge upstream changes to openshift-service-mesh/istio@master
-compressionflag