*

Welcome, Guest. Please login or register.

Get your own OLPC - Buy an XO laptop on eBay!
Pages: [1] 2 3 4 ... 6
Print
Author Topic: How to overclock your OLPC  (Read 71355 times)

How to overclock your OLPC

bdleonard
New

Posts: 4


March 24, 2008, 07:55:27 AM

*OVERCLOCKING WARNING*

By overclocking your OLPC you are running the hardware outside the design specifications.
Overclocking your CPU and/or RAM may cause stability problems, data errors, and possibly
hardware damage.  As the OLPC is passively cooled, physical damage could easily be
caused by excess heat.   

The procedure detailed below is relatively safe, cpu and memory voltages are not changed,
as that appears to require a hardware hack. The system is overclocked for a single boot
only, and must be entered manually any time you wish to overclock.  The system could be
modified to perform this automatically every boot, but I will leave that exercise to others.

*END WARNING*


A small Introduction:
The OLPC uses a Geode LX 700 CPU, along with PC2700 (166 MHz DDR SDRAM)
The Geode LX 700 runs at 433Mhz.

How to:

Overclocking of the Geode LX processor is easily accomplished by writing to a specific
MSR (Model Specific Register).  This is easily accomplished at the open firmware prompt.
To get to the open firmware prompt you press <ESC> (the X in the upper left hand corner
of the keyboard) immediately after booting the OLPC. For this to work, you must have a
developer key, or have previously disabled security on your OLPC.

I'm now assuming that you are at the open firmware "ok " prompt.

First lets establish some baseline information. Type "memtest" and press enter.
memtest-86 is now running a memory test.  In the upper left its lists the CPU frequency
and some memory throughput information.  Make note of these numbers to see how large
an improvement is made by overclocking.

Now press <ESC> to exit memtest, and press <ESC> again when the system reboots
to return to the open firmware prompt.  (A quick note, the open firmware command line
is stack based, so the structure of the commands may seem to be a little bit strange.)

Type "4c000014" and press <ENTER>
Type "rdmsr" and press <ENTER>
Type "u." and press <ENTER>  (a hex number will be displayed)
Again, type "u." and press <ENTER>  (a second hex number will be displayed, write it down)
(For my system this number was "7de009e", I believe that this may be the same for all
OLPCs but I have not verified that)

Now its time to overclock.

1) Type the number you wrote down in the step above, then press <ENTER>

Next you must chose what to over (or under) clock and how much:

Value     CPU  MEM
"3d3"   =  333   133
"3d5"   =  366   133
"3d7"   =  400   133
"3d9"   =  433   133
"3db"   =  466   133
"3dd"   =  500   133
"3df"    =  533   133
"3e1"   =  566   133

"4d3"   =  333   166
"4d5"   =  366   166
"4d7"   =  400   166
"4d9"   =  433   166  <----  OLPC Baseline
"4db"   =  466   166
"4dd"   =  500   166
"4df"    =  533   166
"4e1"   =  566   166

"5d3"   =  333   200
"5d5"   =  366   200
"5d7"   =  400   200
"5d9"   =  433   200
"5db"   =  466   200
"5dd"   =  500   200
"5df"    =  533   200
"5e1"   =  566   200

"653"   =  333   216
"655"   =  366   216
"657"   =  400   216
"659"   =  433   216
"65b"   =  466   216
"65d"   =  500   216
"65f"    =  533   216
"661"   =  566   216

"6d3"   =  333   233
"6d5"   =  366   233
"6d7"   =  400   233
"6d9"   =  433   233
"6db"   =  466   233
"6dd"   =  500   233
"6df"    =  533   233
"6e1"   =  566   233

NOTE: In case the pattern is unclear, for any value you have:
            Add 2 to increase CPU by 33 MHz
            Subtract 2 to decrease CPU by 33 MHz
            Add 100 to increase MEM by 33 MHz
            Subtract 100 to decrease MEM by 33 MHz


2) Type the value chosen from the chart above and press <ENTER>
3) Type "4c000014" and press <ENTER>
4) Type "wrmsr" and press <ENTER>

If it worked, it will appear that nothing has happened. Your system is now overclocked.
(If you have pushed the settings too far your system may have frozen or spontaneously
rebooted, just power off and choose a more conservative setting and try again)

