Skip to content

Commit 2ae1e01

Browse files
committed
version 1.0.9, update timings
1 parent d98e82c commit 2ae1e01

File tree

2 files changed

+56
-55
lines changed

2 files changed

+56
-55
lines changed

README.md

Lines changed: 54 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -40,48 +40,49 @@ or the service loader will automatically find it when the jar is placed on the c
4040

4141
## performance
4242

43-
This version performs more than **3x** better than the JDK version when tested using the [Tech Empower Benchmarks](https://github.com/TechEmpower/FrameworkBenchmarks/tree/master/frameworks/Java/httpserver) on an identical hardware/work setup with the same JDK 21 version.<sup>1</sup> Early results with JDK-24 and the improved virtual threads scheduling shows even greater performance improvement.
43+
** updated 11/22/2024: retested using JDK 23. The results for the JDK version dropped dramatically because I was able to resolve the source of the errors (incorrect network configuration) - and now the robaho version is more than 10x faster.
4444

45-
The frameworks were also tested using [go-wrk](https://github.com/robaho/go-wrk)<sup>2</sup>
45+
This version performs more than **10x** better than the JDK version when tested using the [Tech Empower Benchmarks](https://github.com/TechEmpower/FrameworkBenchmarks/tree/master/frameworks/Java/httpserver) on an identical hardware/work setup with the same JDK 23 version.<sup>1</sup>
4646

47-
<sup>1</sup>_Currently working on submitting the robaho version to the Tech Empower benchmarks project for 3-party confirmation._<br>
48-
<sup>2</sup>_`go-wrk` does not use http pipelining so, the large number of connections is the limiting factor. `go-wrk` was tested using the Tech Empower server process._
47+
The frameworks were also tested using [go-wrk](https://github.com/tsliwowicz/go-wrk)<sup>2</sup>
4948

49+
<sup>1</sup>_The robaho version has been submitted to the Tech Empower benchmarks project for 3-party confirmation._<br>
50+
<sup>2</sup>_`go-wrk` does not use http pipelining so, the large number of connections is the limiting factor. `go-wrk` was tested using the Tech Empower server process._
5051

5152
**robaho tech empower**
5253
```
5354
robertengels@macmini go-wrk % wrk -H 'Host: imac' -H 'Accept: text/plain,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' -H 'Connection: keep-alive' --latency -d 60 -c 64 --timeout 8 -t 2 http://imac:8080/plaintext -s ~/pipeline.lua -- 16
5455
Running 1m test @ http://imac:8080/plaintext
5556
2 threads and 64 connections
5657
Thread Stats Avg Stdev Max +/- Stdev
57-
Latency 658.83us 665.90us 19.01ms 16.14%
58-
Req/Sec 294.57k 28.40k 329.21k 85.67%
58+
Latency 1.20ms 9.22ms 404.09ms 85.37%
59+
Req/Sec 348.78k 33.28k 415.03k 71.46%
5960
Latency Distribution
60-
50% 0.00us
61-
75% 0.00us
61+
50% 0.98ms
62+
75% 1.43ms
6263
90% 0.00us
6364
99% 0.00us
64-
35179762 requests in 1.00m, 4.65GB read
65-
Requests/sec: 586136.93
66-
Transfer/sec: 79.38MB
65+
41709198 requests in 1.00m, 5.52GB read
66+
Requests/sec: 693983.49
67+
Transfer/sec: 93.98MB
6768
```
6869

69-
**jdk 21 tech empower**
70+
**jdk 23 tech empower**
7071
```
7172
robertengels@macmini go-wrk % wrk -H 'Host: imac' -H 'Accept: text/plain,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' -H 'Connection: keep-alive' --latency -d 60 -c 64 --timeout 8 -t 2 http://imac:8080/plaintext -s ~/pipeline.lua -- 16
7273
Running 1m test @ http://imac:8080/plaintext
7374
2 threads and 64 connections
7475
Thread Stats Avg Stdev Max +/- Stdev
75-
Latency 3.10ms 6.16ms 407.66ms 65.94%
76-
Req/Sec 86.84k 10.05k 119.40k 71.00%
76+
Latency 2.91ms 12.01ms 405.70ms 63.71%
77+
Req/Sec 114.30k 18.07k 146.91k 87.10%
7778
Latency Distribution
78-
50% 5.17ms
79+
50% 4.06ms
7980
75% 0.00us
8081
90% 0.00us
8182
99% 0.00us
82-
10371476 requests in 1.00m, 1.30GB read
83-
Requests/sec: 172781.10
84-
Transfer/sec: 22.24MB
83+
13669748 requests in 1.00m, 1.72GB read
84+
Requests/sec: 227446.87
85+
Transfer/sec: 29.28MB
8586
8687
```
8788

@@ -90,48 +91,48 @@ Transfer/sec: 22.24MB
9091
robertengels@macmini go-wrk % ./go-wrk -c=1024 -d=30 -T=100000 http://imac:8080/plaintext
9192
Running 30s test @ http://imac:8080/plaintext
9293
1024 goroutine(s) running concurrently
93-
3194361 requests in 30.105607793s, 380.80MB read
94-
Requests/sec: 106105.18
95-
Transfer/sec: 12.65MB
96-
Overall Requests/sec: 104132.86
97-
Overall Transfer/sec: 12.41MB
98-
Fastest Request: 104µs
99-
Avg Req Time: 9.65ms
100-
Slowest Request: 2.414591s
94+
3252278 requests in 30.118280233s, 387.70MB read
95+
Requests/sec: 107983.52
96+
Transfer/sec: 12.87MB
97+
Overall Requests/sec: 105891.53
98+
Overall Transfer/sec: 12.62MB
99+
Fastest Request: 83µs
100+
Avg Req Time: 9.482ms
101+
Slowest Request: 1.415359s
101102
Number of Errors: 0
102-
10%: 2.554ms
103-
50%: 3.123ms
104-
75%: 3.29ms
105-
99%: 3.395ms
106-
99.9%: 3.399ms
107-
99.9999%: 3.399ms
108-
99.99999%: 3.399ms
109-
stddev: 36.233m
103+
10%: 286µs
104+
50%: 1.018ms
105+
75%: 1.272ms
106+
99%: 1.436ms
107+
99.9%: 1.441ms
108+
99.9999%: 1.442ms
109+
99.99999%: 1.442ms
110+
stddev: 35.998ms
110111
```
111112

112-
**jdk 21 go-wrk**<sup>3</sup>
113+
**jdk 23 go-wrk**<sup>3</sup>
113114
```
114115
robertengels@macmini go-wrk % ./go-wrk -c=1024 -d=30 -T=100000 http://imac:8080/plaintext
115116
Running 30s test @ http://imac:8080/plaintext
116117
1024 goroutine(s) running concurrently
117-
2046367 requests in 15.233001979s, 230.28MB read
118-
Requests/sec: 134337.74
119-
Transfer/sec: 15.12MB
120-
Overall Requests/sec: 59207.56
121-
Overall Transfer/sec: 6.66MB
122-
Fastest Request: 317µs
123-
Avg Req Time: 7.622ms
124-
Slowest Request: 20.820991s
125-
Number of Errors: 651
126-
Error Counts: operation timed out=651
127-
10%: 1.007ms
128-
50%: 1.321ms
129-
75%: 1.422ms
130-
99%: 1.498ms
131-
99.9%: 1.501ms
132-
99.9999%: 1.501ms
133-
99.99999%: 1.501ms
134-
stddev: 207.565ms
118+
264198 requests in 30.047154195s, 29.73MB read
119+
Requests/sec: 8792.78
120+
Transfer/sec: 1013.23KB
121+
Overall Requests/sec: 8595.99
122+
Overall Transfer/sec: 990.55KB
123+
Fastest Request: 408µs
124+
Avg Req Time: 116.459ms
125+
Slowest Request: 1.930495s
126+
Number of Errors: 0
127+
10%: 1.166ms
128+
50%: 1.595ms
129+
75%: 1.725ms
130+
99%: 1.827ms
131+
99.9%: 1.83ms
132+
99.9999%: 1.83ms
133+
99.99999%: 1.83ms
134+
stddev: 174.373ms
135+
135136
```
136137
<sup>3</sup>_Note the failures/timeouts when using the JDK version which affects the overall statistics._
137138

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repositories {
1010

1111
java {
1212
toolchain {
13-
languageVersion = JavaLanguageVersion.of(21)
13+
languageVersion = JavaLanguageVersion.of(23)
1414
}
1515
withSourcesJar()
1616
withJavadocJar()
@@ -149,7 +149,7 @@ publishing {
149149
maven(MavenPublication) {
150150
groupId = 'io.github.robaho'
151151
artifactId = 'httpserver'
152-
version = "1.0.8"
152+
version = "1.0.9"
153153

154154
from components.java
155155

0 commit comments

Comments
 (0)