Pi vs UDOO quick CPU performance test

First install the software

apt-get install sysbench

then run on PI:

 sysbench --test=cpu --cpu-max-prime=2000 run

on UDOO:

 sysbench --test=cpu --num-threads=4 --cpu-max-prime=2000 run

UDOO output:

Maximum prime number checked in CPU test: 2000
Test execution summary:
 total time: 20.8079s
 total number of events: 10000
 total time taken by event execution: 166.2889
 per-request statistics:
 min: 8.18ms
 avg: 16.63ms
 max: 90.20ms
 approx. 95 percentile: 28.23ms
Threads fairness:
 events (avg/stddev): 1250.0000/6.71
 execution time (avg/stddev): 20.7861/0.03

PI output:

Maximum prime number checked in CPU test: 2000

Test execution summary:
total time: 48.0722s
total number of events: 10000
total time taken by event execution: 192.0741
per-request statistics:
min: 4.68ms
avg: 19.21ms
max: 71.20ms
approx. 95 percentile: 44.05ms

Threads fairness:
events (avg/stddev): 2500.0000/0.71
execution time (avg/stddev): 48.0185/0.02

UDOO – Debian – nginx – performance tuning

This is an update to my previous post: Optimizing Raspberry Pi performance

Unlike Raspberry Pi – UDOO board has quad core CPU. We can verify that by running:

grep ^processor /proc/cpuinfo | wc -l

So i’ve adjusted the /etc/nginx/nginx.conf accordingly:

# One worker per CPU-core.
worker_processes  4;

events {
    worker_connections  8096;
    multi_accept        on;
    use                 epoll;
}

 

 

 

 

Optimizing Raspberry Pi performance

CPU

The best way to overclock Raspberry Pi it is with the raspi-config tool

raspi-config

I go for the Modest option:

 

Nginx

Modify nginx.con (/etc/nginx/nginx.conf)

We only have one CPU thread…

worker_processes  1;

In the http { section add the following:

# Optimize memory
open_file_cache max=1000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
sendfile        on;
tcp_nopush     on;
server_names_hash_bucket_size 128;
keepalive_timeout  65;
# Enable website compression - it takes a lot of CPU
# If you are running low on CPU disable the Zip part.
gzip  on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript text/x-js;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";

Also it is usefull to add:

#Hide Nginx version number
 server_tokens off;

 

 MySQL

Download and run this script: MySQL Tuner Perl script

perl mysqltuner.pl

then go to /etc/mysql/ and edit my.cnf accordingly.