VMware – esxtop – troubleshooting VM CPU performance

To display VM only press V (VM only view):

then to expand specific VM press e (expand) then enter the GID number:

As this VM has 3 CPU I can see CPU usage on all of them, RDY, USED and CSTP times.

%RDY is a Key Performance Indicator!  This one defines how much time your virtual machine wanted to execute CPU cycles but could not get access to the physical CPU. It tells you how much time did you spend in a “queue”. I normally expect this value to be better than 5%. In this case we can see that this VM is struggling a bit or it is very busy.

%USED tells you how much time did the virtual machine spend executing CPU cycles on the physical CPU.

%CSTP tells you how much time a virtual machine is waiting for a virtual machine with multiple vCPU to catch up. If this number is higher than 3% you should consider lowering the amount of vCPU in your virtual machine.

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.