While the Raspberry Pi is powerful, not every user knows how to fine-tune the device for the best experience. Check out Mytour's article below to learn how to tweak and accelerate your Raspberry Pi for smoother and faster performance.
Enhance Raspberry Pi Speed for a Smooth and Swift Experience
1. Ensure Stable Power Connection for Refined Performance
To extend the lifespan and accelerate your Raspberry Pi, the first solution is to connect the device to a stable power source. Raspberry Pi 3 needs to be powered through the micro USB port, and the ideal solution is to connect it to a 5V 2.5A power adapter.
While directly connecting Pi via USB port or using a phone charger may be more convenient, the power source may not be stable.
2. Opt for a Lightweight Operating System
Install distributions that consume fewer resources for better efficiency. To boost Raspberry Pi performance, keep everything at a minimum, and some Linux distributions are designed for that purpose.
Even Raspbian offers Lite versions with a lightweight footprint. However, consider DietPi or RISC OS (not Linux) for a lightweight operating system experience.
3. Remove Bloatware
If your Raspberry Pi is running out of free space, you can reclaim nearly 1 Gigabyte of space on the microSD card by deleting unnecessary pre-installed software.
For instance, Raspberry Pi 3 is suitable for use as a desktop, but we may not need software like LibreOffice. Therefore, it's advisable to delete these software to free up memory.
Open the Terminal window and run the following commands:
sudo apt purge libreoffice*
sudo apt clean
sudo apt autoremove
In case LibreOffice is not the space-consuming software on Pi but other applications like Wolfram, you can use similar commands, replacing libreoffice* with wolfram-engine or other software names.
4. Optimize JavaScript Performance
If you need to browse the web on Raspberry Pi, you can use Chromium, Vivaldi, or other lightweight browsers. Besides limiting the number of open tabs, disabling JavaScript is also a way to enhance web browsing speed.
Disabling JavaScript on different browsers will vary. To disable JavaScript on Chromium, you access Menu => Settings => Advanced => Privacy and security => Content settings => JavaScript and switch from Allowed to Blocked.
5. Overclocking
Overclocking Raspberry Pi is an ideal solution to accelerate its performance for smoother and faster operation. This is particularly useful if you use Pi as a media center with Kodi or for playing classic games.
Tools for overclocking Raspberry Pi are available for most distributions. On Raspbian, you can access Raspberry Pi configuration in PIXEL or use the raspi-config command-line utility.
Here, use the arrow keys to select Overclock, then choose the speed you want to use. For the best results, it's recommended to choose a level just above, save, and restart the Pi.
After overclocking Raspberry Pi, consider some cooling solutions. Also, note that overclocking may reduce the device's lifespan. Most Raspberry Pi devices support overclocking, but Raspberry Pi 3 is the most suitable.
6. Use High-Speed microSD Cards
Whether you're using Raspberry Pi Zero or Raspberry Pi 3B+, the speed of the microSD card is crucial. The microSD card significantly enhances Raspberry Pi performance.
First, avoid using memory cards from lesser-known manufacturers. It's best to choose cards from reputable manufacturers like Samsung, SanDisk, or Kingston for the highest quality. Also, ensure you're using the correct type of microSD card for Raspberry Pi. Many Pis come with microSD cards, often Samsung microSDHC cards.
7. Limit the Use of SD Cards
In addition to the power source, the SD card is the weakest link in Raspberry Pi. Both the original Raspberry Pi model and newer models use standard SD cards, which are prone to errors.
Firstly, ensure you're using a reliable SD card, preferably a microSDHC card as it has error-correction capabilities and is faster than cheaper alternatives.
Additionally, how you use the microSD card is crucial. Do not interrupt the power to the device without shutting it down.
If the operating system is running but not displaying, the likelihood of OS and microSD card errors is quite high. The solution is to use the safe shutdown option in the chosen operating system. Besides the shutdown button, you can also use the following command:
sudo shutdown -h now
This is one of the fundamental commands that Raspberry Pi users should be familiar with. If you want to schedule a shutdown time, use the command:
sudo shutdown -h 12:01
8. Boot from USB / HDD
You might not be aware, but besides booting from the microSD card, Raspberry Pi can be reconfigured to boot the operating system from a USB drive.
This method also helps to accelerate Raspberry Pi for smoother and faster operation while expanding storage capabilities on Pi. However, this approach is only available and functional on Raspberry Pi 3.
9. Expand External Memory
If you have a suitable external hard drive, you can consider using it as additional storage for Raspberry Pi files. USB drives, SSDs, and USB flash drives can all be used as supplementary storage for Pi.
10. Use ZRAM as a Fast Storage
Finally, Pi's hardware can be utilized to create fast storage on the device. While the data stored here is not accessible at boot, it's not crucial as we often store data on cloud services or mobile storage devices.
ZRAM utilizes the hardware integrated into Raspberry Pi to handle data, instead of relying solely on the microSD card. Although microSD cards are fast, ZRAM is even faster.
To download the code, visit GitHub:
sudo wget -O /usr/bin/zram.sh https://raw.githubusercontent.com/novaspirit/rpi_zram/master/zram.sh
Next, create an executable file and then edit the rc.local file to run the downloaded script on Pi startup:
sudo chmod +x /usr/bin/zram.sh
sudo nano /etc/rc.local
Locate the line exit 0, and above it, add the following code:
/usr/bin/zram.sh &
Press Ctrl + X to save the changes and exit.
After rebooting Pi, you will effectively utilize ZRAM swapping instead of relying on the slower microSD card capacity.
In this article, Mytour has just guided you on how to speed up Raspberry Pi for smoother and faster performance. If you have any questions or queries, readers can leave their comments below the article.
Related to Raspberry Pi, our next article will cover the step-by-step process of installing an operating system on Raspberry Pi. It's an easy-to-follow guide, so you just need to check it once and follow along.