tempesta
tempesta copied to clipboard
Mekhanik evgenii/1196 itog 2
This PR also fixes https://github.com/tempesta-tech/tempesta/issues/1884
The pull request causes performance degradation in comparison with https://github.com/tempesta-tech/tempesta/issues/1940#issuecomment-1811557047
$ taskset --cpu-list 1,2,4,6 h2load -n 1000000 -c 1024 -t 4 https://tempesta-tech.com:8443
starting benchmark...
spawning thread #0: 256 total client(s). 250000 total requests
spawning thread #1: 256 total client(s). 250000 total requests
spawning thread #2: 256 total client(s). 250000 total requests
spawning thread #3: 256 total client(s). 250000 total requests
client could not connect to host
client could not connect to host
client could not connect to host
client could not connect to host
client could not connect to host
client could not connect to host
client could not connect to host
TLS Protocol: TLSv1.2
Cipher: ECDHE-ECDSA-AES256-GCM-SHA384
Server Temp Key: X25519 253 bits
Application protocol: h2
progress: 10% done
progress: 20% done
progress: 30% done
progress: 40% done
progress: 50% done
progress: 60% done
progress: 70% done
progress: 80% done
progress: 90% done
progress: 100% done
finished in 37.30s, 26625.70 req/s, 661.24MB/s
requests: 1000000 total, 993168 started, 993168 done, 993168 succeeded, 6832 failed, 6832 errored, 0 timeout
status codes: 993168 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 24.09GB (25863137721) total, 124.08MB (130105008) headers (space savings 35.15%), 23.92GB (25688290320) data
min max mean sd +/- sd
time for request: 57us 570.88ms 32.13ms 20.62ms 72.02%
time for connect: 168.47ms 371.78ms 324.81ms 28.38ms 79.55%
time to 1st byte: 307.88ms 487.46ms 351.89ms 30.77ms 64.90%
req/s : 0.00 38.67 31.35 5.64 72.56%
My results (i don't any difference between my branch and master): master h2 https 13630.08 14615.26 13845.76 11217.27 11129.61 11235.72 11141.95 10687.86 14145.39 11014.10
1196 h2 https 12633.48 13427.08 14407.07 11162.73 14276.95 11178.03 14418.74 11301.45 14337.11 13711.39
For 10 streams: master h2 12864.57 12600.18 13117.70 13101.78 13175.30 12102.38 13633.15 12972.64 13704.15 12371.05
100 streams program killed by kernel because of OOM
Seems TfwHttpTransIter.frame_head not used anymore, if so, please delete it in this PR.
fix #1196
During testing I saw significant performance degradation:
Tempesta master:
finished in 10.02s, 291577.80 req/s, 243.03MB/s
requests: 2915778 total, 2925278 started, 2915778 done, 2915778 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 2915778 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 2.37GB (2548394172) total, 678.49MB (711449832) headers (space savings 16.44%), 1.66GB (1784456136) data
min max mean sd +/- sd
time for request: 1.47ms 761.00ms 31.21ms 23.16ms 97.81%
time for connect: 16.58ms 30.41ms 22.73ms 5.47ms 56.00%
time to 1st byte: 19.64ms 40.40ms 31.72ms 5.58ms 68.00%
req/s : 2396.95 3484.11 2915.43 228.62 72.00%
finished in 10.04s, 283811.20 req/s, 236.20MB/s
requests: 2838112 total, 2847612 started, 2838112 done, 2838112 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 2838112 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 2.31GB (2476699360) total, 656.78MB (688684600) headers (space savings 16.51%), 1.62GB (1736924544) data
min max mean sd +/- sd
time for request: 1.51ms 328.46ms 32.18ms 11.64ms 81.56%
time for connect: 12.44ms 31.16ms 23.20ms 6.66ms 62.00%
time to 1st byte: 19.81ms 44.18ms 31.82ms 7.55ms 67.00%
req/s : 2167.13 3711.29 2835.35 364.36 71.00%
Current PR:
finished in 10.02s, 205291.80 req/s, 170.95MB/s
requests: 2052918 total, 2062418 started, 2052918 done, 2052918 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 2052974 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 1.67GB (1792575890) total, 475.47MB (498569357) headers (space savings 16.50%), 1.17GB (1256387697) data
min max mean sd +/- sd
time for request: 4.17ms 198.62ms 46.10ms 11.33ms 91.93%
time for connect: 16.91ms 37.29ms 23.34ms 6.05ms 78.00%
time to 1st byte: 28.28ms 47.01ms 40.01ms 5.65ms 65.00%
req/s : 844.51 2278.57 2052.49 321.17 90.00%
finished in 10.02s, 203146.80 req/s, 169.26MB/s
requests: 2031468 total, 2040968 started, 2031468 done, 2031468 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 2031532 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 1.65GB (1774820106) total, 470.92MB (493796125) headers (space savings 16.49%), 1.16GB (1243263898) data
min max mean sd +/- sd
time for request: 7.31ms 240.43ms 46.30ms 10.77ms 92.64%
time for connect: 7.60ms 36.03ms 21.29ms 5.47ms 89.00%
time to 1st byte: 31.14ms 46.89ms 40.70ms 2.64ms 77.00%
req/s : 702.56 2190.33 2031.15 287.86 92.00%
Default config + enabled caching. h2load -c100 -m95 -t2 -D10 https://ubuntu