Page 1 of 3

### Determining how fast your Pi really is

Posted: Sun Jul 20, 2014 3:40 pm
I've discovered how to use the ring oscillator to measure how fast or slow the silicon in your particular Pi is.

Latest (rpi-update) firmware includes a new gencmd:

Code: Select all

``````\$ vcgencmd read_ring_osc
read_ring_osc(2)=2.947MHz (@1.20V)
``````
The number returned is proportional to the fastness of the silicon.
I believe that it varies from around 2.5MHz for slow silicon up to around 3.25MHz for fast silicon.

Having a higher number implies a higher level of overclock is possible.
So, if you are unable to achieve a high overclock and the ring oscillator shows a low value, then you are probably limited by the silicon.
So, if you are unable to achieve a high overclock and the ring oscillator shows a high value, then the problem is probably down to the power supply.

In theory it could be possible to create an sdcard image that picks an optimal overclock based on this reading.

Note, the number increases with core_voltage, so it's best to measure this with overclock/overvolt disabled, so everyone is on the same scale.

I'd be intested if overclockers can post their ring oscillator value (at 1.2V), and the highest stable overclock settings, and we'll see what the pattern is.

On by B+ I get:
read_ring_osc(2)=2.947MHz (@1.20V)

arm_freq=1100
core_freq=600
sdram_freq=600
over_voltage=8

seems stable, so this Pi seems pretty fast.

### Re: Determining how fast your Pi really is

Posted: Sun Jul 20, 2014 6:02 pm
No overclock

vcgencmd read_ring_osc
read_ring_osc(2)=2.911MHz (@1.20V)

950 0verclock

vcgencmd read_ring_osc
read_ring_osc(2)=2.920MHz (@1.20V)

### Re: Determining how fast your Pi really is

Posted: Sun Jul 20, 2014 6:15 pm
The ring oscillator will not change when you over-clock.
It will only change if you vary the voltage.

### Re: Determining how fast your Pi really is

Posted: Sun Jul 20, 2014 6:49 pm
My B+:

Code: Select all

``````Over_volt	MHz	Volts
-2		2.582	1.150
-1		2.720	1.175
0		2.858	1.200
1		2.942	1.225
2		3.056	1.250
3		3.118	1.275
4		3.284	1.300
5		3.366	1.325
6		3.508	1.350
``````

### Re: Determining how fast your Pi really is

Posted: Sun Jul 20, 2014 6:52 pm
Stable overclocks using the same sd card and usb peripherals:

-----------------------------------
Model B, 512MB Rev2
-----------------------------------
read_ring_osc(2)=3.005MHz (@1.20V)

arm_freq=1150
core_freq=600
sdram_freq=600
over_voltage=8

-----------------------------------
Model B, 256MB
-----------------------------------
read_ring_osc(2)=2.974MHz (@1.20V)

arm_freq=1150
core_freq=600
sdram_freq=550*
over_voltage=8
over_voltage_sdram=6

* 450 max without over_voltage_sdram=6. Unable to reach 600.

### Re: Determining how fast your Pi really is

Posted: Sun Jul 20, 2014 8:04 pm
I'm getting different readings between 2.996 and 3.001 on back to back runs of vcgencmd with 2.999 being about average - is that "expected" or not?

### Re: Determining how fast your Pi really is

Posted: Sun Jul 20, 2014 8:17 pm
MaxK1 wrote:I'm getting different readings between 2.996 and 3.001 on back to back runs of vcgencmd with 2.999 being about average - is that "expected" or not?
If you are an engineer you expect it. If you are a scientist, you get excited about it.

(Apologies to any offended scientists.)

### Re: Determining how fast your Pi really is

Posted: Sun Jul 20, 2014 9:21 pm
It was more of a fishing expedition to find out if there is anything else that influences the frequency reported. I just hope I can come up with a more suitable acronym than the one I have so far -
Calibrated Over Clockers Kit....

### Re: Determining how fast your Pi really is

Posted: Sun Jul 20, 2014 9:27 pm
Shouldn't that be how fast your Pi "could" be rather than really "is" ??

Well I guess I'm not so lucky my CPU ringer is 2.88MHz tops but nevertheless 2 years solid with same micro SD card (and lots of hammering) it's still tick-a-dee-boo.

Just out of curiosity is there a Linpack Benchmark program or equivalent that runs under Raspbian??

Richard S.

### Re: Determining how fast your Pi really is

Posted: Sun Jul 20, 2014 10:48 pm
is this bad?

Code: Select all

