Noisy Sockets Benchmarks
Setup
- OS: Debian 12 (Bookworm)
- CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Configuration
By default the linux kernel uses a MTU of 65536 bytes for the loopback interface. This can be changed by running the following command:
sudo ip link set dev lo mtu 1500
HTTP/1.1 Using Host Network Stack (no encryption)
Configuration
go run . server --host-net
go run . benchmark --host-net --server-address=localhost:32000
Results
Total requests: 100000
Total errors: 0
Total duration: 3.59s
Requests per second: 27877.92
Request durations:
Median: 0.00ms
95th: 0.00ms
99th: 1.00ms
99.9th: 3.00ms
Max: 8.00ms
TLS and HTTP/1.1 Using Host Network Stack
Configuration
go run . server --host-net --tls
go run . benchmark --host-net --server-address=localhost:32000 --tls
Results
Total requests: 100000
Total errors: 0
Total duration: 20.37s
Requests per second: 4908.20
Request durations:
Median: 0.00ms
95th: 7.00ms
99th: 23.00ms
99.9th: 71.00ms
Max: 303.00ms
HTTP/1.1 Using Noisy Sockets:
Configuration
go run . server
go run . benchmark
Results
Total requests: 100000
Total errors: 0
Total duration: 36.06s
Requests per second: 2773.35
Request durations:
Median: 1.00ms
95th: 11.00ms
99th: 35.00ms
99.9th: 217.00ms
Max: 635.00ms
HTTP/1.1 Using Noisy Sockets Server and Kernel Module Client
Configuration
sudo wg-quick up testdata/wg0.conf
go run . server
go run . benchmark --host-net --server-address=10.7.0.1:32000
sudo wg-quick down wg0
Results
Total requests: 100000
Total errors: 0
Total duration: 46.31s
Requests per second: 2159.23
Request durations:
Median: 2.00ms
95th: 17.00ms
99th: 42.00ms
99.9th: 58.00ms
Max: 127.00ms