Lets make sure it worked, type "memtest" and press <ENTER>
Check the numbers in the upper left with those that you had when you started.
This will verify that you are overclocked.  When you press <ESC> to exit memtest
the system will reboot, and the overclocked settings will return to normal.

Now repeat the  4 steps above for over clocking, and instead of running memtest,
type "boot" and press <ENTER>

Your OLPC should start its boot process and run normally.  If it does not, it is likely that
you have over clocked too far.  Choose a more conservative setting and try again. 
Remember, that these settings do not persist, and must be entered at each boot when
you wish to overclock.  In addition, many more over / under clocking settings are available
and can be calculated from the Geode LX datasheet.

Good luck, and have fun.

- Brad


EDIT :  Added a few more speeds
EDIT2: Added simple instructions for calculating a speed, for those who
            hate reading data sheets
« Last Edit: March 27, 2008, 08:24:45 AM by bdleonard » Logged

#1 Re: How to overclock your OLPC

mattd
Senior Contributor
**
Posts: 111


March 24, 2008, 10:18:22 AM

That's pretty neat, Brad. Does anyone know if we have access to (after bootup) the processor and/or RAM temp sensors? Do they even exist? I'd like to see the temperature differences of overclocked vs not.

I'd also like to see the difference in memtest results graphed. A ~15% processor boost isn't bad, but almost doubling the memory access time would be great!

I'll see what I can do. But I've already gotten "You're obsessed with that thing" from the old lady, so we'll see.
Logged

#2 Re: How to overclock your OLPC

bdleonard
New

Posts: 4


March 24, 2008, 11:23:32 AM

I have no idea about temp sensors, but now that you've tossed the idea into my head, I may look into it.  The  ~15% CPU overclock is all I can get out of my olpc, and the 30% RAM overclock seems to increase memtest memory bandwidth about 25%.  It should also be possible to modify the memory timings, but I have yet to experiment with that. (MSRs: 20000018, 20000019, 2000001A)

Theoretically, according to the datasheet, the cpu supports multipliers up to 32x (33 MHz) my system will only run up to 15x, at 16x it spontaneously reboots.  Same thing with the RAM, it supports settings up to 32x (16.5 Mhz) I can only run at up to 216MHz (14x) else the system spontaneously reboots. 
Logged

#3 Re: How to overclock your OLPC

fyoder
Senior Contributor
**
Posts: 100



WWW
March 24, 2008, 08:36:24 PM

Interesting!  Thanks for that.

A couple of notes.

This doesn't work from a usb keyboard.  If you've got one plugged in, unplug it and use the built in xo keyboard.

After booting, in a terminal type cat /proc/cpuinfo to see your new processor speed.

This Geode LX datasheet you mention, is it on the web somewhere?

I'm going to run it for awhile to see if the difference is actually noticeable. 

I wonder how badly this would effect the lifespan of the xo.  I believe xo is supposed to be good for 5 years, but running overclocked, it would be somewhat less.  Of course, unless one found a way of making the setting permanent, few are going to go through that on every boot!

Thanks again.
Logged

Loose lips lose spit.

#4 Re: How to overclock your OLPC

GoremanX
Contributor
*
Posts: 36



March 24, 2008, 11:30:39 PM

I just tried it and my system appears to be completely stable at 500/216 mhz!  It'll be interesting to see how this affects battery life.

It's interesting that you list some underclocking options. Depending on what the XO is used for, underclocking might be useful for extending battery life in some situations.

To be honest, Sugar didn't seem any more responsive with the XO overclocked. I forgot my SD card with Ubuntu installed on it at my parents' house, but I assume that would show more improvement than Sugar.
« Last Edit: March 24, 2008, 11:32:39 PM by GoremanX » Logged

#5 Re: How to overclock your OLPC

GoremanX
Contributor
*
Posts: 36



March 25, 2008, 12:18:34 AM

According to the documentation for lm-sensors, at least the AMD Geode companion chip (CS5536) is supported by the scx200_acb driver. But there's no scx200_acb kernel module on the XO. Is it compiled into the kernel directly? I'd really like to be able to monitor temperatures while overclocked.
« Last Edit: March 25, 2008, 12:40:46 AM by GoremanX » Logged

