Build Robots

Raspberry Pi 3 vs Raspberry Pi 2: A Real-World Performance Comparison

Raspberry Pi 2 and Pi 3

It is time to compare the newly released Raspberry Pi 3 Model B against its predecessor the Pi 2. Obviously the Pi 3 is faster, it has proven itself in benchmarks, however I wanted to find out what are the actual performance gains in real world usage scenarios. I devised a series of tests in which the boards were set up as general purpose computers running the standard Raspbian distribution, as media centers running Kodi, and also I tested network speeds over their wired and wireless interfaces.

As you might already know the new Pi 3 sports a more powerful ARM CPU, built-in wireless LAN and Bluetooth interfaces, and a higher clocked GPU. You can view the specs of the Pi 3 and the Pi 2 Model B boards as a quick reminder. This being said let’s continue to the first topic of this comparison which is by no means exhaustive but rather and insight on out of the box performance increases.

Hardware design

Raspberry Pi 3 vs Pi 2 Model B hardware comparison

At first glance the two model B boards are very similar – all the ports are in the same place, the GPIO header has not been moved and the same goes for the CPU, memory and USB controller chips. Even cases designed for the Pi 2 Model B are fully compatible with the new Pi 3, however you may want to steer clear of metal cases which could shield the on-board Wi-Fi antenna in case of the Pi 3.

There are a few subtle differences of course, one of them is the microSD card slot on the Pi 3 which is now friction based rather than the spring loaded push-push type used until now. It is a minor yet welcome change, I don’t know if this was for ergonomical reasons, however it happened more often than not to accidentally press and remove the card while the Pi 2 was running.

Another detail is that the U16 power regulator chip has been coated with thicker paint to prevent resetting the board due to xenon camera flashes. Also the two LED indicators have been moved near the power driving circuitry area, while the reset breakout was moved to the right of the GPIO header to make room for the wireless antenna.

Test configuration

The tests I performed are based on common usage scenarios. These involve simply using the boards side by side and taking measurements of time, speed, performance and temperatures while performing the same tasks in identical configurations.

The new BCM2837 SoC of the Pi 3 Model B can get pretty hot, after loading the CPU at 100% for several minutes I noticed that the core temperature exceeded 80 degrees Celsius, so seems that adding some cooling elements is necessary. I installed two heat sinks, sourced from a GPU cooling kit, on the SoC itself and on the memory chip on the other side of the board.

Raspberry Pi 3 with heat sink - top Raspberry Pi 3 with heat sink - bottom

The Raspberry Pi 2 SoC does not reach temperatures that high so a radiator isn’t really required in most cases.

I also decided to give the Pi 2 an advantage running it at the standard overclock with 1GHz CPU, 500Mhz GPU, 500MHz SRAM and +2 overvolt since this is a very common usage scenario and there are no stability issues with these values.

All peripherals were connected to the boards through a powered USB hub in order to have a minimal impact on power consumption and performance. Let’s take a look at the hardware used for testing:

  • 5V, 2A ASUS Nexus 7 charger and 15cm microUSB type-B cable;
  • 16GB class 10/UHS-I 45MB/s microSDHC cards;
  • 1.2A powered USB hub for connecting all peripherals;
  • TP-Link WN722N 150Mbps Wi-Fi USB adapter;
  • 1080p60 monitor;
  • Misc.: Gigabit Wireless N router, USB HDD, multimeter, cables etc.

Quick note on power supplies and cables

This is becoming a pretty important aspect, especially for the Raspberry Pi 3, which I will cover in greater detail in a separate article. Not all micro-B USB cables are created equal and finding a good one can become quite a challenge. Since most are designed for low-current applications they have pretty high internal resistance – exceeding 10 Ohm in certain cases – therefore no matter how solid your power adapter is such cables will not be able to properly deliver power to the boards. A good idea would be sourcing cables and adapters from devices which support quick charging, or getting the official RPi Foundation power adapter kit. An even better idea would be to make a custom power delivery system.