``````[email protected] ~ \$ vcgencmd read_ring_osc
error=1 error_msg="Command not registered"
[email protected] ~ \$ sudo vcgencmd read_ring_osc
error=1 error_msg="Command not registered"
[email protected] ~ \$ uname -a
Linux sandford 3.12.24+ #694 PREEMPT Tue Jul 15 17:34:35 BST 2014 armv6l GNU/Linux
``````

### Re: Determining how fast your Pi really is

Posted: Sun Jul 20, 2014 10:49 pm
asandford wrote:is this bad?

Code: Select all

``````[email protected] ~ \$ vcgencmd read_ring_osc
error=1 error_msg="Command not registered"
[email protected] ~ \$ sudo vcgencmd read_ring_osc
error=1 error_msg="Command not registered"
[email protected] ~ \$ uname -a
Linux sandford 3.12.24+ #694 PREEMPT Tue Jul 15 17:34:35 BST 2014 armv6l GNU/Linux
``````
You probably didn't run rpi-update?

### Re: Determining how fast your Pi really is

Posted: Sun Jul 20, 2014 11:01 pm
ShiftPlusOne wrote:
asandford wrote:is this bad?

Code: Select all

``````[email protected] ~ \$ vcgencmd read_ring_osc
error=1 error_msg="Command not registered"
[email protected] ~ \$ sudo vcgencmd read_ring_osc
error=1 error_msg="Command not registered"
[email protected] ~ \$ uname -a
Linux sandford 3.12.24+ #694 PREEMPT Tue Jul 15 17:34:35 BST 2014 armv6l GNU/Linux
``````
You probably didn't run rpi-update?
I did a few hours ago, but having done it again:

Code: Select all

``````[email protected] ~ \$ uname -a
Linux sandford 3.12.24+ #694 PREEMPT Tue Jul 15 17:34:35 BST 2014 armv6l GNU/Linux
[email protected] ~ \$ vcgencmd read_ring_osc
read_ring_osc(2)=3.027MHz (@1.20V)
``````
Is there a command that says what firmware is being used?

### Re: Determining how fast your Pi really is

Posted: Sun Jul 20, 2014 11:07 pm
Is there a command that says what firmware is being used?
vcgencmd version

Richard S.

### Re: Determining how fast your Pi really is

Posted: Sun Jul 20, 2014 11:15 pm
Be sure to do a proper restart. Shut down, remove power, and power it up again.

### Re: Determining how fast your Pi really is

Posted: Mon Jul 21, 2014 6:25 am
My old model B (Revision 000e) (no overvoltage) ringer varies:
read_ring_osc(2)=2.837MHz (@1.20V) - read_ring_osc(2)=2.850MHz (@1.20V)

I I have used stable overclock to
arm_freq=1100
core_freq=500
sdram_freq=450
over_voltage=6

### Re: Determining how fast your Pi really is

Posted: Mon Jul 21, 2014 6:56 am
ShiftPlusOne wrote:Be sure to do a proper restart. Shut down, remove power, and power it up again.
This is new to me. I have always just used sudo reboot after rpi-update updates the firmware and I always use the latest firmware release (as I have raised a number of issues on github in the past for the firmware). The firmware appears to restart with just a reboot (i.e. rainbow screen appears). Is it really necessary to remove the power after a firmware update? Happy to be educated, just surprised that a power cycle is required.

### Re: Determining how fast your Pi really is

Posted: Mon Jul 21, 2014 8:06 am
AndyD wrote: Happy to be educated, just surprised that a power cycle is required.
http://www.youtube.com/watch?v=C2Ph8zwpNyI

;P

### Re: Determining how fast your Pi really is

Posted: Mon Jul 21, 2014 8:32 am
AndyD wrote:
ShiftPlusOne wrote:Be sure to do a proper restart. Shut down, remove power, and power it up again.
This is new to me. I have always just used sudo reboot and I always use the latest firmware release (as I have raised a number of issues on github in the past for the firmware). The firmware appears to restart with just a reboot (i.e. rainbow screen appears). Is it really necessary to remove the power after a firmware update? Happy to be educated, just surprised that a power cycle is required.
It's a "just in case" paranoid sort of thing. I've just asked and the firmware should indeed be re-read when you reboot.

### Re: Determining how fast your Pi really is

Posted: Mon Jul 21, 2014 8:46 am
Rev1 - Revision 0002
not much luck overclocking at all

Code: Select all

`````` vcgencmd read_ring_osc
read_ring_osc(2)=3.072MHz (@1.20V)
``````
Rev2 - 000e
Can run Turbo