#6 Re: How to overclock your OLPC

bdleonard
New

Posts: 4


March 25, 2008, 05:18:17 AM


This Geode LX datasheet you mention, is it on the web somewhere?


The datasheet can be found at:

http://www.amd.com/files/connectivitysolutions/geode/geode_lx/33234F_LX_databook.pdf
Logged

#7 Re: How to overclock your OLPC

mattd
Senior Contributor
**
Posts: 111


March 25, 2008, 06:59:10 AM

According to the documentation for lm-sensors, at least the AMD Geode companion chip (CS5536) is supported by the scx200_acb driver. But there's no scx200_acb kernel module on the XO. Is it compiled into the kernel directly? I'd really like to be able to monitor temperatures while overclocked.

I don't know what an lm-sensor is, but I did find that the Geode has a thermal diode to measure temp. Pins are TDP and TDN (pg 34 of spec). Since the hardware is closed source we don't know if they're hooked up to anything else. No mention of temp/thermal sensor inputs on the companion chip.

Has anybody looked at the OpenFirmware yet to see if there's mention of measuring temperature?

Aside from overclocking, I think measuring CPU temp would be interesting in itself. I'd like to see the difference between sitting outside in the sun on a 95 degree day (bound to happen at my house this summer) versus the cool shady interior.
Logged

#8 Re: How to overclock your OLPC

GoremanX
Contributor
*
Posts: 36



March 25, 2008, 04:57:06 PM


I don't know what an lm-sensor is,


lm-sensors is the defacto linux package that reads things like thermal sensors. For the sensor to be readable, a kernel driver needs to be loaded so the device can be accessed. lm-sensors then interprets the data from the device and displays a result. As far as I know, it's the ONLY way to get temperature readings from thermal sensors in linux. Every distribution I know of uses this package to accomplish that task. There's already a monitoring device as part of the AMD Geode chipset that should be readable by lm-sensors, I'm just not sure how the OLPC linux kernel was compiled. The driver for the device may be compiled directly into the kernel, or it may have been omitted entirely. It definitely wasn't compiled as a separate, loadable module.
« Last Edit: March 25, 2008, 05:11:51 PM by GoremanX » Logged

#9 Re: How to overclock your OLPC

GoremanX
Contributor
*
Posts: 36



March 25, 2008, 05:27:12 PM

I just checked the config file for the OLPC linux kernel, and the scx200_acb module is in fact compiled directly into the kernel, it is not a separate module. Not only that, but it's the ONLY i2c driver that's included, which seems to imply that the OLPC kernel developers are fully aware that this is the required driver for monitoring the Geode chipset's sensors. They wouldn't include a driver in the kernel unless they intended to use it. Now all we need to know is if these sensors include thermal readings, and how to get readings from them.

Logged

#10 Re: How to overclock your OLPC

StewieGriffin
Contributor
*
Posts: 80


March 25, 2008, 08:31:16 PM

I compiled msr libs on Gusty, here is rdmsr, wrmsr...

http://rapidshare.com/files/102414303/msr.tar.bz2.html

...run as super user...

to overclock...

# /home/olpc/wrmsr 0x4c000014 0x5dd07de009e

...use at your own risk.

Edit:  This works on the standard Fedora install.  I haven't tried it on Xubuntu.

To see what your clock rate is at, use:

# /home/olpc/rdmsr 0x4c000014

The first 3 digits of the number are your hex clock code from the first post on this thread.
« Last Edit: March 26, 2008, 08:58:58 AM by StewieGriffin » Logged

#11 Re: How to overclock your OLPC

GoremanX
Contributor
*
Posts: 36



March 26, 2008, 01:12:45 AM

I did some informal testing to see what speed improvements I get with overclocking. I've been able to run reliably at 566/233 (6e1) under Ubuntu from an SD card.. That's the highest speed listed in this post at the time I write this. The back of the screen does get noticeably warmer than usual over time.

My tests basically consist of measuring boot times, web browser launch times, and loading up Gmail. It's important to note that I run Ubuntu 7.10 from an old 120x 1GB SD card, which likely affects results a lot. I'm sure there would be much more improvement using a 200x USB flash drive, or even an external USB hard drive.