For this review I opted for an ASUS Nexus 7 1st gen charger which I found to be able to maintain a steady 5.07 Volts under light to medium load and not drop below 5.04 Volts under heavy usage on either boards. The measurements were taken between the PP2 (+5VDC) and PP3 (Ground) solder points on the boards — they are placed in different locations on the Pi 2 and the Pi 3 respectively. I have not used GPIO header pins since there is a voltage drop of approximately 0.2 Volts to them.

Software installation

The first test was of course installing the standard Raspbian 32-bit distro via NOOBS which took almost 15 minutes on the Pi 2 and close to 13 minutes on the Pi 3, or over 13% faster:

Raspbian installation time on RPi3 and RPi2
Raspbian installation time

I also measured how much time it takes for each board to boot and reboot into Raspbian and OpenELEC for a little perspective:

Boot times for RPi3 and RPi2
Boot times for RPi3 and RPi2

Desktop and browsing experience

I have spent a few days comparing user experience with the Pis set up as general purpose computers used for web browsing, coding and a few productivity tasks with the LibreOffice suite — which I used to generate a few charts featured throughout the article. The RPi3 feels indeed snappier, even though minor hick-ups which could be experienced on the Pi2 are still present however are greatly reduced in duration. Both boards struggle when it comes to playing back Youtube or other HTML5 videos in full screen. Nevertheless the Pi 3 seems pretty usable and less frustrating, even though I did not take measurements for every task performed.

I also ran JetStream 1.1 and Octane 2.0 browser benchmarks with the standard Raspbian web browser and both benchmarks yielded surprisingly similar results in terms of percentage — these showed a close to 47% increase in performance which is very close to initial claimed figures for the Pi 3:

  • JetStream: RPi3 – 4.0309, RPi2@1GHz – 2.7454 after 2 iterations;
  • Octane: RPi3 – 527, RPi2@1GHz – 359.

It is also worth noting that the Raspberry Pi 2 did not successfully complete the entire 3 iteration cycle in JetStream even after several attempts, another point in favor of the Pi 3.

OpenGL performance

I also wanted to check how the boards handle 3D rendering. For quickly measuring frame rates achievable with the default software renderer I installed the mesa-utils package:

sudo apt-get install mesa-utils

Then ran glxgears and to see what frame rates can be achieved without hardware acceleration. The RPi2@1GHz managed about 25.4 FPS while the RPi3 reached an average of 37.9 FPS, which is an increase of over 49%.

Raspberry Pi 3 vs Pi 2 software rendering
Raspberry Pi 3 vs Pi 2 software rendering performance

Since its February release Raspbian Jessie also supports OpenGL 2.1 GPU hardware acceleration via the experimental VC4 based Gallium3D driver. It is disabled by default and is better left this way if not really needed since it crashes pretty often and is very sluggish.

Raspberry Pi 3 GeeXLab test

The driver can be easily enabled from raspi-config in the Advanced options -> GL Driver section. Alternately the line dtoverlay=vc4-kms-v3d can be added into /boot/config.txt. I also set gpu_mem=128 on both boards.

After setting everything up neither board would boot into the Raspbian desktop. After several attempts I could only get them to boot to the GUI with the OpenGL driver enabled by setting the GPU core_freq=250 on both boards.

I downloaded GeeXLab to test what frame rates can be achieved with GPU acceleration, however since both boards have similar GPUs running at the same clock speed the differences are only marginal. The Pi 3 scored 181 FPS while the Pi 2 capped at 159 FPS.

Kodi media center

Raspberry Pi boards in combination with Kodi are well suited for home entertainment systems thanks to their integrated HDMI CEC support, a feature which lacks on other platforms. I proceeded to setting up the boards as media centers running the standard OpenELEC distribution, which seems to be the only compatible with the Pi 3 at the time of writing, and then I played back high bitrate streams over the local network. Both boards were connected via Ethernet.

