Valentine’s Day is normally a time when couples, and prospective couples, celebrate their affections for one another. But what if you don’t have a valentine? It can be a hard time. Sadly for me, it looked like this year would be just like every other – alone. Or so I thought …
Where is the Love?
When the Raspberry Pi first debuted, despite all the interest from hobbyists, it was hard to know whether it would ever truly be successful. Needless to say, that doubt is now lost in the winds of time, with record volumes of Raspberry Pis being sold for educational, hobbyist and industrial uses and a diversification of the Raspberry Pi product portfolio.
As a hobbyist, I have a lot to thank my Raspberry Pi’s for. For those who have stuck with me since the outset – they would know the story behind this blog. It started life as Gough’s Hot Pi Press, hosted at home on a single Raspberry Pi Model B. Were it not for my first functioning Raspberry Pi from element14, I might not have started this blog when I did.
Since then, I’ve had the Raspberry Pi performing duties such as being an XBMC media centre, ADS-B aircraft tracker, ACARS decoder, personal NAS, remote RTL-SDR server, SSH tunnel and proxy server, amongst many others. It’s been the ideal platform for experimentation and running network services because of its low power, fan-less, low-cost nature.
I liked the concept so much, that I have that many Raspberry Pi’s at home, just for me and my experiments. That doesn’t count at least two Raspberry Pis that have bitten the dust due to various reasons, and at least two that are deployed “remotely” and are performing their jobs.
There can be no doubt that I am a Raspberry Pi enthusiast.
The Raspberry Pi 2 Announcement
When the Raspberry Pi 2 was first announced, I was a little surprised. The Raspberry Pi Model B+ was released only very recently, and to see another new product so soon seemed to be out of line with the Raspberry Pi Foundation’s history. Generally, the revisions would come out slowly, with minor changes.
My initial thought was – is this a real Raspberry Pi, or one of those “compatible” clones which is made by a third party? You know, the ones that claim compatibility in some way – be it form factor, GPIO pin header allocation, or Linux distribution compatible but aren’t truly plug and play compatible.
I saw an advertisement for a pre-order program, and then suddenly, like a tsunami, my whole feed was filled with Raspberry Pi 2 information. It seems this time, they managed not to have someone let the cat out of the bag early.
It was real, and it promised a lot. For the same price, you were getting “six times” the amount of computing power. It also promised the same form factor as the Pi B+ meaning no breaks in compatibility with accessories, unlike the physical compatibility issue with some of the earlier add-in boards on the B+.
Having owned so many Raspberry Pi boards, it seemed like a big leap – How “compatible” will the change of CPU be? Was it as fast as it promised? What about single thread tasks? Overclocking? Will it revolutionize the user experience? Become as useful as a basic desktop (gasp!) computer?
I was eager to find out, but I wasn’t quite eager enough to go and order one just yet. I was still reeling from the Model B+. I was more interested to sit it out and wait for a RoadTest instead.
The date arrives … unannounced?
It was the day before Valentine’s Day. I’m sitting in my chair … and suddenly, a knock at the door. An unexpected knock. I opened the door to a UPS delivery-person, with a package in his hand. I couldn’t wipe the confusion from my face.
“Package for Lui”, he grunted.
“Yes … uh … that’s me,” I managed to stumble as a reply.
After I signed for it, it was handed over to me … where I promptly tore apart the bag to find that it was a Raspberry Pi 2 Model B, that had been sent to me from element14 UK. Thanks guys!
Hey, it even matches my shirt, and a the logo sort of looks like a love heart, right?!
The Raspberry Pi 2 comes in a similar cardboard box to prior Raspberry Pis. As with the later B+, the printing is more lively and colourful, and clearly advertises the features of the board. The main benefits of the Raspberry Pi 2 include:
- A quad core BCM2836 clocked at 900Mhz based on the ARMv7 architecture and ARM Cortex A7 core design. This is contrasted with the original Raspberry Pi offering a single core BCM2835 clocked at 700Mhz based on the ARMv6 architecture and ARM11 core design. This should offer higher speeds, even on a clock for clock basis.
- 1Gb RAM clocked at 450Mhz, compared to 512Mb on the B+ and later B’s, and 256Mb on the A and earlier B’s, clocked at 400Mhz. More RAM means more space for complex applications to work in, and the faster clock rate should mean better RAM bandwidth.
The Raspberry Pi 2 retains the same I/O, microSD storage connector and layout as the Model B+ including the 40-pin hat-compatible GPIO connector.
But already, something is different. The box is much heavier, and thicker. Why might that be?
Unlike in previous units, there isn’t just a small leaflet of regulatory information, but instead there is a medium sized booklet with some information about getting started. I think this is great for reducing logistical issues with making sure localized leaflets are inserted into boxes, and provides a little more guidance to newcomers who might otherwise complain of a lack of direction.
On the other hand, it makes me feel surprised that adding this substantial amount of print, most of it in other languages and not entirely useful to me, didn’t somehow add to the cost. It does feel a little wasteful to me, but is probably a legal requirement.
The above high-resolution photo of my board shows clearly how the layout of the ports and mounting holes have been completely preserved. The CPU itself does make a change, and exposes itself for the first time. This means that the awkward package-on-package design which was complicated and expensive to implement for the original Raspberry Pi is no longer with us! It also does mean, however, that the traces are a little more complicated as the RAM is now on the rear-side of the board, and thus the power regulation circuitry looks a little squashed and the Raspberry logo has gotten a little smaller. A worthwhile trade-off. The USB-hub and USB-Ethernet solution from SMSC is maintained.
The underside reveals that the PCB is still made by KCE, dated Week 1 of 2015 – so this Pi’s pretty fresh! The underside houses the RAM, from Elpida, marked B8132B4PB-8D-F made Week 47 of 2014. There’s not much information on this part available online.
Just for completeness, here’s a look at the ports on the sides – nothing’s changed from the B+:
As proof of the unchanged port dimensions, here’s the Raspberry Pi 2 Model B fitting into the same case I used for the B+ earlier:
This is how the Raspberry Pi family tree looks …
The camera-shy Pi 2
Not long after the release of the Raspberry Pi 2, the media caught onto a thread about the Raspberry Pi rebooting every time it was exposed to a Xenon flash. Through a process of trial and error, they discovered it was due to the new voltage regulator, which is packaged in a “bumped” silicon die – note U16 in this macro photo, although U8 is also one-such package.
Some in the media have unfairly labelled this as a quality issue, and blew the issue out of proportion, whereas the parts are pretty much working as designed. The board itself was never meant to be a “finished” product – and the problem wouldn’t manifest itself under normal circumstances or inside a dark enclosure. Furthermore, it was easily cured with some BluTack or similar substance.
It occurs due to the photovoltaic effect or photoelectric effect as stated here – the same effect that solar cells rely on to generate electricity. The light is absorbed by the silicon and generates a voltage which disrupts the functioning of the chip. While it’s claimed to be harmless – stray voltages and voltage transients can stress silicon, and I don’t advise you replicate this.
A note on overclocking – yes we can!
Early media releases seem to have some misinformation that the Raspberry Pi 2 cannot be overclocked. This is not the case, and the latest version of Raspbian includes a raspi-config with a dedicated Pi 2 overclock setting.
Overclocking a multi-core CPU has its own intricate challenges – as each core may have a different tolerance to overclocking. Furthermore, you notice a lower overvolt setting for the Pi 2 – in my limited experience, it seems that having more cores does increase the heat somewhat which means that higher overvolts with the four cores are more likely to run into thermal issues under loading. For stability testing, it’s hence important that you ensure either you have a multi-threaded stability test, or you fire up four separate instances to ensure that every core is occupied for a load average of 4.00 or nearby, otherwise you can mislead yourself into thinking you have a stable and speedy Pi 2, only to find it balking under load.
Benchmarks – Roy Longbottom’s Raspberry Pi Benchmarks
I don’t normally benchmark my Raspberry Pi hardware – I figure if it runs the task I’ve assigned it, I would be happy. Unfortunately, to be able to better understand performance differences, one has to actually get some hard numbers. As a result, I’ve turned to Roy Longbottom’s Raspberry Pi Benchmarks, available pre-compiled and for free.
One thing to note is that the benchmarks appear to be single-threaded. In reality, they can underestimate the performance gains due to parallelism where it can be leveraged (and not limited by RAM bandwidth, etc). Please keep this in mind.
Results have been gathered using a variety of baselines and settings:
- Pi 1 Stock – a Raspberry Pi 1 with default 700Mhz settings
- Pi 1 Turbo – a Raspberry Pi 1 with Turbo 1000Mhz settings
- Pi 2 Stock – a Raspberry Pi 2 with default 900Mhz settings
- Pi 2 OC – a Raspberry Pi 2 with 1000Mhz overclock setting
- Pi 2 MaxOC – a Raspberry Pi 2 configured to run at 1150Mhz ARM core, 600Mhz core and 550Mhz RAM – it is not stable, but is the fastest speed it could complete the benchmarks.
The results are compared to the Pi 1 Stock as baseline, and presented as a percentage improvement based on the following equation:
( (Value / Pi 1 Value) - 1 ) * 100
Thus a value of 0% means it’s just as fast as the Pi 1 at stock, and a value of 100% means it’s twice as fast as a Pi 1 at stock.
On the classic CPU tests, we can see that the original Pi at 1000Mhz achieves anywhere from 45-64% more performance over the original Pi at stock. However, the Pi 2 at stock sails past this offering a whopping 83-184% improvement over the original Pi at stock. Overclocking it further pushes the gains even further.
It’s clear that the CPUs cannot be compared clock for clock because of the more efficient core design of the Pi 2. Even so, doubts about its single threaded performance can easily be put to bed – a Pi 1 at Turbo cannot match a Pi 2 at stock!
In order to better understand why there is such a big difference between the two, I also invoked the BusSpeed benchmark and chose the All Read output column for comparison.
At larger memory spans, the performance of the benchmark is limited to the memory bandwidth. Looking at the 65536kB (64MiB) row, it’s clear that the memory bandwidth of the Pi 2 is superior to the Pi 1, reaching close to three times as fast (i.e. 200% improvement) as the original Pi 1. The big improvement comparatively speaking is for the results of 32kB to 512kB where it seems that the CPU might have very effective caching which doesn’t hold true for the Pi 1 even when overclocked. This would improve program performance relatively dramatically.
One thing did perplex me – while we talk about the clock rates of 500Mhz for SDRAM being equal for both Pi 1 and Pi 2, why is there such a big discrepancy in the bandwidth? Is it just down to a better RAM controller within the CPU? Quite possibly. Would there be enough bandwidth to keep the four cores busy under heavy loads? I’m not entirely sure, but it’s possible. An experiment for another day, I suppose.
I also did a MemSpeed benchmark for copying a double, and the performance difference is astonishing here too. It makes the Pi 1 look like a snail. So I suppose the performance difference can be explained by a better CPU core design, with better cache, and RAM access.
Were there any drawbacks? One of the first thoughts was – this quad core design must use more power. I did a quick check using the blue USB charger doctor.
In essence, yes, the Raspberry Pi 2 does use more power under load. The idle power is pretty similar (given the accuracy/inaccuracy of the meter). This is expected, but on a work done for power basis, the Pi 2 is more energy efficient.
Its power draw actually comes back to the level that the original Model B with linear regulators was consuming – so if you were fine with that, you’ll be fine with the Pi 2.
I used my Sandisk 32Gb Class 4 microSDHC as that’s what I had laying around, but the boot time was another test where the Pi 2 handily boots in nearly half the time. I’m sure a faster card might skew the results further in the Pi 2’s favour.
I think, for me, it was pretty much love at first boot. Watching the debug text scroll up the screen makes the old Raspberry Pi seem like a struggle by comparison. Even on a slow Sandisk 32Gb Class 4 card, it manages a boot in nearly half the time – pretty good.
In use, for most processes, it felt more snappy. One of the acid tests is to use a desktop web browser, such as Iceweasel (better known as Firefox) or Chromium and see how it handles it. On the old Pi, it was arduous and slow, especially with image heavy sites and multiple tabs. On the Pi 2, it was a little quicker, and was less of a test of patience but it was still slow. Part of the reason was the lack of optimization and the use of only a single core.
Flipping between multiple programs was a lot better, however, and the graphical interface was more responsive when it wasn’t waiting on the microSD card.
Using the Epiphany browser, however, was an epiphany. It was much better optimized and reduced the CPU load markedly compared to using Iceweasel or Chromium. It is a more basic browser, but it’s still sufficient for doing a quick bit of research.
Running some of the more demanding tasks really shows just how well the Pi 2 handles tasks like decoding data from RTL-SDRs. Each process occupies less of the CPU due to the more efficient CPU, and having more CPUs ensures headroom even when the OS becomes busy or you begin to chew up additional resources due to SSH or VNC connections.
It would be impossible to have smooth decoding with three RTL-SDR TV tuners attached for ACARS, ADS-B and FM on a conventional Raspberry Pi, but on the Pi 2, it consumes below 30% of a core!
There’s actually a good potential that you might even run out of RAM before you complain about the CPU for certain sorts of tasks. It is a boon for people like myself, and it will allow me to downscale the number of Raspberry Pi’s I have running. Other users interested in computer vision, or server tasks will appreciate the headroom of having extra processing power for sure.
It was a much smoother experience than the earlier Raspberry Pi – existing users will feel like the Pi 2 is a breath of fresh air – the difference is night and day.
There isn’t a change without a drawback, however – some of the non-Raspbian distributions will take some time before they support the new Pi 2, while others (like Raspbmc) are going to “relaunch” with support for it under a new name. If you’re a Raspbian user, you’re all covered though.
One of the promised benefits of the Raspberry Pi 2 is easy migration of your projects from the Raspberry Pi B+ (or earlier, provided you used MicroSD cards). If you’re running on Raspbian, migration is pretty much as simple as a few commands. For NOOBs users, there is some additional steps.
I tested this out by grabbing one of my projects which had been running for a while. On the original board, I executed
sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install raspberrypi-ui-mods
The last line is not strictly necessary, but will update your Raspbian UI to the latest theme, where the toolbar is now at the top of the screen. Then, I shut down the board, removed the card, and threw it into the Raspberry Pi 2. Would it work?
Not quite! I was greeted by kernel panics during boot and perplexing fixing recursive fault but reboot needed messages.
But that’s my fault! As it turns out, if you have overclocking settings, it’s likely that they won’t be fit for the new board, and thus you should also either execute
and turn off overclocking first, or edit the config.txt using your desktop computer and comment out (by preceding the lines with #) the lines which control the arm, core, sdram clocks.
After I had realized that, it was a simple job of applying appropriate overclocking values (if necessary) and getting on with your project. Nothing needed to be recompiled! Whatever was there continued to run smoothly as it did before. I’m impressed!
It seems like Microsoft doesn’t want to be left out of the Internet of Things revolution, which has been mostly driven by Linux at the moment. While Microsoft and Intel have had a friendship which extends to their IoT initiatives with the Intel Galileo board, it seems Microsoft wants to make their OS more accessible to IoT users and has chosen to target the Raspberry Pi 2. It doesn’t seem like the image is yet available, but we are assured it will be coming soon to those who have registered for the Windows Developer Program.
It seems like an interesting strategy to take, although it’s important to understand that this will not be the Windows 10 consumers would see on their desktops, and more like an embedded OS (maybe Windows-Phone/Windows RT-esque) which mainly serves to allow developers familiar with Microsoft’s toolchain to develop applications which can target such IoT devices as well as phones, tablets, laptops and desktops.
Whether this will seriously displace Linux usage on the Raspberry Pi is an unknown, but I’d have to wager a “no” at this stage.
It seems the Raspberry Pi foundation aren’t under any illusions as to the reasons behind their success, and the latest Raspberry Pi 2 Model B retains the key points that has driven the Raspberry Pi’s success – namely, the low cost, and straightforward backwards compatibility, which allows for the platform to feel “homogenous” without being hemmed in by the original choice of hardware.
While the benefits of the increased core count will not necessarily be apparent to single thread tasks, the CPU also delivers with a more recent architecture which allows the performance per clock to increase. As a result, it appears the new CPU has much better single thread performance in part due to better caching and memory bandwidth, even comparing a stock Pi 2 to an overclocked Pi. The multi-core advantage makes sense for many tasks, as they may involves running multiple threads – think of certain server tasks with a thread per connection, dynamic content generation invoking multiple tasks, using one Raspberry Pi to do multiple things (e.g. attaching several RTL-SDRs), handling data and display on the same unit or handling multiple sensors.
It’s amazing that they’ve been able to work closely with Broadcom to specially produce the BCM2836 for the Pi 2, no doubt in part due to the major sales volumes generated. Through their refinement, they have been able to keep the cost identical, while offering so much more. In everyday use, the difference is very noticeable, from boot times through to actually using the device. It is much more pleasurable to use interactively, with less patience required compared to before.
Of course, being the natural evolution of the Raspberry Pi, it is expected that most purchases from now-on will be of the Raspberry Pi 2. Is there any downside? Well, the only one I can see is in power consumption under load and incompatibility with non-upgraded distributions (not so much an issue for Raspbian based OSes) – but aside from that, it’s pretty much a free lunch!
If you’ve got a particularly good idea of something to do with the Raspberry Pi 2, element14 have very generously opened a RoadTest here – there is a record number of 50 Raspberry Pi 2’s to be awarded for review (and keeps)!
Information can always be found at the dedicated element14 Raspberry Pi 2 area here.
Oh, and yeah. I’m still technically alone … so if you’re a girl in the Sydney area that likes Raspberry Pi (preferably not of the food variety), feel free to drop me a line … just try not to turn up unannounced.
Yeah … uh please don’t.