21
Introducing the Raspberry Pi 2 - Model B Created by lady ada Last updated on 2015-02-02 03:30:12 AM EST

Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

Introducing the Raspberry Pi 2 - Model BCreated by lady ada

Last updated on 2015-02-02 03:30:12 AM EST

Page 2: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

2366778999

101212121314171821

Guide Contents

Guide ContentsOverviewWhat to watch out for!What hasn't changedWhat has changed, watch out!

New ProcessorPower DrawHow to tell if you have a Pi 2PCB Silkscreen NameBroadcom Logo on ProcessorRAM chip on bottomBenchmarks & Performance ImprovementsCompared to other Single-Board-Computers

nbench @ 700MHznbench @ 950MHz

Sysbench tests (Compared to Pi B+)Web performance (Compared to Pi B+)SunSpider (Compared to Pi B+)Other tests!

Page 2 of 21

Page 3: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

Overview

Didn't think the Raspberry Pi could get any better? You're in for a big surprise! The RaspberryPi 2 Model B is out and it's amazing! With an upgraded ARMv7 multicore processor, and a fullGigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a realdesktop PC

The big upgrade is a move from the BCM2835 (single core ARMv6) to BCM2836 (quad coreARMv7). The upgrade in processor types means you will see ~2x performance increase juston processor-upgrade only. For software that can take advantage of multiple-coreprocessors, you can expect 4x performance on average and for really multi-thread-friendlycode, up to 7.5x increase in speed!

That's not even taking into account the 1 Gig of RAM, which will greatly improve games andweb-browser performance!

Page 3 of 21

Page 4: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

Best of all, the Pi 2 keeps the same shape, connectors and mounting holes as the RaspberryPi B+. That means that all of your HATs and other plug-in daughterboards will work just fine.99% of cases and accessories will be fully compatible with both versions

Page 4 of 21

Page 5: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

Please note: The new processor on the Pi 2 means that you will need to create a new SDcard with your operating system (Raspbian, Arch, XBMC, NooBs, etc) because you cannotplug in cards from a Pi 1 into a Pi 2. Also, any precompiled software will not work at full speed(although supposedly the processor will be able to run it). Still, you'll want to have itrecompiled for the new processor! For many people, this isn't a big deal, but if you have apre-created Pi 1 Model A+B+ card image, just be aware it won't work!

Page 5 of 21

Page 6: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

What to watch out for!

What hasn't changed

The basic form-factor of the Pi 2 Model B is nearly 100% the same as the Pimodel B+

The shape and size of the PCB is the same

The 4 mounting holes are in the same location and are the same size

The USB, Ethernet, A/V, HDMI, micro SD and microUSB connectors are int the sameexact locations and are the same size

The Camera, Display and 40-pin GPIO connectors are in the same exact locations andare the same size

The physical changes include:

Processor chip is larger, has moved slightlyThe RAM is now soldered onto the bottom of the board (no longer PoP)Other components and chips are moved around slightly to make space for the largerprocessor and RAM chip on bottom

