john@mqtt1604testb:~$ sysbench --test=cpu run
sysbench 0.4.12: multi-threaded system evaluation benchmark Running the test with following options: Number of threads: 1 Doing CPU performance benchmark Threads started! Done. Maximum prime number checked in CPU test: 10000 Test execution summary: total time: 524.5674s total number of events: 10000 total time taken by event execution: 524.0836 per-request statistics: min: 6.48ms avg: 52.41ms max: 613.14ms approx. 95 percentile: 125.51ms Threads fairness: events (avg/stddev): 10000.0000/0.00 execution time (avg/stddev): 524.0836/0.00
john@mqtt1604C:~/mosBridge$ sysbench --test=cpu run
sysbench 0.4.12: multi-threaded system evaluation benchmark Running the test with following options: Number of threads: 1 Doing CPU performance benchmark Threads started! Done. Maximum prime number checked in CPU test: 10000 Test execution summary: total time: 12.8076s total number of events: 10000 total time taken by event execution: 12.8054 per-request statistics: min: 1.20ms avg: 1.28ms max: 2.52ms approx. 95 percentile: 1.37ms Threads fairness: events (avg/stddev): 10000.0000/0.00 execution time (avg/stddev): 12.8054/0.00
Note: Jan 5, 2019 healthy $5/month droplet performance (verified on 6 droplets):
execution time (avg/stddev): 15.3699/0.00
sysbench 1.0.18 (using system LuaJIT 2.1.0-beta3) Running the test with following options: Number of threads: 1 Initializing random number generator from current time Prime numbers limit: 10000 Initializing worker threads... Threads started! CPU speed: events per second: 1672.13 General statistics: total time: 10.0001s total number of events: 16723 Latency (ms): min: 0.58 avg: 0.60 max: 3.55 95th percentile: 0.62 sum: 9994.08 Threads fairness: events (avg/stddev): 16723.0000/0.00 execution time (avg/stddev): 9.9941/0.00
ubuntu@ip-172-26-9-190:~$ sysbench --test=cpu run WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options. sysbench 1.0.18 (using system LuaJIT 2.1.0-beta3) Running the test with following options: Number of threads: 1 Initializing random number generator from current time Prime numbers limit: 10000 Initializing worker threads... Threads started! CPU speed: events per second: 767.07 General statistics: total time: 10.0008s total number of events: 7673 Latency (ms): min: 1.22 avg: 1.30 max: 1.63 95th percentile: 1.32 sum: 9986.47 Threads fairness: events (avg/stddev): 7673.0000/0.00 execution time (avg/stddev): 9.9865/0.00
./sshToServer.sh john all "top -bn1 | grep 'Cpu(s)' | sed 's/.*, *\([0-9.]*\)%* id.*/\1/' | awk '{print 100 - \$1}'"
it seems more accurate (or at least lines up better with DO usage stats) if a bit slower to catch the 2nd iteration of top instead of the first:
./sshToServer.sh john all "top -bn2 | grep 'Cpu(s)' | sed 's/.*, *\([0-9.]*\)%* id.*/\1/' | awk '{print 100 - \$1}' | tail -n 1"