tonarino / actor

A minimalist actor framework aiming for high performance and simplicity.
MIT License
40 stars 6 forks source link

Enhanced benchmarks #43

Closed mcginty closed 3 years ago

mcginty commented 3 years ago

Moved to testing a circular chain of various lengths sending a single message 1000 iterations.

strohel commented 3 years ago

Do I understand it correctly that all circular benches (2 actors, native CPU count, ...) are comparable with each other as they do the same amount of work (actor -> actor message transmissions)?

Here are my results, what are yours? I get some run-to-run variance, but it could be my laptop CPU freq scaling, thermal throttling, and noise from other tasks. 4-core (8-thread) i7-8550U here.

console output ``` strohel@mat480s ~/projekty/actor $ cargo bench Finished bench [optimized] target(s) in 0.06s Running target/release/deps/actor-b17d0239ac57a0c6 running 1 test test tests::it_works ... ignored test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out Running target/release/deps/benches-b3a9d7f7b3637ab3 WARNING: HTML report generation will become a non-default optional feature in Criterion.rs 0.4.0. This feature is being moved to cargo-criterion (https://github.com/bheisler/cargo-criterion) and will be optional in a future version of Criterion.rs. To silence this warning, either switch to cargo-criterion or enable the 'html_reports' feature in your Cargo.toml. Gnuplot not found, using plotters backend spawn/spawn 1 time: [25.205 us 25.341 us 25.489 us] thrpt: [39.233 Kelem/s 39.461 Kelem/s 39.674 Kelem/s] change: time: [-2.7506% -2.0402% -1.3399%] (p = 0.00 < 0.05) thrpt: [+1.3581% +2.0827% +2.8284%] Performance has improved. Found 12 outliers among 100 measurements (12.00%) 10 (10.00%) high mild 2 (2.00%) high severe spawn/spawn 10 time: [230.73 us 237.65 us 243.58 us] thrpt: [4.1054 Kelem/s 4.2078 Kelem/s 4.3341 Kelem/s] change: time: [-7.0461% -4.4563% -1.6315%] (p = 0.00 < 0.05) thrpt: [+1.6585% +4.6642% +7.5803%] Performance has improved. Found 3 outliers among 100 measurements (3.00%) 3 (3.00%) high mild spawn/spawn 50 time: [1.8573 ms 1.8642 ms 1.8712 ms] thrpt: [534.41 elem/s 536.42 elem/s 538.40 elem/s] change: time: [-1.2995% -0.6633% +0.0028%] (p = 0.05 > 0.05) thrpt: [-0.0028% +0.6678% +1.3166%] No change in performance detected. Found 2 outliers among 100 measurements (2.00%) 1 (1.00%) high mild 1 (1.00%) high severe Benchmarking circular/circular (2 actors): Warming up for 3.0000 s Warning: Unable to complete 100 samples in 10.0s. You may wish to increase target time to 19.2s, enable flat sampling, or reduce sample count to 50. circular/circular (2 actors) time: [3.6667 ms 3.7914 ms 3.9070 ms] thrpt: [255.95 Kelem/s 263.75 Kelem/s 272.72 Kelem/s] change: time: [-9.1358% -3.3462% +2.8927%] (p = 0.27 > 0.05) thrpt: [-2.8114% +3.4620% +10.054%] No change in performance detected. Found 8 outliers among 100 measurements (8.00%) 8 (8.00%) low mild Benchmarking circular/circular (native CPU count - 1): Warming up for 3.0000 s Warning: Unable to complete 100 samples in 10.0s. You may wish to increase target time to 18.4s, enable flat sampling, or reduce sample count to 50. circular/circular (native CPU count - 1) time: [4.3961 ms 4.4803 ms 4.5465 ms] thrpt: [219.95 Kelem/s 223.20 Kelem/s 227.47 Kelem/s] change: time: [-7.4521% -4.1923% -0.9252%] (p = 0.02 < 0.05) thrpt: [+0.9338% +4.3757% +8.0522%] Change within noise threshold. circular/circular (native CPU count) time: [21.564 ms 22.264 ms 22.972 ms] thrpt: [43.531 Kelem/s 44.915 Kelem/s 46.373 Kelem/s] change: time: [+8.0294% +13.388% +18.642%] (p = 0.00 < 0.05) thrpt: [-15.713% -11.807% -7.4326%] Performance has regressed. circular/circular (50 actors) time: [22.878 ms 24.291 ms 25.735 ms] thrpt: [38.858 Kelem/s 41.168 Kelem/s 43.711 Kelem/s] change: time: [+7.1120% +15.253% +24.165%] (p = 0.00 < 0.05) thrpt: [-19.462% -13.235% -6.6398%] Performance has regressed. Found 1 outliers among 100 measurements (1.00%) 1 (1.00%) high mild ```
mcginty commented 3 years ago

I'm going to merge this as-is, since I think simply sending a single message around in a loop particle-accelerator-style is a reasonable metric to track, but we need more tests that reflect more common uses :).