This means that 99% of cases designed for the Raspberry Pi Model B+ will work with theRaspberry Pi 2 Model B. This includes the Adafruit B+ Pi cases (http://adafru.it/2258)

Watch out, the Raspberry Pi 2 Model B is VERY different from the Raspberry Pi Model B -check for that "2" when checking accessories and compatibility!

The Raspberry Pi 2 Model B looks *a lot* like a Raspberry Pi Model B+! Look for the chipon the bottom to identify the Pi 2

Page 6 of 21

Page 7: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

One exception is some Pibow cases which have a layer that has cutouts for the specificlocation of the processor. (http://adafru.it/epX)Pimoroni has informed us that they will havea new case design that is compatible with both. Check the description of any case to makesure it is compatible with both Raspberry Pi Model B+ and Raspberry Pi 2 Model B

What has changed, watch out!

New Processor

The processor has completely changed on the new RaspberryPi 2, instead of a ARM v6 corechip (arm6l) the BCM2836 has been upgraded to an ARM v7 core which is a much morepowerful core

However, your existing Raspberry Pi SD card images will not work becausethe firmware and kernel must be recompiled/adapted for the new processor.

If you have a Raspberry Pi 2, your best bet is to just get a new SD card and install with NooBsor Raspbian (or whatever you like) for ARMv7

If you have any pre-compiled binaries that you are downloading, those will need updating

Page 7 of 21

Page 8: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

too, in order to take advantage of the speed increase. Anything where you have access tosource code can be recompiled and ought to work just fine. Supposedly any ARMv6software is forwards compatible with ARMv7 but we haven't tested it for sure yet

Power DrawQuad-core ARMv7 processor means higher current draw. We'll get some number shortly butif you're still running with a cheap 5V 700mA power supply, we really recommend upgradingto a 5V @ 2000mA!

Page 8 of 21

Page 9: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

How to tell if you have a Pi 2Since the Raspberry Pi 2 Model B looks a lot like the Raspberry Pi Model B+ you'll want to getgood at identifying which you have.

PCB Silkscreen NameFirst up, you can look for the name which is near the GPIO connector:

Look for the "Raspberry Pi 2" text and you're golden!

Broadcom Logo on ProcessorSince the Pi 2 does not use 'package-on-package', assembling the RAM on top of theprocessor, you can easily spot the Broadcom logo on top of the quad processor

Page 9 of 21

Page 10: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

If you don't see the logo, or you see something like "Samsung" or "Hynix" it's a B+

RAM chip on bottomThe Pi 2 has a RAM chip that is soldered onto the bottom of the Raspberry Pi's circuit board.The B+ does not have one at all, the RAM chip is soldered directly on the processor. So justlook for a black square chip on the bottom of the PCB. The naming and logo on the RAM mayvary depending on what company supplied the memory.

Page 10 of 21

Page 11: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

Page 11 of 21

Page 12: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

Benchmarks & Performance ImprovementsThe big reason to upgrade to a Pi 2 Model B over a classic Raspberry Pi Model B+ is the bigboost in performance

The Pi 2 has 4 processors in one chip (the B+ has only one), an ARMv7 core vs an ARMv6,and 1 Gig of RAM vs 512 MB for the model B and B+

Those 3 improvements translate to pretty big performance increases!

OK but how much faster is the Pi 2 vs the Model B+? While it strongly depends on whatyou're doing, you should see at least 85% improvement (single-core processes that justdepend on the ARMv7 vs ARMv6 upgrade. For anything that can take advantage of multi-core processors, you can see up to 7.5x increase in speed!

Using the Pi as a computer feels fast and 'desktop like' - not sluggish! Particularly fordevelopers, compiling code on the Pi 2 is 4x faster and the extra RAM helps a lot too, somost programs can now be compiled directly on the Pi. We still recommend our Pi Kernel-O-Matic for cross-compiling kernels since you need a lot of space & RAM (http://adafru.it/epp)

Compared to other Single-Board-ComputersYou can see how the Pi 2 compares to the Arduino Yun / Beaglebone Black / Intel Galileo bychecking out this earlier comparison guide (we'll be updating the guide shortly to add the Pi 2numbers!) (http://adafru.it/eq1)

We provide nbench numbers below that you can compare to the other computers until weupdate that tutorial...

nbench @ 700MHz

TEST : Iterations/sec. : Old Index : New Index

: : Pentium 90* : AMD K6/233*

--------------------:------------------:-------------:------------

NUMERIC SORT : 344.98 : 8.85 : 2.91

STRING SORT : 27.689 : 12.37 : 1.92

BITFIELD : 8.676e+07 : 14.88 : 3.11

FP EMULATION : 64.374 : 30.89 : 7.13

FOURIER : 3775 : 4.29 : 2.41

ASSIGNMENT : 5.6202 : 21.39 : 5.55

IDEA : 1068.9 : 16.35 : 4.85

HUFFMAN : 519.79 : 14.41 : 4.60

NEURAL NET : 4.6602 : 7.49 : 3.15

LU DECOMPOSITION : 177.44 : 9.19 : 6.64

Page 12 of 21

Page 13: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

nbench @ 950MHz

==========================ORIGINAL BYTEMARK RESULTS==========================

INTEGER INDEX : 15.870

FLOATING-POINT INDEX: 6.660

Baseline (MSDOS*) : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0

==============================LINUX DATA BELOW===============================

CPU : 4 CPU ARMv7 Processor rev 5 (v7l)

L2 Cache :

OS : Linux 3.18.1-v7+

C compiler : gcc-4.7

libc : libc-2.13.so

MEMORY INDEX : 3.208

INTEGER INDEX : 4.638

FLOATING-POINT INDEX: 3.694

Baseline (LINUX) : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38

* Trademarks are property of their respective holder.

TEST : Iterations/sec. : Old Index : New Index

: : Pentium 90* : AMD K6/233*

--------------------:------------------:-------------:------------

NUMERIC SORT : 481.57 : 12.35 : 4.06

STRING SORT : 37.6 : 16.80 : 2.60

BITFIELD : 1.1826e+08 : 20.29 : 4.24

FP EMULATION : 87.4 : 41.94 : 9.68

FOURIER : 5126 : 5.83 : 3.27

ASSIGNMENT : 7.6138 : 28.97 : 7.51

IDEA : 1450.7 : 22.19 : 6.59

HUFFMAN : 705.88 : 19.57 : 6.25

NEURAL NET : 6.3669 : 10.23 : 4.30

LU DECOMPOSITION : 242.49 : 12.56 : 9.07

==========================ORIGINAL BYTEMARK RESULTS==========================

INTEGER INDEX : 21.639

FLOATING-POINT INDEX: 9.082

Baseline (MSDOS*) : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0

==============================LINUX DATA BELOW===============================

CPU : 4 CPU ARMv7 Processor rev 5 (v7l)

L2 Cache :

OS : Linux 3.18.1-v7+

C compiler : gcc-4.7

libc : libc-2.13.so

MEMORY INDEX : 4.359

INTEGER INDEX : 6.341

FLOATING-POINT INDEX: 5.037

Page 13 of 21

Page 14: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

For comparison-geeks, note that if you overclock the Pi 2 to 900-1000 MHz it's essentiallythe same processing speed as a BeagleBone Black (also an ARMv7), but with the improvedFloating Point capabilities. There's a lot of reasons to go with a BBB vs Pi2 so please note it'snot that the Pi 2 is a 'replacement' for the BBB!

Sysbench tests (Compared to Pi B+)Sysbench is a linux program that can do raw computational tests. It's a pure-math test, butwill tell you the 'upper bound' for speed and is good for general comparison.

Running on a B+ with one thread, we get:

And for 4 threads:

Baseline (LINUX) : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38

* Trademarks are property of their respective holder.

Running the test with following options:

Number of threads: 1

Doing CPU performance benchmark

Threads started!

Done.

Maximum prime number checked in CPU test: 10000

Test execution summary:

total time: 523.7819s

total number of events: 10000

total time taken by event execution: 523.7231

per-request statistics:

min: 51.99ms

avg: 52.37ms

max: 54.81ms

approx. 95 percentile: 53.54ms

Threads fairness:

events (avg/stddev): 10000.0000/0.00

execution time (avg/stddev): 523.7231/0.00

Running the test with following options:

Page 14 of 21

Page 15: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

Note that both tests take 523 seconds, because the B+ is a single-core processor, there isno improvement for having 4 threads vs 1 (all 4 threads are one one processor)

In comparison, the Pi 2 has for a single thread:

Number of threads: 4

Doing CPU performance benchmark

Threads started!

Done.

Maximum prime number checked in CPU test: 10000

Test execution summary:

total time: 523.1061s

total number of events: 10000

total time taken by event execution: 2091.9841

per-request statistics:

min: 162.66ms

avg: 209.20ms

max: 252.29ms

approx. 95 percentile: 232.33ms

Threads fairness:

events (avg/stddev): 2500.0000/1.22

execution time (avg/stddev): 522.9960/0.04

Running the test with following options:

Number of threads: 1

Doing CPU performance benchmark

Threads started!

Done.

Maximum prime number checked in CPU test: 10000

Test execution summary:

total time: 281.1107s

total number of events: 10000

total time taken by event execution: 281.0972

per-request statistics:

Page 15 of 21

Page 16: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

281 seconds vs 523 for a single thread, so even without taking advantage of multicore,there's a 523/281 = 86% increase. That's nearly double just by having a ARMv7 doing thecomputation

If running with 4 threads, one on each processor, we see another big improvement

because we could split the work over 4 cores, we sped up 4x to 70.7 seconds.

Compared to a model B+, the Pi 2 is at most 7.4x faster when using multi-threaded/core computation!

min: 28.08ms

avg: 28.11ms

max: 38.60ms

approx. 95 percentile: 28.12ms

Threads fairness:

events (avg/stddev): 10000.0000/0.00

execution time (avg/stddev): 281.0972/0.00

Number of threads: 4

Doing CPU performance benchmark

Threads started!

Done.

Maximum prime number checked in CPU test: 10000

Test execution summary:

total time: 70.6482s

total number of events: 10000

total time taken by event execution: 282.4808

per-request statistics:

min: 28.08ms

avg: 28.25ms

max: 48.62ms

approx. 95 percentile: 28.39ms

Threads fairness:

events (avg/stddev): 2500.0000/12.75

execution time (avg/stddev): 70.6202/0.01

Page 16 of 21

Page 17: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

Web performance (Compared to Pi B+)When using the Pi 2 for desktop use such as running Scratch, minecraft, or web-browsing, itfeels much faster. But, that's pretty subjective and we wanted to have some Real Numbersfor comparison so we ran a few web-browser Javascript tests.

Javascript is fairly processor-intensive and runs a huge amount of the interactivity ofwebsites, so speedy Javascript will translate directly to speedy browsing!

The first test we did is called Octane, you can run it by visiting here (http://adafru.it/epY) - itruns in your webbrowser and does a series of tests.

On a B+, we actually couldn't get the test to finish without crashing, but before it crashed wegot the following:

Compare to the Pi 2 which did at least finish and gave us these numbers:

Page 17 of 21

Page 18: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

Higher numbers are better in this case

You can tell that depending on the tests, the Pi 2 is at least 2x as fast, and in most cases is4x as fast.

SunSpider (Compared to Pi B+)Another test you can run is called SunSpider (http://adafru.it/epZ), it's also a Javascriptbenchmarker. Here's the results from running it on a B+

============================================

RESULTS (means and 95% confidence intervals)

--------------------------------------------

Total: 9477.4ms +/- 0.4%

--------------------------------------------

3d: 1657.4ms +/- 0.9%

cube: 552.5ms +/- 0.5%

morph: 316.1ms +/- 0.7%

raytrace: 788.8ms +/- 1.8%

access: 482.1ms +/- 0.6%

binary-trees: 80.6ms +/- 1.6%

fannkuch: 203.0ms +/- 1.3%

Page 18 of 21

Page 19: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

And running on a Pi 2:

nbody: 133.7ms +/- 0.8%

nsieve: 64.8ms +/- 3.2%

bitops: 225.2ms +/- 0.3%

3bit-bits-in-byte: 20.1ms +/- 1.1%

bits-in-byte: 38.5ms +/- 2.4%

bitwise-and: 51.1ms +/- 1.5%

nsieve-bits: 115.5ms +/- 0.7%

controlflow: 74.0ms +/- 1.2%

recursive: 74.0ms +/- 1.2%

crypto: 647.4ms +/- 2.9%

aes: 337.7ms +/- 2.0%

md5: 171.7ms +/- 5.4%

sha1: 138.0ms +/- 3.6%

date: 1503.9ms +/- 0.6%

format-tofte: 784.9ms +/- 0.8%

format-xparb: 719.0ms +/- 0.8%

math: 431.4ms +/- 1.7%

cordic: 104.7ms +/- 2.0%

partial-sums: 238.2ms +/- 2.4%

spectral-norm: 88.5ms +/- 2.6%

regexp: 174.8ms +/- 1.2%

dna: 174.8ms +/- 1.2%

string: 4281.2ms +/- 0.5%

base64: 208.6ms +/- 1.6%

fasta: 466.5ms +/- 3.7%

tagcloud: 711.4ms +/- 0.9%

unpack-code: 2436.8ms +/- 0.4%

validate-input: 457.9ms +/- 0.9%

============================================

RESULTS (means and 95% confidence intervals)

--------------------------------------------

Total: 2476.9ms +/- 0.7%

--------------------------------------------

3d: 499.8ms +/- 2.6%

Page 19 of 21

Page 20: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

In this case, lower numbers are better. Again, you can see that all tests are at least 2x fasteron a Pi 2 vs a B+ and most are about 4x faster!

cube: 141.7ms +/- 1.4%

morph: 150.5ms +/- 6.1%

raytrace: 207.6ms +/- 2.1%

access: 190.6ms +/- 1.0%

binary-trees: 24.8ms +/- 1.2%

fannkuch: 90.8ms +/- 1.0%

nbody: 48.1ms +/- 2.2%

nsieve: 26.9ms +/- 3.9%

bitops: 100.6ms +/- 1.3%

3bit-bits-in-byte: 8.4ms +/- 4.4%

bits-in-byte: 19.4ms +/- 1.9%

bitwise-and: 25.8ms +/- 1.2%

nsieve-bits: 47.0ms +/- 2.0%

controlflow: 25.6ms +/- 3.0%

recursive: 25.6ms +/- 3.0%

crypto: 194.5ms +/- 1.3%

aes: 99.6ms +/- 0.7%

md5: 52.3ms +/- 4.2%

sha1: 42.6ms +/- 0.9%

date: 303.5ms +/- 1.2%

format-tofte: 154.4ms +/- 0.8%

format-xparb: 149.1ms +/- 1.7%

math: 141.5ms +/- 1.0%

cordic: 39.1ms +/- 1.0%

partial-sums: 69.9ms +/- 1.0%

spectral-norm: 32.5ms +/- 1.6%

regexp: 90.0ms +/- 0.7%

dna: 90.0ms +/- 0.7%

string: 930.8ms +/- 0.7%

base64: 57.6ms +/- 1.0%

fasta: 141.2ms +/- 0.7%

tagcloud: 160.7ms +/- 0.6%

unpack-code: 460.6ms +/- 1.0%

validate-input: 110.7ms +/- 1.0%

Page 20 of 21

Page 21: Introducing the Raspberry Pi 2 - Model B...Gigabyte of RAM, this pocket computer has moved from being a 'toy computer' to a real desktop PC The big upgrade is a move from the BCM2835

Other tests!OK we'll be doing more tests, but one thing we did get going was playing around withemulators. Of course the Pi 2 is much speedier than the B+ and by overclocking to 900 MHzwe could run pcsx (playstation 1 emulator) and Crash Bandicoot at full speed with HDMIaudio! Simply download, build and run as per this tutorial (http://adafru.it/eq0).

Last Updated: 2015-02-02 03:30:13 AM EST Page 21 of 21