-
Tested a hello world actix-web application and a hello world uwebsockets.js example (on a 16 core ubuntu ec2 instance). Actix web uWebSockets.js The benchmarks of uWebsockets claim it's 2.5x faster than actix-web, in reality it's ~5x slower. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Actix-web is a multithreaded server utilizing all 16 CPU cores by default. uWS is a single threaded server utilizing 1 CPU core by default. That's why the graph you refer to display "CPU-time normalized" results. I compiled the latest actix-web using latest Rust and with release optimizations and setting workers to 1 (so that it doesn't utilize 16x the CPU-time compared with uWS). Here is the result run on a MacBook Air M1, with verified CPU-time being the same. actix-web: uWS: |
Beta Was this translation helpful? Give feedback.
Actix-web is a multithreaded server utilizing all 16 CPU cores by default. uWS is a single threaded server utilizing 1 CPU core by default. That's why the graph you refer to display "CPU-time normalized" results.
I compiled the latest actix-web using latest Rust and with release optimizations and setting workers to 1 (so that it doesn't utilize 16x the CPU-time compared with uWS). Here is the result run on a MacBook Air M1, with verified CPU-time being the same.
actix-web:
root@5d057ec32e43:/wrk# ./wrk http://localhost:8080
Running 10s test @ http://localhost:8080
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 102.44us 131.82us 6.87ms 98.93%
Req/Sec 46.95k 2.22k…