Overclock Your Raspberry Pi Zero 2 to 1.4Ghz

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
the new raspberry pi zero two w is a great improvement over the original board but just how far can we push its performance let's find out [Music] [Music] hi and welcome to bytes and bits the new raspberry pi zero two w already gives a substantial performance boost over the original raspberry pi zero w but we can squeeze even more processing power out of it using overclocking so overclocking it's a technique where we run the processor the graphics card and the memory at a faster clock rate than on the standard device so doing this makes all the devices on the board run faster giving us our performance boost so to overclock a raspberry pi it's actually very easy we only have to edit the config.txt file stored in the root folder of the part of the boot partition now if you already understand how to do this then then please check the video description down below for links that let you jump forwards in the video to actually get to the settings that i used um unless this has allowed me to get the desktop running at 1.3 gigahertz and retropie running at actually 1.4 gigahertz but if you're not familiar with overclocking i'll now take you through the whole process now the processor on the raspberry pi doesn't always run at its full speed so when with the device is not doing very much for example when you're just sitting looking at the desktop it turns down the processor speed to save energy so we need a way first of all of seeing how fast the processor is running so that we can tell when our overclocking is actually working now we can easily do this by adding a plug-in to the taskbar panel so if you right-click on a blank area of the taskbar and then select the add panel items you'll see the panel preferences dialog box open up now make sure that the panel applets tab is selected and then click the add button to add a new plugin simply scroll down until you find the cpu freak front and plugin and then click the add button to put that on the panel when we overclock a processor it actually needs more energy to run and this extra energy gets dissipated as extra heat inside the chips on the board so they start to get hotter now the processor chip has built-in thermal protection so when it reaches its maximum operating temperature it will automatically slow the processor down so we need to monitor this temperature to make sure that we don't hit the thermal limit if we do this all of our overclocking settings will simply be turned off again we can add the cpu temperature monitor plugin to our task panel bar so now that we've added those panel items you'll see two extra icons in the taskbar the processor temperature is always on display but to see the processor speed we need to hover over the processor icon and as you can see at the moment because the computer isn't doing anything the processor speed has been turned down to 600 megahertz however if we start the browser application we put a processing load on the raspberry pi and it responds by turning the processor speed up to its maximum which is currently the default 1000 megahertz or one gigahertz now the whole point of overclocking is to make the raspberry pi run our software faster than the default settings so we obviously need a way of measuring how fast our board is running we can do this just by eye and just looking to see if our programs are working better but it's much easier to use benchmarking programs and these will actually put a number to the speed of our system so as we adjust our overclocking settings we'll then be able to see any small changes in the overall performance to install the benchmarking software the best way is to open up a terminal window we need to make sure that the whole system is fully up to date so first we need to update our database by using the sudo apt hyphen get update command and once that's finished running we can then do a full system update using the sudo apt-get full upgrade command and this will take a while to complete so so just leave it running until you get back to the normal system prompt so now that the operating system is fully updated we can install the benchmarking software the first package we'll install is sysbench so use sudo apt hyphen get install sysbench and susbench lets us run tests which will measure our processor and memory speed now to measure the graphic performance we'll use the glx gear software which is part of the mesa utils package so sudo apt hyphen get install mesa hyphen neutrals so as i said we will be using suspense to measure the speed of our processor and memory so so the processor speed is measured by getting it to calculate a number of prime numbers so if we use this command on screen at the moment it will calculate the first 10 000 prime numbers using all four processing cores and report back to us how long this process took the less time it takes to complete the faster the processor is running and if we change the number of threads to one then we'll actually measure the speed of a single core which again is a useful figure to to get hold off to measure the memory speed we use this command and this will continually access 1k blocks of memory until we've accessed a total amount of two gigabytes and again the performance is measured in how long it takes to complete the task our gpu benchmark is run with the following command and this will open up a window with some rotating gears and the software basically tries to draw each frame in the animation as fast as possible and report back to us how many frames per second it's managing to complete the more frames per second we get the faster our gpu is running so as i mentioned earlier to overclock a raspberry pi we simply need to edit its config.txt file and i find the easiest way to do this is using the terminal so if we use this command it will open up the file for our editing now if you scroll down you'll come to a commented out section with one of the basic overclocking parameters and all we need to do here is to type in our new settings save the file and reboot the computer so the settings that i'm typing in now are the default speeds for the raspberry pi zero two we'll then start altering them to get the board running faster now the settings really work in pairs and it's best to adjust one pair at a time so you can see what effect your changes have so we'll start with the main processor core space which is adjusting using the arm frequency parameter so the number specified will set the processor clock speed in megahertz so 1200 will set the clock speed to 1.2 gigahertz the over voltage parameter can be used to help with some instability as we increase the clock speed now i i've explained how all this works in detail in a previous overclocking video and i'll put a link to that in the description down below but basically as we increase the clock speed the actual shape of the electronic clock signal can cause the processor to crash and by increasing the processor voltage we can tighten up this shape allowing the processor to continue working at these higher speeds but for now we will just change the frequency and see what happens so to save this file press the control x then yes to save it and then press enter to save it with the same file name we then need to reboot the raspberry pi and run the benchmark test to see if we've made any improvements now sometimes or or actually quite often we'll either find that the system won't boot at all or in this case it will crash while we're running our tests and this is actually quite normal as we're trying to find the best overclocking setting by trial and error now if the system crashes we need to re-edit that config.txt file to try a new set of values now if if your raspberry pi is able to boot you can just edit the config.txt file using that nano program in the terminal but if you can't get the computer to boot um the the easiest way is to simply take the sd card out of the raspberry pi and unplug it into a normal pc you'll then find that you have a disk drive named boot and inside the root of that you'll see the config.txt file which you can then edit with any sort of text editor such as notepad or atom now one of the things to bear in mind is that what's possible with overclocking does rely on individual device properties so so when chips are fabricated that they have slight variations um the quoted spades for devices are always guaranteed to work but naturally the absolute maximum speed any one single chip can run at depends on how these random manufacturing variations came together now my raspberry pi zero two will be different to yours you might be able to get more speed or you might crash with my settings um it's really just down to potluck so when it's time to set the overclocking settings um there's usually a process we go through and an order we do them in so i i always start with the processor frequency i will gradually increase it and as the system crashes i'll then gradually increase the over voltage setting to try and bring it back to a stable state and eventually you'll get to a state where you've got a process of speed you're happy with and a stability in the system once you've got that we can then start to adjust the core frequency and gpu frequency and and both of these then relate to the actual graphics processor um i start by increasing both together and eventually i'll hit a limit for the core frequency value and then i can try increasing the gpu frequency value to try and get slightly more performance out of it and then once we've got some settings for our gpu we can go back in and use the glx gears benchmark to see if the system is stable and runs any faster so for our memory speed we have the ram frequency and the ram over voltage and these work in very much the same way as the processor frequency so we increase the round frequency and then try to pull it back into proper timing using the ram over voltage now after a bit of playing about um i ended up with the following set of um parameters for my raspberry pi zero two running the raspberry pi os again i'll i'll put links to my main project page on my main website and which will have all of these settings listed out for you so as you can see i managed to get the processor speed up to 1.3 gigahertz and overall this gave around a 25 increase in performance and you can see that from these benchmark scores now my main aim um for this increase in performance was to get more processing power for my raspberry pi zero two when it was running retropie to emulate retro gaming systems now to edit the config.txt file in retropie you can either plug the sd card straight into your main pc and edit it that way or you can call up the emulation station menu when it's running select quit and then exit emulation station and this will drop you back into the raspberry pi terminal now i find that retropie it really does not like you playing with the gpu settings for some reason so so anything above the default setup seems to crash the system after a few minutes of play so i simply deleted those settings and left them as standard and then just played with the processor and ram frequencies and on doing this i was actually able to get a stable 1.4 gigahertz for the processor another was using these settings listed now so i did run the benchmarking tests again and as you can see from these performance figures it actually did give better performance than the 1.3 gigahertz processor setting running with the gpu tuning and that even was on the gpu benchmarks but unfortunately although i could get it to run stably for a short time at 1.4 gigahertz in the raspberry pi desktop um it really wasn't stable and it it just simply crashed after a few minutes so now that we have the system running stably at the overclock settings the one thing which we do have to look at which we mentioned earlier it is overheating so if if we run the gpu test in the desktop with the processor set to 1.3 gigahertz you can see here that the temperature of the processor does start to get very high so to combat this you you really need to add some cooling to the processor chip the simplest way is to buy some stick on heatsinks and they simply are little bits of aluminium which will stick to the top of the processor and they do help quite a lot to keep it cool you can also buy metal casings which have heat dissipation built into them or you can add some airflow across your heatsink and you can see here all i'm simply doing is blowing with my with my mouth mouth across the heatsink and you can see that does um drastically reduce the core processor temperature now the other thing you'll have to think about um in terms of temperature increase is is how you take that into account with the way in which you're going to be using this raspberry pi and installing it so i intend to put my raspberry pi into a handheld gaming device so i may not have enough room even for a heatsink and even if i do it's going to be in a fairly sealed container with without very much moving air um which would take the heat away so even though i can run my processor at 1.4 gigahertz i might not be able to do that and use all of that power safely so as i did say earlier my ultimate goal is to improve the performance of retro gaming emulators so let's have a look at how a 1.4 gigahertz raspberry pi zero two compares to the stock board looking at arcade emulation first in my previous overview video and i'll put a link to that in the description down below we saw how the new raspberry pi allowed the main emulator to run at pretty much full speed so overclocking is simply going to give our raspberry pi some extra performance in reserve so hopefully it will cope with any game that we throw at it hard to emulate games on the sega mega drive ran fairly close to full speed on the stock raspberry pi zero two hitting a burned about sort of 50 frames per second on some games but running at 1.4 gigahertz we now get a steady 60 frames per second in pretty much every game that i've tried vector man uh which is playing on screen at the moment uh he was dipping down to the mid to low 50s on the stock board but now again as you can see it's running at a constant 60 frames per second gunstar heroes as well actually was dipping below 50 frames per second on the one gigahertz board but of course the 1.4 gigahertz speed boost is now keeping it up at that constant 60 frames per second now i had hoped that with a bit of tuning the raspberry pi zero two would be able to run some of the less intensive nintendo 64 games uh super mario 64 does run a bit better but it's still not really a playable game perhaps with some extra tweaks to the emulator itself it will run better but i think we really are at the limits of what this little raspberry pi can do [Music] playstation portable or psp games are going to be very hit and miss some of the very low power games will run but as soon as you start to put a bit more stress on the emblator the the raspberry pi isn't going to be able to keep up a little big planet isn't a particularly processor heavy game and the raspberry pi does cook very well with the first level but as we'll see as soon as we get more objects onto the screen and having these needed to be modeled very quickly the pi runs out of oomph original playstation emulation was good on the stock raspberry pi zero two but again with this little bit of overclocking we get very stable full speed emulation so all the games i've tested ran perfectly and we're running colony wars here which is actually one of the harder ones to emulate with a lot of 3d animation and things happening on the screen and as you can see we are getting pretty much a consistent 60 frames per second all the way through here no matter what's actually happening within the game itself so that's really pleasing to see that we are getting very very good playstation one emulation with this really small form factor raspberry pi02w so getting the new raspberry pi zero two to run at 1.3 gigahertz or even up to 1.4 gigahertz um is fairly easy to achieve you do need to watch that temperature but it does seem to be very stable at these new clock speeds now overall you're going to get a good 25 performance increase across the board from a retro gaming point of view although this doesn't unlock any of the slightly more modern gaming consoles um it does consolidate pretty much everything up to the original playstation with smooth full speed emulation now i haven't yet tried increasing um the resolution inside the emulators you can run them at higher than native resolution and again this is this is probably somewhere where we could make use of this extra processing power now i hope you found this video useful and please do click that like button and subscribe to my channel if you want to see any more of my videos don't forget to check out my website and i'll put links to that in the description down below and there you'll find more information all of the code and settings used in this video and on many more gaming coding and making projects so have fun playing with your new raspberry pi zero 2w and i look forward to seeing you again very soon so bye for now for more games programming electronics projects and retro gaming please make sure you like this video subscribe to my youtube channel and visit my website you
Info
Channel: Bytes N Bits
Views: 2,077
Rating: undefined out of 5
Keywords: raspberry pi zero 2, retropie, retro gaming, overclocking
Id: KZIgXUqya44
Channel Id: undefined
Length: 20min 52sec (1252 seconds)
Published: Thu Nov 04 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.