First up, Ubuntu boot times! I measured from the time I enter "boot" to the point where xdm asks me for a login:

433/166: 51.6 seconds
566/233: 40.7 seconds (21% improvement)

Not bad, considering the slow media this is loading from. Next, I timed how long it takes for Firefox to come up and be usable once I click on the icon. Again, this is probably heavily affected by the SD card:

433/166: 12 seconds
566/233: 10 seconds (16% improvement)

Finally, I timed how long it takes Gmail to load up in the browser and become usable. This is affected by network speed, but I'm doing this at 3:00am when Internet speeds are usually pretty stable. There's a LOT of scripting on the Gmail page, and Firefox eats up a lot of resources running it. I timed from the point I click on "login" to when it stops saying "loading" and the page becomes useable:

433/166: 24 seconds
566/233: 19 seconds (21% improvement)

I should also point out that actually using Gmail was noticeably snappier when overclocked. The difference is obvious.

Since my SD card is so slow, I figured I'd try comparing similar tasks under Sugar from the NAND flash. I don't know how fast this NAND memoy is, but I assume it's faster than my crappy old SD card. So I went through the process of booting again, timing from the time I enter "boot" to the point where the home page is usable with all the activity icons loaded at the bottom (build 656)::

433/166: 1:36.6 (Fedora has the SLOWEST boot I've ever seen, besides Vista)
566/233: 1:15.8 (22% improvement)

Then I started the "browse" activity and timed it:

433/166: 23.8 seconds
566/233: 16.8 seconds (29% improvement)

Finally I loaded up Gmail in the browse activity:

433/166: 24 seconds (same as Firefox under Ubuntu, interesting...)
566/233: oops! Browser crashed!

I don't know if the browser crash was caused by the overclocking. The browser activity frequently crashes anyways, even when the XO isn't overclocked. But I assume the overclocking makes it more likely for crash-prone applications to crash sooner.

For the record. 566mhz is a 30% improvement in processor speed over the stock 433mhz, and 233mhz is a 40% improvement in memory speed over 166mhz. On average, I saw a 21.8% improvement in usable system speed at these overclocked ratings. In my opinion, Ubuntu ran much more smoothly and responsively at 566/233. I did not notice if battery life was noticeably affected.

I'm really looking forward to trying this with my forthcoming 200x 4GB USB flash drive and my class 6 SDHC card!
Logged

#12 Re: How to overclock your OLPC

mattd
Senior Contributor
**
Posts: 111


March 26, 2008, 05:03:18 AM

Quote from: GoremanX
lm-sensors is the defacto linux package that reads things like thermal sensors

And my Linux knowledge meeter just got bumped up. Thanks

Quote from: GoremanX
the scx200_acb module is in fact compiled directly into the kernel

Looks like I've got some learnin' and playin' to do.

Quote from: GoremanX
On average, I saw a 21.8% improvement in usable system speed at these overclocked ratings

Thanks for the writeup. 20% ain't bad and should be noticable while puttering around. If/when I figure how to get the temp sensor info, I'll try and do a writeup on the differences.
Logged

#13 Re: How to overclock your OLPC

StewieGriffin
Contributor
*
Posts: 80


March 26, 2008, 03:31:25 PM

I ran a test of playing videos before and after overclocking.

Playing an XviD that was 41:30 seconds, standard battery usage went from 97 to 73.

Overclocking to 500MHz CPU and 200MHz memory, usage went from 95 to 71.

So there doesn't seem to any extra power spent while playing a video in mplayer.  Videos are smoother when overclocked.
Logged

#14 Re: How to overclock your OLPC

goney3
Master Contributor
***
Posts: 363


G1G1D48


March 26, 2008, 04:19:20 PM

Congratulations on the front page feature! Smiley
Logged

Pages: [1] 2 3 4 ... 6
Print
Jump to:  

Members
Total Members: 2406
Latest: sembik
Stats
Total Posts: 31943
Total Topics: 3843
Online Today: 24
Online Ever: 238
(April 18, 2011, 09:48:50 PM)
Users Online
Users: 0
Guests: 19
Total: 19