As a Linux user, particularly on Ubuntu (though this is relevant for most major distributions), you might have experienced your system becoming slower over time.
This can happen even with powerful computer hardware. If you’re looking for an Ubuntu performance optimization guide, you’ve come to the right place. If your Linux system feels sluggish, or tasks are taking longer than expected, there are several potential reasons. Fortunately, there are also many solutions to boost performance and improve Linux system efficiency.
Some tasks and services may take a long time to execute, despite your processor being capable of handling many operations easily. The reasons vary, but the most frequent ones are:
This article will guide you on pinpointing the causes of your system’s slow performance (including swap memory, RAM, CPU, hard disk health, and startup services). We will explore common techniques to speed up Ubuntu 24.04 performance by optimizing hardware, software, and configuration.
We’ll also cover best practices to maintain your Linux system’s performance over the long haul. By the end of this article, you will be equipped to troubleshoot and enhance your Linux system’s speed.
Read: Best Partition Managers for Linux Users
To enhance your system’s performance, consider installing the GNOME 3 desktop. It’s designed for efficient resource usage and smooth graphics, but it needs robust hardware. If you have an older computer, you might find it slow. A good solution is Lubuntu, a lightweight version of Ubuntu that uses an LX-based desktop environment. Install it using this terminal command:
sudo apt-get install lubuntu-desktop
Alternatively, you can select an Ubuntu version that includes Lubuntu by default. Also, think about using lighter alternatives for common applications. For instance, use GDebi for installing packages, AbiWord instead of LibreOffice Writer, or AppGrid instead of the Ubuntu Software Center. This contributes to overall Ubuntu performance optimization.
Read: How to speed up your laptop: Here are 10 tips
To see a list of services that launch when your computer starts, open your terminal and execute this command:
service --status-all
If your system uses systemd (a comprehensive system and service manager), you can check the boot-up time with this command:
systemd-analyze
This shows how long the kernel, userspace, and initrd took to start during boot. This is a key step to improve Linux system efficiency.
To list enabled services (those that start automatically) using systemd’s systemctl, use:
systemctl list-unit-files --state=enabled
To see a list of running services, sorted by how long they took to initialize, use the blame option with systemd-analyze:
systemd-analyze blame
Use the Enter key to scroll through the list, and press ‘q’ to exit.
This helps you identify services that took an unusually long time to start. Effectively, this lets you optimize Ubuntu startup services. To prevent a service from running at boot, use:
sudo systemctl disable service_name
On Ubuntu 24.04, you can also use a graphical application called “Startup Applications” to manage programs that launch at startup. Find it in the Activities menu.
When the window appears:
Select the application you want to manage, and click “Remove” to stop it from starting automatically.
Read :How to install and uninstall applications on Ubuntu ?
Ubuntu releases updates to address known problems and enhance the system’s overall performance and efficiency. Regular updates are a cornerstone of any Ubuntu performance optimization guide. It’s crucial to understand the Ubuntu release cycle to know which version you can upgrade to. Canonical releases a Long Term Support (LTS) version every two years in April, which is used by the vast majority of Ubuntu installations. Interim releases are published every six months, providing users with newer features for improved stability, usability, and performance.
To get the latest updates, open the terminal and run: sudo apt-get update
. If your release is outdated, check for a major upgrade by running: sudo apt-get upgrade
and press “Y” when prompted. Remember to back up your files before upgrading.
Solid State Drives (SSDs) offer significantly faster read and write speeds compared to traditional mechanical hard drives. This is one of the most impactful ways to speed up Ubuntu 24.04 performance. Be sure to purchase the correct model for your specific computer.
Ubuntu 24.04 requires at least 2GB of RAM for smooth operation. Increasing your RAM can significantly improve your computer’s overall speed, especially if you use resource-intensive applications like video editors or games. This is a direct way to improve Linux system efficiency.
Read: How to encrypt a USB stick on Ubuntu
You can manually install new RAM modules. Ensure you get the correct type that is compatible with your computer’s RAM slots.
To check how much RAM your system currently has, use this terminal command:
free –m
To see your Ubuntu RAM type and other details, run:
sudo lshw -c memory
Read: How to fix high memory usage in Ubuntu
Using a software update mirror that’s geographically close to you can significantly speed up downloads. This simple step can surprisingly improve Linux system efficiency during updates. Ubuntu software repositories are mirrored (copied) in many countries. While this is usually selected automatically during setup, it’s good to verify you’re using the nearest mirror.
To adjust mirror settings, go to Activities and type “Software”.
Select the option labeled “Software Updater,” as shown above. A new window will open.
Click the “Settings” button. This will bring up another dialog box.
To choose the server closest to your location, click the dropdown menu next to “Download from”. Alternatively use the shell script “apt-fast”, that can be used as wrapper for “apt-get”, to automatically download packages from various locations. To try using that tool, install it from the official PPA by running these commands:
sudo add-apt-repository ppa:apt-fast/stable sudo apt-get update sudo apt-get install apt-fast
Read: What you need to do to secure Ubuntu
To improve application loading times, you can use Preload, a daemon that runs in the background. It analyzes how you use software and caches frequently used applications, making them launch faster. This is a passive way to speed up Ubuntu 24.04 performance.
To install Preload on Ubuntu, open a terminal and run:
sudo apt-get install preload
After installation, restart your computer. Preload will run in the background, and you should notice that your frequently used applications open more quickly.
Swap space can help speed up your system if your Linux machine doesn’t have enough RAM to handle its workload. Proper swap configuration is part of a complete Ubuntu performance optimization guide.
When you install Ubuntu, a dedicated swap partition is usually created on your hard drive. Over time, you might need to increase the swap size. You can do this using GParted, Ubuntu’s default disk management tool.
Read: How to fix : Unable to install GParted on Ubuntu
In your Activities, type “GParted” and open it. If does not show up, you would need to install it using the command :
sudo apt install gparted
Now you can invoke gparted by typing: gparted
in the terminal. It will bring up the window shown below :
You can, for example, shrink your main partition after deleting the existing swap partition.
Read: How to increase swap space in Linux
After that, create a new partition to allocate more space to swap. Refer to the GParted help manual if needed. Be very careful when resizing partitions, as it’s a sensitive operation. Always back up your data beforehand.
As you use your computer, open applications, running processes, and services accumulate, both in the foreground and background. This can slow down your system because resources like RAM, swap, and CPU are being used. A simple solution is to shut down your computer at least once or twice a week. Simply putting it to sleep doesn’t solve the problem, as the processes remain active. This simple habit can significantly improve Linux system efficiency.
Read: How to Troubleshoot and Optimize Ubuntu Startup: Manage Systemd Services for Faster Boot Time
Over time, unnecessary files can build up on your system. This can impact Ubuntu’s performance, especially if you don’t have an SSD. Uninstall applications you no longer use and remove unnecessary files (check your Downloads folder, for example). Keeping your system clean is essential for long-term Ubuntu performance optimization.
To clear the temporary cache used by `apt-get`, run:
sudo apt-get clean
You can also safely remove unused packages and dependencies with:
sudo apt-get autoremove
Read: how to keep your Ubuntu clean
You might have noticed that a hot computer runs slowly. Overheating can negatively affect overall system performance. Two tools, CPUFREQ and TLP, can help mitigate this. Managing temperature is a key, and often overlooked, aspect of how to speed up Ubuntu 24.04 performance.
The CPUFREQ indicator lets you adjust CPU algorithms, allowing the processor to change its frequency based on temperature and power consumption. Install it with:
sudo apt-get install indicator-cpufreq
After restarting, consider using the “Powersave” mode.
To install TLP, run these commands:
sudo add-apt-repository ppa:linrunner/tlp sudo apt-get update sudo apt-get install tlp tlp-rdw
To start TLP, use:
sudo tlp start
TLP will then run as a background process.
Read: How to save power on Linux Ubuntu/Debian using cpufreq
As mentioned earlier, a hot CPU might be caused by intensive computations from background applications, some of which may be unnecessary. A key part of any Ubuntu performance optimization guide is knowing how to monitor your system. To check the current CPU load, use the top
command, a Linux system monitor. It offers insights into a Linux server’s performance and health.
IT administrators rely on system monitors, like top
, to track key metrics, including CPU usage, memory consumption, and running processes, in real time. Understanding top
‘s output helps identify resource bottlenecks, troubleshoot problems, and optimize performance. It’s an essential skill for Linux server administrators. top
provides granular visibility into server operations with robust filtering and customization options.
The top
utility allows you to sort processes by CPU usage. Run it with:
top
The screenshot shows processes that are straining the CPU. You can terminate them using the kill command.
Read: Ubuntu/Debian monitoring tools guide for system administrators
To monitor your Linux Disk I/O (Input/Output) usage, you can use iotop
, a free utility similar to top
. It displays a table of I/O usage by processes or threads. Install it with:
sudo apt install iotop
After installation, start iotop
with:
sudo iotop
In the screenshot above, the system is idle, as indicated by zeros across the screen. You might occasionally see small, positive values, representing data being read or written, as shown below for the systemd-journald process:
You can now identify processes that are consuming a lot of I/O resources and take appropriate action. This helps to finely tune and improve Linux system efficiency.
Read: What to do when Ubuntu freezes
A common reason for a slow Linux system is having too many open applications or running processes, which consume resources like RAM and CPU. Another issue is not shutting down the system regularly, leading to a buildup of unnecessary background processes. To address these, close unused applications and shut down your system regularly. Additionally, using Linux performance monitoring tools can help you diagnose and resolve system slowdowns effectively. By following this Ubuntu performance optimization guide, you should be able to significantly speed up Ubuntu 24.04 performance and enjoy a more responsive system.
The post Maximize Ubuntu 24.04 Speed and Efficiency: A Complete Tuning Guide appeared first on net2.
Welcome back, data scientists! In my previous post, we explored how easy it is to…
In this article, we will see how to install vLLM on Linux using 4 easy…
Welcome to the Ubuntu Weekly Newsletter, Issue 880 for the week of February 16 –…
Welcome to the Ubuntu Weekly Newsletter, Issue 880 for the week of February 16 –…
The Ubuntu team is pleased to announce the release of Ubuntu 24.04.2 LTS (Long-Term Support)…
OpenSSH is a free and open-source implementation of the Secure Shell (SSH) protocol. It provides…