johnlee
Posts: 12
Joined: Sun Apr 06, 2014 12:07 pm

pi 2 speed

Mon Mar 09, 2015 3:57 pm

Confused about processor speed - Running jessie, overclocking my pi 1 to 1Ghz, I'm running a few lines of perl program that times 100000 assignments, a+b*c, sins etc to measure speed.

Assuming that I overclock my pi 2, when I get it, to 1Ghz I'm guessing that it'll run on 1 core & at more or less the same speed, since it is same more or less istruction set, ie no factor 6 unless I can use the 4 cores. Anyone tried/know?

As a follow up q is there a way to use the extra cores in perl?

John


.

W. H. Heydt
Posts: 12646
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: pi 2 speed

Mon Mar 09, 2015 4:03 pm

The ARMv7 designs are faster on an instruction level than ARMv6. People here have stated that the ARMv7 is about 40% faster for the same clock frequency. Therefore, you should expect the Pi2B to be significantly faster even with the same setting.

cpc464
Posts: 239
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: pi 2 speed

Wed Mar 11, 2015 1:52 pm

Hi johnlee if your program is CPU bound, as seems likely, you can expect a 3x speed up on the Pi2.

Higher performance is possible if you can somehow split the work over 4 cores. Up to 12x if you can keep all 4 cores at 100%, and even more under specific circumstances. I did some tests on the Pi1 and Pi2 and did this (rather rambling) write-up: =

http://unixetc.co.uk/2015/03/01/some-ra ... enchmarks/

When the Pi Foundation says the Pi2 is typically 6 time faster, they aren't kidding.
Unix engineer since 1989

johnlee
Posts: 12
Joined: Sun Apr 06, 2014 12:07 pm

Re: pi 2 speed

Wed Mar 11, 2015 5:34 pm

Thanks for this analysis.

BTW, were there these tests of yours done on a standard raspian wheezy (or jessie)? If so that implies that the existing os that's been running on rpi 1 already has the ability to utilize n cores.

I'm thinking of using one SD (or actually microsd) & booting alternately with rpi 1 or rpi 2. Will this work? I'll have to set the overclocking on each - the values in confiug.txt seem different for rpi 1 & 2.

john

cpc464
Posts: 239
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: pi 2 speed

Thu Mar 12, 2015 10:08 am

The tests were done on standard Raspbian Wheezy (Debian 7).

I would not recommend booting the Pi 1 and Pi 2 from the same card, or even sure it would work. The architectures are different. Even of you got it working, it would be sub-optimal. Just buy another card and download the Pi 2 Raspbian image.
Unix engineer since 1989

W. H. Heydt
Posts: 12646
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: pi 2 speed

Thu Mar 12, 2015 4:17 pm

cpc464 wrote:The tests were done on standard Raspbian Wheezy (Debian 7).

I would not recommend booting the Pi 1 and Pi 2 from the same card, or even sure it would work. The architectures are different. Even of you got it working, it would be sub-optimal. Just buy another card and download the Pi 2 Raspbian image.
If you look at the "Pi2 Raspbian" you will see that the FAT partition has 2 kernels. One for booting a Pi 1 and the other for booting a Pi 2. Thus, the image will work for any Pi. It is *earlier* (prior to 2 Feb 2015) versions that will only work on one version of the Pi in that such versions will work on any Pi 1, but not on a Pi 2.

Return to “Advanced users”