Overclocking


915 posts   Page 4 of 37   1, 2, 3, 4, 5, 6, 7 ... 37
by Wozza63 » Tue Jun 26, 2012 9:08 am
I am using the calculate pi method to 2000 decimal places, and get 21-22 seconds each time, whereas with the clock speed to 800, Senab on his website gets around 19 seconds and even lower with RAM at 500 (not by much though

time echo "scale=2000;4*a" | bc -l
Posts: 11
Joined: Tue Jun 26, 2012 8:08 am
by zeeteex » Tue Jun 26, 2012 9:29 am
Wozza63 wrote:I am using the calculate pi method to 2000 decimal places, and get 21-22 seconds each time, whereas with the clock speed to 800, Senab on his website gets around 19 seconds and even lower with RAM at 500 (not by much though

time echo "scale=2000;4*a" | bc -l


Hm. It looks like you have done everything right... Someone else will be along to help in a minute... :P
Raspi
arm_freq=1150
sdram_freq=600
gpu_freq=500
over_voltage=8
Posts: 43
Joined: Sun Dec 25, 2011 10:59 am
by Wozza63 » Tue Jun 26, 2012 9:32 am
yes very odd, i have even proof read it as well to make sure for silly mistakes and nothing
Posts: 11
Joined: Tue Jun 26, 2012 8:08 am
by zeeteex » Tue Jun 26, 2012 9:43 am
Wozza63 wrote:yes very odd, i have even proof read it as well to make sure for silly mistakes and nothing


How about when you boot? Is there any noticeable speed boost at all? It is pretty difficult to tell I suppose and it can be easy to fool yourself into thinking it is faster :P
Raspi
arm_freq=1150
sdram_freq=600
gpu_freq=500
over_voltage=8
Posts: 43
Joined: Sun Dec 25, 2011 10:59 am
by Wozza63 » Tue Jun 26, 2012 9:44 am
Yeh I wasn't sure, when I boot, somemtimes i get tonnes of SD errors and sometimes i only get a few and these usually change the boot times a lot, so no, I dont think so
Last edited by Wozza63 on Tue Jun 26, 2012 9:46 am, edited 1 time in total.
Posts: 11
Joined: Tue Jun 26, 2012 8:08 am
by dom » Tue Jun 26, 2012 9:45 am
Wozza63 wrote:I am using the calculate pi method to 2000 decimal places, and get 21-22 seconds each time, whereas with the clock speed to 800, Senab on his website gets around 19 seconds and even lower with RAM at 500 (not by much though


Try arm_freq=350, then booting and benchmark should be noticably slower. That will tell if arm_freq is getting through correctly.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4026
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by Wozza63 » Tue Jun 26, 2012 9:47 am
ok then, ill try that now
Posts: 11
Joined: Tue Jun 26, 2012 8:08 am
by Wozza63 » Tue Jun 26, 2012 9:55 am
That took considerably longer at 50 seconds! so perhaps the clocks were changing ive just got a slower chip than others for whatever reason, i will try at 700 and see if i get between 22-23
Posts: 11
Joined: Tue Jun 26, 2012 8:08 am
by Wozza63 » Tue Jun 26, 2012 10:16 am
got 23.8 seconds at standard 700, will now go to 800 and see if it is lower
Posts: 11
Joined: Tue Jun 26, 2012 8:08 am
by Wozza63 » Tue Jun 26, 2012 10:55 am
i managed to get 21.267s but then I upped it to 880 (from 850) and 520 (CPU and RAM) and now it won't power up properly, at least when I put in my mouse that is, it just shut down when i plugged in my mouse, so I will have to try and get into the terminal and set it back and hope for the best or I may be requesting a replacement sooner than expected, I didn't touch the voltage though
Posts: 11
Joined: Tue Jun 26, 2012 8:08 am
by dom » Tue Jun 26, 2012 11:01 am
Wozza63 wrote:i managed to get 21.267s but then I upped it to 880 (from 850) and 520 (CPU and RAM) and now it won't power up properly, at least when I put in my mouse that is, it just shut down when i plugged in my mouse, so I will have to try and get into the terminal and set it back and hope for the best or I may be requesting a replacement sooner than expected, I didn't touch the voltage though


Just edit the config.txt file to a lower value in Windows or linux. No harm will have been done.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4026
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by MattHawkinsUK » Tue Jun 26, 2012 11:02 am
The trouble I found with benchmarks that only last 20 seconds is that I could get a 10% variation in time just running the same test with the same settings.

Far better to create a test that takes 5 minutes as that will give a more realistic difference in speed when you adjust the CPU frequency. The difference is far less likely to be a random variation and more likely to be your setting adjustments.
My Raspberry Pi blog and home of the BerryClip Add-on board : http://www.raspberrypi-spy.co.uk/
Follow me on Google+, Facebook, Pinterest and Twitter (@RPiSpy)
User avatar
Posts: 486
Joined: Tue Jan 10, 2012 8:48 pm
Location: UK
by Wozza63 » Tue Jun 26, 2012 11:13 am
dom wrote:
Wozza63 wrote:i managed to get 21.267s but then I upped it to 880 (from 850) and 520 (CPU and RAM) and now it won't power up properly, at least when I put in my mouse that is, it just shut down when i plugged in my mouse, so I will have to try and get into the terminal and set it back and hope for the best or I may be requesting a replacement sooner than expected, I didn't touch the voltage though


Just edit the config.txt file to a lower value in Windows or linux. No harm will have been done.


Lol I didn't realise you could do that, may make my life a lot easier, does that also mean that when i get my new memory card, I can just copy and paste these files to the new SD card?
Posts: 11
Joined: Tue Jun 26, 2012 8:08 am
by Lob0426 » Tue Jun 26, 2012 4:46 pm
On a windows machine you can copy the BOOT partition but not the rootfs. On a Linux machine you can use GParted to copy the rootfs partition also. To copy a partition from one card to the other in Linux both Partitions have to exactly the same size. It is a time consuming thing when using an 8GB card.
And as @dom stated you can edit in windows as the boot partition is FAT32. I keep a copy of each of my SD cards boot partition. When something goes wrong it is usually in the boot.
512MB version 2.0 as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1933
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by AndrewS » Wed Jun 27, 2012 2:23 am
Totally off-topic, but:
Lob0426 wrote:To copy a partition from one card to the other in Linux both Partitions have to exactly the same size. It is a time consuming thing when using an 8GB card.

That's only if you unmount and copy the entire partition with 'dd' (which you could also do in MacOSX). But in Linux there's no reason you can't create and format (to ext4) the partition on the second card, leave the ext4 rootfs on the first card mounted, and then just copy the individual files (rather than the entire partition) using something like http://www.mepis.org/docs/en/index.php? ... disk_trees
Haven't benchmarked to see if or how much faster this alternative approach would be though...
User avatar
Posts: 3626
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
by Lob0426 » Wed Jun 27, 2012 3:00 am
I use GParted in Ubuntu to copy from SD to SD. You do need to unmount them. I have created a whole new card with GParted that way. Easier to copy over to an image on the new card. There are a lot of risks in using dd from the command line for new users. I recommeded Gparted as it is less likely that a mistake will be made. The same reason I recommend WinDisk32imager. I have not lost a card yet this way. My way is slow but it gets everything!
512MB version 2.0 as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1933
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by ren41 » Wed Jun 27, 2012 5:26 pm
There is also PMagic - you can burn the PMagic ISO to disk; make sure your BIOS is set to boot first from CD put the CD in your drive and then reboot your Windows PC. PMagic boots up and builds a Linux environment in RAM, giving you a cut down Linux machine. You can repartition and there's also a file manager so you can see your whole SD card & replace corrupted files etc. I've used it several times & it's worked perfectly, including the initial repartitioning after I first burned my rpi debian image.

The card reader in my Windows laptop wouldn't read even the boot partition on my SD card so I was stuck!

ren

PS disclaimer - I am nothing to do with PMagic, I just liked it.
Posts: 99
Joined: Sat May 26, 2012 8:00 pm
by Yoriku » Sat Jun 30, 2012 2:34 am
Stability is relative... Higher numbers don't play quake, but do something else just fine :)

Image

my kernel is 3.2.20
Posts: 3
Joined: Mon Jun 18, 2012 7:24 pm
by Bergie5737 » Sat Jun 30, 2012 12:07 pm
Good day

I have overclocked my Raspi successfully and sometimes is worked well. I often found that short tests is not really good enough to check stability of the Raspi. A short test work well, but after an hour or so it may fail. I wanted to test my Raspi for a certain time so I came up with this C++ program. This is my first program, so I am sure there is many improvements. I would like to input what filename to output when I run it.

Basic operation.
A loop will run over and over while incrementing a counter. The faster the CPU, the more loops will run in a given time. The time to run the loop, the number of loops and a delay between loops, if required, is input. It output to a command line and a text file. The text file also include your current boot/config.txt file if you want to compare.

Long tests, I run when I sleep. I changed my code today, but can show a longer test.

Below, my code:
Please read the comments for detail.

Code: Select all
/* This program is to test the speed of a Raspberry Pi after overclocking.
 * It can also be used to set up either lots of short tests or a few longs tests
 * to "soak" the Raspi if you want to check its stability.
 *
 * It will first read your config file at /boot/config.txt and write it to
 * the output txt file.
 * Then it will ask you for input of the time in seconds each loop should take and the
 * number of times the loop(s) should repeat. There is an optional delay
 * in seconds if you want to pause the Raspi between loops.
 * It will output to a command line for every completed test, and the
 * number of times the loop has repeated.
 * The default txt output file can be changed as required.
 * The text file will be created in current directory and will be overwritten
 * every time it is run unless you change the name of the output file.
 *
 * Feel free to redistribute, copy or modify as you please.
 * Share your results online if possible.
 * I suggest a standard "quick test of 20 repeats of 1 sec each, no delay to see
 * how many times a loop repeats itself per second.
 *
 * For a soak, as long as possible. I guess it does not make much difference if
 * you choose 3600 x 1 sec or 1 x 3600 sec test. Both will take an hour. I tend to
 * vote for 60 x 60 sec soak test minimum, or if you want to sleep for 8 hours, 60 x (60 x 8) secs.
 *
 * The delay function is there as "duty cycle" if you think you are on the edge of disaster.
 * It gives nice "dips" in your taskbar cpu monitor for every repeat!
 *
 * Written by Jacques Bayman
*/
 
#include <stdio.h>
#include <time.h>
#include <iostream>
#include <fstream>
using namespace std;

int main()
{
   int runtime, stoptime, repeats, delay, starttime;
   double forloopcycles;
   double avg;
   char c;
// next two variables is used for writing and reading to your file respectively   
   ofstream myfile;
   ifstream readconf;

   
//change the filename to what you prefer. Must be in quotes and have .txt extension   
   myfile.open("stresstest920.txt");
   
//read /boot/config file and write it to above file   
   readconf.open("/boot/config.txt");
   myfile << "This is your current /boot/config.txt file:\n"
         <<"+++++++++++++++++++++++++++++++++++++++++++++\n";

//while there is characters in the file it reads them one by one and writes them
//one by one to your output file   
   while (readconf.good()) 
   {
      c = readconf.get();
      if (readconf.good())
         myfile << c;
   }
   readconf.close();
   
//draw a line in your output file   
   myfile << "========================================";
   
//Input and output control to terminal and output file   
   cout << "Enter number of cycles to test. ";
   cin >> repeats;
   cout << "How many seconds should each cycle take? ";
   cin >> runtime;
   cout << "Time delay in seconds before next cycle? ";
   cin >> delay;
   cout << "\n\nThis test will take +/- " << (repeats * runtime) + (delay * repeats) + 1  << " seconds to complete. \n\n";
   cout << "+++++++++++++++++++++++++++++++++++++++++++++\n";
   myfile << "\n\nParameters for this test is:\nNumber of cycles:\t" << repeats
         << "\nTime for each cycle:\t" << runtime
         << "\nDelay between cycle:\t" << delay;
         
   starttime = time(NULL);


//first for loop is the number of repeats you want. The "+ 1" is so that the first
//loop that is always slower, is ignored   
   for (int i = 0; i < repeats + 1; i++)
   {
      forloopcycles = 0;
      stoptime = time(NULL) + runtime;    //read current time and add runtime

//This is a bogus short loop that only run while i = 0. It gets rid of the
//first loop that is always slower. It let the test loop run for 1 second only      
      if (i == 0)
      {   stoptime = time(NULL) + 1;   }
      
//This loop is repeated until the stoptime above is reached. Loop repeat forever
//Note: this loop will run for the specified time set in beginning            
      for (;;)
      {
         forloopcycles++;
         if (time(NULL) >= stoptime)
            break;
      }
      
//This if is so that the first loop above is rejected since it is always slower than the other loops
//I don't know why, so I simply make it to ignore the first cycle
      if (i != 0)
      {
         cout << "For loop " << i << " the total cycles was " << forloopcycles / 1000<< " thousand.\n";

//Unedit the line below if you want to see a cycle by cycle repeat in output file as well         
         //myfile << "For loop " << i + 1 << " the total cycles was " << forloopcycles / 1000<< " thousand.\n";

// Averaging done this way since adding forloopcycles get seriously big, so buffer overflow
         avg = avg + (forloopcycles / repeats);
      }
         sleep (delay);   //The delay in seconds between cycles
   }
   

//This sets the number of digits for both terminal and output file.   
   cout.setf(ios::fixed);
   cout.precision(2);
   myfile.setf(ios::fixed);
   myfile.precision(2);
   
//final output to terminal   
   cout << "\n\n===============================================================\n";
   cout << "The average cycles in " << repeats << " repeats of " << runtime
       << " seconds each was " << avg / 1000 << " thousand";
      
//final to output file. "Ifs" help to make it look a bit better. Add billions of you want log tests
   myfile << "\n===============================================================\n";
   if (avg >= 1000 && avg < 1000000)
      myfile << "The loop was repeated an average off " << avg / 1000 << " thousand times for every cycle";
   if ( avg >= 1000000)
      myfile << "The loop was repeated an average off " << avg / 1000000 << " million times for every cycle";
      myfile << "\nTotal test time was " << time(NULL) - starttime << " seconds. \n";
   myfile.close();
   
   return 0;
}



And my current test output.
This is your current /boot/config.txt file:
+++++++++++++++++++++++++++++++++++++++++++++
arm_freq=920
sdram_freq=450
gpu_freq=300

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

Parameters for this test is:
Number of cycles: 10
Time for each cycle: 10
Delay between cycle: 0
===============================================================
The loop was repeated an average off 13.40 million times for every cycle
Total test time was 101 seconds.


Hopefully someone will find is usefull or at least try and, and send me critique on my effort. I don't yet know how to make it a standalone program, and would be gratefull if someone can show me the procedure.
Regards
Posts: 17
Joined: Sun Jun 17, 2012 4:09 pm
by DragonWinglet » Sun Jul 01, 2012 10:27 am
Hi!

I have a little problem here with sdram_freq, and did not find a solution here :)
for benchmarking Iam using SysBench.


When I run memory test in SysBench with arm800/sdram400, Transfer rate is 141 MB/s
When I run memory test in SysBench with arm880/sdram400, Transfer rate is 143 MB/s
When I run memory test in SysBench with arm880/sdram560, Transfer rate is 155 MB/s (still stable withnout overvolting)
But after I reach Transfer rate 160MB/s (still stable withnout overvolting), it cant ger more transfer rate.
So, now iam running sdram_freq at 2GHz, but transfer rate is still like approx 600Mhz and still stable.
It is faster then sdram_freq=400 so config.txt should be OK.

Looks like something is limmiting/blocking something else... Iam really confused :o
Posts: 1
Joined: Sun Jul 01, 2012 10:05 am
by Bergie5737 » Mon Jul 02, 2012 10:14 am
I've run a 10 hour soak test with following config as per my C++ program:
arm-freq 920
sdram-freq 450
gpu-freq 350

Test was 10 test cycles of 3600 seconds (1 hour) each with no delay.
The loop was repeated 4801.64 million times per test (hour)

I used VNC headless for this test.

I've added a USB keyboard and mouse and plugged it into my HD TV to see if it will fail. I did not run a 10 hour test though with all periphirals, but everything seems fine with no instability. As soon as I up the RAM speed to 500MHz, the Raspi struggle to boot, and fail within an hour. I will try and push the arm-freq up a bit more. My raspi is running three days now without reboot after the above test.
Posts: 17
Joined: Sun Jun 17, 2012 4:09 pm
by D.E.L.B. » Fri Jul 06, 2012 5:37 pm
Is it something risky to overclock the Raspberry Pi? I wouldn't mind overclocking the CPU to increase Quake III performance.
User avatar
Posts: 92
Joined: Sat Jun 09, 2012 7:16 pm
Location: Wales, UK
by dom » Fri Jul 06, 2012 5:54 pm
D.E.L.B. wrote:Is it something risky to overclock the Raspberry Pi? I wouldn't mind overclocking the CPU to increase Quake III performance.


My best guess is that with overclocking and overvolting it will still run reliably for years. It might not run for as many years, as if you didn't overclock/overvolt, but in all likelyhood the Pi will be obsoleted before it dies due to overclocking/overvolting.

However this is just my best guess.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4026
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by D.E.L.B. » Fri Jul 06, 2012 5:56 pm
dom wrote:
D.E.L.B. wrote:Is it something risky to overclock the Raspberry Pi? I wouldn't mind overclocking the CPU to increase Quake III performance.


My best guess is that with overclocking and overvolting it will still run reliably for years. It might not run for as many years, as if you didn't overclock/overvolt, but in all likelyhood the Pi will be obsoleted before it dies due to overclocking/overvolting.

However this is just my best guess.

So what's the difference with overclocking and overvolting? I know I might just be stating the obvious here, but does volting it just make the Pi to be able to go up to even higher numbers when overclocking, due to the increase in voltage?

P.S. I don't think I will overclock the Pi just yet, Pi's are still scarce to get a hold of, when a bunch more of them are available and up for being replaced I'll reckon I'll tinker with it then.
User avatar
Posts: 92
Joined: Sat Jun 09, 2012 7:16 pm
Location: Wales, UK
by dom » Fri Jul 06, 2012 6:59 pm
D.E.L.B. wrote:So what's the difference with overclocking and overvolting? I know I might just be stating the obvious here, but does volting it just make the Pi to be able to go up to even higher numbers when overclocking, due to the increase in voltage?


Yes, overclocking is harmless. But you are limited to perhaps 20% improvement.
Overvolting allows a higher overclock (e.g. up to 50%), but is the thing that impacts on chip's lifespan (a little).
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4026
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge