nuald / simple-web-benchmark

A simple web benchmark of C++, Crystal, Go, Java, Node.js, PHP, Python, Rust and Scala.
The Unlicense
37 stars 9 forks source link

Rerun benchmark for rust/rocket #14

Closed kpp closed 6 years ago

kpp commented 6 years ago

You have merged my #13 so would you be so kind to rerun benchmarks to see it in Preliminary Results please

nuald commented 6 years ago

Done. Please let me notice that I had to tweak the workers number - without it (or with the low value like 8) it didn't work (at least in macOS). I guess the additional investigation is required, but the preliminary results are there.

P. S. I think WSL bad results are due to the high number of workers. Unfortunately, I couldn't find any relevant information about how it works exactly - based on the sources, looks like the number of workers is just a number of threads started, but I'm not sure. That's not in line with the other samples, and I'd like to see the multi-processes solution (like with rust_hyper), but it's up to you (I may eventually implement it, but not now).

kpp commented 6 years ago

By default the number of workers is set to proc * 2: let default_workers = (num_cpus::get() * 2) as u16;.

Also you may configure the app not via Rocket.toml but with env variables: ROCKET_ADDRESS, ROCKET_PORT, ROCKET_WORKERS and ROCKET_LOG

nuald commented 6 years ago

Opened #19 to discuss it further. Please weigh in, I guess you have more experience regarding Rust/Rocket to deal with the problem.