This was fairly less demanding on the Pi 3 which had a CPU usage averaged to about 18% on all cores. Maximum temperature was 56.3 degrees C but let’s not forget it was equipped with heat sinks. The Pi 2 averaged to about 24% CPU usage at 1GHz standard overclock and reached a core temperature of about 58.4 degrees C. If we were to compare average CPU utilization values the Pi 3 would be about 25% more efficient than the Pi 2.

CPU and GPU temperatures can be read with the commands below, however since we are talking about SoCs there is only one such sensor:

cat /sys/class/thermal/thermal_zone0/temp   ## CPU temp in thousandths of degrees C
/opt/vc/bin/vcgencmd measure_temp           ## GPU temp in degrees C

Below are some snapshots from the top command:

###### rpi3 snapshot #######
Mem: 272920K used, 482776K free, 5204K shrd, 39208K buff, 125464K cached
CPU0:  7.6% usr  7.6% sys  0.0% nic 82.6% idle  0.0% io  0.0% irq  2.1% sirq
CPU1: 20.5% usr  0.0% sys  0.0% nic 79.4% idle  0.0% io  0.0% irq  0.0% sirq
CPU2:  2.9% usr  0.0% sys  0.0% nic 97.0% idle  0.0% io  0.0% irq  0.0% sirq
CPU3: 12.8% usr  1.9% sys  0.0% nic 85.1% idle  0.0% io  0.0% irq  0.0% sirq
Load average: 0.94 0.88 0.47 3/131 644


###### rpi2 snapshot #######
Mem: 725880K used, 29820K free, 5084K shrd, 287184K buff, 314308K cached
CPU0: 17.8% usr 13.8% sys  0.0% nic 65.3% idle  0.9% io  0.0% irq  1.9% sirq
CPU1: 23.7% usr  6.9% sys  0.0% nic 69.3% idle  0.0% io  0.0% irq  0.0% sirq
CPU2: 27.2% usr  2.0% sys  1.0% nic 69.6% idle  0.0% io  0.0% irq  0.0% sirq
CPU3: 12.8% usr  3.9% sys  0.0% nic 83.1% idle  0.0% io  0.0% irq  0.0% sirq
Load average: 1.68 1.33 0.70 2/124 626

I also measured Kodi boot and reboot times for both boards and the Raspberry Pi 3 performed about 18-20% better in this aspect than the Pi 2.

Network performance

Data was transferred over the local network between a Windows 7 machine and each of the Pis. Each test was performed several times for consistency and then an average value was calculated while eliminating far off readings. In all test cases only the respective interface was set active to eliminate possible variances.

First I tested the speed over all network interfaces with LAN Speed Test, which simulates copying files from one computer to another over a Windows network, setting the file size to 50, 100 and 200MB.

In order to share a folder with the Windows machine I first needed to install the Samba package on the Pis:

sudo apt-get install samba samba-common-bin

Created a folder to share:

mkdir ~/Pi3Share

And then modified the configuration file of the Samba client:

sudo nano /etc/samba/smb.conf

I set the workgroup name in smb.conf and then added the share attributes at the end of the file:

[Pi3Share]
comment = pi3 share
path = /home/pi/pi3share
browseable = Yes
writeable = Yes
only guest = no
create mask = 0777
directory mask = 0777
public = no  #set to 'yes' if you do not want to send a password

Then set up an optional password for the share:

sudo smbpasswd -a pi

This method yielded the following results which reveal that there are no significant differences between the boards in this aspect.

RPi3 and RPi2 network speed test
RPi3 and RPi2 network speed test

With the 150Mbps Wi-Fi USB adapter it seems that values had noticeable variations on the Pi 3 and to a lesser extent on the Pi 2.

