Raspberry Pi 2 VS Raspberry Pi 3 on Slackware ARM
Let’s get ready to rumble: a battle of two Slackware ARM powered webservers.
Hosting your WordPress installation on a RPi2 can be a challenge on multiple levels. Apart from stability issues, my biggest concern is always subpar PHP performance and additional overhead with TLS connections. To determine the potential gain of upgrading my hosting platform to a RPi3, I’ve done a few tests with a MicroSD card I recently retired due to data corruption.
I’ve focused on tasks relating to performance with PHP, MySQL and OpenSSL. When running WordPress, those services are my main bottlenecks performance wise. I’ve not used any third party benchmark tools.
All tests were done in an isolated local environment .
LAMP setup:
Slackware 14.2 (current) Linux 4.1.18-v7+ Apache/2.4.18 PHP 5.6.19 MariaDB 10.0.24 OpenSSL 1.0.2g
The card in question is a MicroSDHC Ultra UHS-I 32GB. One advice in that regard, pick something else. For the record, I’m not doing any overclocking on either device during the tests.
PHP performance:
To keep it simple but relevant, I’m letting my caching engine calculate and display the time spent to create cached versions of dynamic pages. Printed below are the values generated per device for the url: https://blog.paranoidpenguin.net/tag/office-365/
# RPI2 /** Dynamic page generated in 2.423 seconds. */ # RPI3 /** Dynamic page generated in 1.395 seconds. */
On average (after 15 pages) PHP execution was about a second faster with the RPi3 introducing additional gain on “heavier” pages.
On average, I’m writing this down as a 42% decrease in execution time for PHP scripts. A result I’m rather excited about.
MySQL performance:
I’m just relaying on the BENCHMARK() function with this test. I don’t really feel like this is much of a bottleneck with my current setup that is heavily relying on serving static pages.
# RPI2 SELECT BENCHMARK(1000000,ENCODE('praise','bob')); +-------------------------------------------+ | BENCHMARK(1000000,ENCODE('praise','bob')) | +-------------------------------------------+ | 0 | +-------------------------------------------+ 1 row in set (4.50 sec) # RPi3 SELECT BENCHMARK(1000000,ENCODE('praise','bob')); +-------------------------------------------+ | BENCHMARK(1000000,ENCODE('praise','bob')) | +-------------------------------------------+ | 0 | +-------------------------------------------+ 1 row in set (2.98 sec)
On average I’m going with a 35% decrease in query execution times.
OpenSSL performance:
# RPi2 $ openssl speed rsa2048 rsa4096 sign verify sign/s verify/s rsa 2048 bits 0.049801s 0.001378s 20.1 725.5 rsa 4096 bits 0.354483s 0.005280s 2.8 189.4 # RPi3 $ openssl speed rsa2048 rsa4096 sign verify sign/s verify/s rsa 2048 bits 0.025126s 0.000673s 39.8 1485.4 rsa 4096 bits 0.172203s 0.002566s 5.8 389.7
Based on this test, the RPi3 offers a 100% increase for both rsa2048 and rsa4096. Still not awesome numbers in the grand scheme of things but definitely a clear improvement over the RPi2.