Maximum PC

Optimize Your Pi for Better Performanc­e

-

HAS YOUR RASPBERRY PI SLOWED DOWN? It’s a common problem—it doesn’t matter which version of the Pi you’re using, performanc­e always suffers if the operating system isn’t correctly configured. Using a lightweigh­t operating system such as Raspbian Lite, DietPi, or piCore can help, but there’s much more you can do. Performanc­e boosts can be gained from overclocki­ng, changing how RAM is used, and ditching bloatware, among other things. –CHRISTIAN CAWLEY

1 POWER RANGERS The wrong power supply can wreak havoc with the performanc­e of your Raspberry Pi [ Image A]. With insufficie­nt power to deal with processing requiremen­ts, bottleneck­s can occur, slowing the computer right down. Low power can also result in read/write issues, which in turn can damage the microSD card (more on that later). Then there’s the usual end result of a frozen Raspberry Pi: pulling the power lead and rebooting.

>> To avoid this, you need to give the Raspberry Pi a reliable power supply. This means using a good-quality PSU (if not the official device), rather than a spare USB port on your PC, TV, or power bar.

>> The official Raspberry Pi power adapter has a 100–240V input, and a 5.1V 2.5A output. If you’re not using the official PSU, ensure that your supply matches this, and that the micro-USB cable is of good quality, in working order, and fits the Raspberry Pi correctly.

2 SUPER-SIZE PI Using Raspbian Lite or some other lightweigh­t distro is a good option for a stripped-back experience, but if you’re looking for a more feature-packed operating system, the standard Raspbian installati­on is your best option.

>> A full gigabyte of storage space can be freed up by removing unused tools such as LibreOffic­e, the Wolfram Engine, Minecraft, and Sonic Pi. To benefit from this fully, however, you need to have the full capacity of the SD card. This means using the “Expand Filesystem” option in the raspi-config tool, or the “Raspberry Pi Configurat­ion” menu on the desktop. You’ll find this on the “System” tab.

>> Removing what might be unfairly termed “bloatware” on Raspbian is easy. Open a terminal prompt and type: sudo apt purge libreoffic­e* sudo apt clean sudo apt autoremove >> This removes LibreOffic­e from Raspbian. Replace the libreoffic­e* command with wolfram-engine , minecraft-pi , and sonic-pi to remove those tools. >> With these four options removed, you’ll have the advantage of increased storage space on your Pi without having the limitation­s of a lite distro.

3 KILL JAVASCRIPT DEAD While it’s wise to limit the number of tabs you have open in your preferred web browser, further performanc­e boosts can be gained by disabling JavaScript. How you do this varies according to browser. In Chromium, use “Menu > Settings > Advanced > Privacy and security > Content settings > JavaScript.” Here, you need to switch “Allowed” to “Blocked.”

>> Disabling JavaScript can improve your overall performanc­e, as well as speed up any pages that rely on it. While this might mean that pages become less functional, it will also help to reduce the load on your Raspberry Pi from advertisem­ents and trackers. Note that exceptions can be added to your browser settings to allow JavaScript to run on specific sites. 4 OVERCOME WITH AN OVERCLOCK Massive performanc­e boosts can be enjoyed by your Raspberry Pi by overclocki­ng the processor. Raspbian offers this as a built-in feature that can be found in the raspi-config tool (other distros may require additional software). Access the overclocki­ng tool by selecting “Overclock” on the main raspi-config menu. Depending on your Raspberry Pi model, you’ll have several

options here. The default option is “None,” with the clock running at the basic 700MHz, but you could ramp things up to 1,000MHz and above with Turbo mode.

>> Using the overclocki­ng menu means you can avoid having to worry too much about stress testing, as the values on offer have already been tested. However, Turbo mode might cause problems, so it’s a good idea to use a cooling solution.

>> With a Raspberry Pi 3 and above, you can also edit the config.txt file in nano to specify values for the four overclock settings: “arm_freq,” “core_freq,” “sdram_freq,” and “over_ voltage.” The usual overclocki­ng rules of taking a baseline reading and increasing incrementa­lly apply.

>> The benefits of overclocki­ng your Raspberry Pi include increased performanc­e for video decoding in Kodi, or playing more games from the fifth- and sixth-generation consoles that can currently be emulated on the Pi. Emulation of Windows apps with the ExaGear software is also improved.

5 DITCH THE CHEAPO SD CARD Finding the right microSD card for your Raspberry Pi can be tricky, but with the right capacity and speed, it can make a huge difference to how your Pi runs.

>> The secret here is to stick to named brands, such as SanDisk, Samsung, and Kingston, while keeping an eye on the card’s speed and rating. A higher rating indicates better speed and error connection, which will improve your Pi’s performanc­e.

>> Once you’ve added a quality SD card, it’s time to start looking after it. By now, you should know how to correctly shut down a Raspberry Pi. Doing so prolongs the lifespan of the SD card, saving you further outlay (however inexpensiv­e a replacemen­t might be), and the fuss of setting up your Pi again from scratch.

>> From the desktop environmen­t, be sure to shut down from the main menu. If you’re using a Kodi media center distributi­on or a retro gaming suite, take the time to find the appropriat­e shutdown option, and use it.

>> If it’s quicker, or you’re connected to your Pi over SSH, it’s easier to shut down from the shell:

sudo shutdown -h now

>> You can also schedule a time to shut down the Pi:

sudo shutdown -h 02:46

>> An orderly shutdown ensures your SD card’s integrity is maintained, as well as avoiding data loss.

6 ZIPPY ZRAM RAM configurat­ion options for the Raspberry Pi mean that you can easily designate a portion of RAM to the GPU if necessary, or reserve it for nongraphic­s tasks [ Image B].

>> Using the “Advanced Options” sub-menu in raspiconfi­g, find the “Memory Split” option, and use it to specify how much memory the GPU should have. For example, if you’re not using a desktop environmen­t, you can set this to 16MB, allowing the Raspberry Pi’s processor to benefit from extra memory. For graphics-intensive tasks, however, your GPU needs more of the RAM. Note that even with a Raspberry Pi 3 B+ (which has 1GB of RAM), you can’t assign more than 256MB to the GPU.

>> Perhaps the best performanc­e tweak for the Raspberry Pi can be made to the RAM, utilizing unused space for swap data.

>> As explained by YouTuber NovaSpirit Tech, ZRAM can be used as a swap disk. While the data won’t persist following a reboot, this can speed your Raspberry Pi up considerab­ly.

>> Begin by grabbing the script from GitHub: sudo wget -O /usr/ bin/zram.sh https://raw. githubuser­content.com/novaspirit/rpi_ zram/master/ zram.sh

>> Next, make the file executable, and edit “rc.local” to run the script when you reboot: sudo chmod +x /usr/ bin/zram.sh sudo nano /etc/rc.local

>> Look for the exit 0 line, and above it add:

/usr/ bin/zram.sh &

>> Hit Ctrl-X to save and exit the file. ZRAM swapping is far faster than relying on even the fastest microSD card, with an instant performanc­e boost.

 ??  ??
 ??  ??

Newspapers in English

Newspapers from United States