I also ran some bandwidth tests with Iperf. This time tests were performed with light to medium CPU load up to 50-60% to see how each board handles this.

sudo apt-get install iperf

All tests were performed on a 30 seconds interval for the readings to be more stable. For Windows the commands are identical. Download and upload were tested by setting each computer either as a server or a client.

iperf -s                  ## set as server
iperf -c server_ip -t 30  ## initiate the transfer as client

There is not much drama in this case either, again there are no significant differences:

RPi3 and RPi2 network speed test with Iperf
RPi3 and RPi2 network speed test with Iperf

Picture gallery

Click on any picture to open up the gallery.

Conclusion

Integrated Wi-Fi an Bluetooth connectivity is perhaps the most important upgrade of the Raspberry Pi 3 offers over the previous version, making it a very cost-effective and compact package. It would be interesting to see what is the actual range that can be achieved with the integrated Wireless radios, perhaps I will set up a few experiments to test this feature.

The Pi 3 is indeed faster than its predecessor and is better suited as a general purpose Linux box for most tasks. We also have to take into account that current software does not take advantage of the 64-bit architecture of the new BCM2837 SoC, so there is potential for even higher performance gains as new software gets released in the future.

Regarding real-life performance the Raspberry Pi 2 already provides more than enough computing power for most robotics projects, and with proper optimization Kodi already performs fairly well, so naturally the actual gains that can be noticed are not that high. When comes to every day computing the Pi 3 feels snappier and offers an improved user experience when doing light desktop tasks such as web browsing, emails and such. The minor glitches experienced with the Pi 2 are still present, albeit to a lesser degree, however I believe that this can be addressed by optimized software. Of course neither board is able to perform well at high quality video playback from the web.

Based on the chart below we can safely assume that the new Raspberry Pi 3 offers over 20% real-world performance increase over the Pi 2:

Raspberry Pi 3 vs Pi 2 performance gains
Raspberry Pi 3 vs Pi 2 performance gains

Is the new Pi 3 worth buying? Well I would say definitely — for a very reasonable price you get quality hardware that has just become even more versatile, backed by a massive online community where help can be found in no time.

Overclocking is another aspect which will be reviewed in a future article, in order to get an idea about how much performance can be squeezed out of these tiny boards. I will also integrate the Raspberry Pi 3 into my Wi-Fi connected car project, which I will feature soon, to see how well it performs and determine possible improvements.

Hopefully you have found this review helpful, feel free to drop a line if you have other test ideas or want to talk about aspects not covered here.

Resources

5 Comments Add New Comment

  1. Fischmuetze says:

    “one of them is the microSD card slot on the Pi 3 which is now friction based rather than the spring loaded push-push type used until now. It is a minor yet welcome change” … NO this isn’t welcome since it isn’t possible anymore remove sd-cards from the raspi if it is covered in a tight cover. With the former solution I could remove the cards without release the screws … this is a absolutely bullshit “improvement”

  2. Dan Mihai says:

    You’ve got a point there, but as you said only certain cases pose this problem. It is far more frustrating to accidentally click the microSD card while the board is running. 🙂

  3. Fischmuetze says:

    I have no clue how you handle your Raspberry but I had never this prob to click out unintended the SD card by an ” accident” … The reason therefor is that I always use a solid cover for the Raspberry and this prevents absolutely to accidentally touch the card. No idea why I should touch the raspberry during uptime and without a cover – strange … but now I need a pincer to pull out the card.

  4. Dan Mihai says:

    Well, I rarely use cases holding just the Pis. For most projects, i.e. mobile robots, I use enclosures which hold everything in place. More than once, with everything running I was setting up some wiring and pushed on the card.

  5. Damian Rene says:

    Very deep review, I appreciate your thoughts on powering correctly both boards. What about temperatures on each system at full load? RPi2@1Ghz and RPi3.

    Are they proportional to their processing power? (what it could probably be, because the arqitecture is in the same scale

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.