Code: Select all

``````vcgencmd read_ring_osc
read_ring_osc(2)=2.895MHz (@1.20V)
``````
Rev2 - 000e (different one)
Best is HIgh

Code: Select all

``````vcgencmd read_ring_osc
read_ring_osc(2)=2.898MHz (@1.20V)``````

### Re: Determining how fast your Pi really is

Posted: Mon Jul 21, 2014 9:51 am
read_ring_osc(2)=2.793MHz (@1.20V)
Revision : 0002

read_ring_osc(2)=2.962MHz (@1.20V)
Revision : 000d

read_ring_osc(2)=2.887MHz (@1.20V)
Revision : 000e

read_ring_osc(2)=3.006MHz (@1.20V)
Revision : 0010

 added My Model A
read_ring_osc(2)=3.021MHz (@1.20V)
Revision : 0008

### Re: Determining how fast your Pi really is

Posted: Mon Jul 21, 2014 10:08 am
ShiftPlusOne wrote:It's a "just in case" paranoid sort of thing. I've just asked and the firmware should indeed be re-read when you reboot.
Thanks.

### Re: Determining how fast your Pi really is

Posted: Mon Jul 21, 2014 10:24 am
Can someone explain what "the ring oscillator" is used for?
That phrase implies there's only one, which immediately leads to two questions: why not more? and why not zero?
And the result ("read_ring_osc(2)=2.947MHz (@1.20V)") raises two more wonderings: does the (2) imply we could get a different answer, e.g. "read_ring_osc(34159)=...."? and ,with various other quoted frequencies being in the hundreds of MHz, what earthly use is something as slow as ~3MHz?

### Re: Determining how fast your Pi really is

Posted: Mon Jul 21, 2014 10:44 am
Burngate wrote:Can someone explain what "the ring oscillator" is used for?
That phrase implies there's only one, which immediately leads to two questions: why not more? and why not zero?
And the result ("read_ring_osc(2)=2.947MHz (@1.20V)") raises two more wonderings: does the (2) imply we could get a different answer, e.g. "read_ring_osc(34159)=...."? and ,with various other quoted frequencies being in the hundreds of MHz, what earthly use is something as slow as ~3MHz?
http://en.wikipedia.org/wiki/Ring_oscillator

### Re: Determining how fast your Pi really is

Posted: Mon Jul 21, 2014 10:46 am
Burngate wrote:Can someone explain what "the ring oscillator" is used for?
That phrase implies there's only one, which immediately leads to two questions: why not more? and why not zero?
And the result ("read_ring_osc(2)=2.947MHz (@1.20V)") raises two more wonderings: does the (2) imply we could get a different answer, e.g. "read_ring_osc(34159)=...."? and ,with various other quoted frequencies being in the hundreds of MHz, what earthly use is something as slow as ~3MHz?
There appear to be 3

Code: Select all

``````vcgencmd read_ring_osc 0
vcgencmd read_ring_osc 1
vcgencmd read_ring_osc 2
``````
You can pass in other numbers, but they don't lock, and so don't produce an answer. Without a paramater it defaults to 2 which appears to be the more interesting one.

Gert may be able to explain how the other two ring oscillators differ.

### Re: Determining how fast your Pi really is

Posted: Mon Jul 21, 2014 10:56 am
dom wrote:
Burngate wrote:Can someone explain what "the ring oscillator" is used for?
That phrase implies there's only one, which immediately leads to two questions: why not more? and why not zero?
And the result ("read_ring_osc(2)=2.947MHz (@1.20V)") raises two more wonderings: does the (2) imply we could get a different answer, e.g. "read_ring_osc(34159)=...."? and ,with various other quoted frequencies being in the hundreds of MHz, what earthly use is something as slow as ~3MHz?
There appear to be 3

Code: Select all

``````vcgencmd read_ring_osc 0
vcgencmd read_ring_osc 1
vcgencmd read_ring_osc 2
``````
You can pass in other numbers, but they don't lock, and so don't produce an answer. Without a paramater it defaults to 2 which appears to be the more interesting one.

Gert may be able to explain how the other two ring oscillators differ.
I would wager that they are in different physical locations on the chip. They may also be constructed differently to have differing sensitivities to process variation parameters. The low single-digit MHz is probably because the "ring" is running at several hundred MHz and has an output divider to get a reasonable system cycle count per oscillator period.

There's a thesis that goes into this in ridiculous detail:

http://www-mtl.mit.edu/researchgroups/M ... Thesis.pdf