Running Ubuntu on Raspberry Pi 4? Here’s how to boost performance

If you are running Ubuntu on a low-configuration Raspberry Pi, you can enable kernel zswap functionality to improve desktop performance.

how to run ubuntu on raspberry pi with 2gb ram

Raspberry Pi 4 is a small device with useful features such as dual monitor support and fast Ethernet connection. If you’re looking for a simple yet reliable solution for your next DIY project, a Raspberry Pi can be a great base for it. Additionally, you can now easily run the Ubuntu desktop on your Raspberry Pi 4, even with 2GB of RAM.

Read below to learn how to improve Ubuntu performance on a Raspberry Pi 4 with only 2 GB of RAM. You can use this method to set up a full-fledged Ubuntu environment with access to a keyboard, mouse, and network.

Configure Ubuntu Desktop on Raspberry Pi 4

Ubuntu officially supports Raspberry Pi 4 Model B with 4GB and 8GB RAM modules. However, you can also run Ubuntu on Raspberry Pis with 2GB of memory. We will need to use a nifty Linux kernel feature called zswap for this purpose.

zswap compresses all processes before moving them to the swap file and checks if the smallest compressed size can fit in RAM. Unpacking a zswapped page is much faster than accessing swap. Thus, it results in a smoother user experience even after installing all the best Raspberry Pi apps.

Also, you don’t need to wait for the next LTS release to enjoy this feature. You can enable zswap in your current Ubuntu installation and enjoy the performance boost immediately. Open a terminal in your Ubuntu powered Raspberry Pi 4 and enter the command below:


sudo sed -i -e 's/$/ zswap.enabled=1/' /boot/firmware/cmdline.txt

Restart the machine once the command has finished its job and see for yourself the performance gain. You should find things like browsing and navigation faster than before.

Related: How to Install an Operating System on a Raspberry Pi

Configure Ubuntu on Raspberry Pi 4 with 2 GB of RAM

zswap has made it easier to run Ubuntu on low-config devices like the Raspberry Pi 4. Canonical is also working on other mechanisms like z3fold and lz4 compression to make Ubuntu run even faster on these devices.

If you’re still unhappy with the performance, try installing a lightweight operating system on your Raspberry Pi.

The 8 Best Lightweight Operating Systems for Raspberry Pi

Need to take advantage of the extra processing power of your Raspberry Pi? Try one of these lightweight Raspberry Pi operating systems.

Read more

About the Author

Source link

Steven L. Nielsen