/

Optimize Linux System Performance with Tuned: Tweak Your System Effortlessly!

If you’ve ever felt your Linux system slowing down or becoming unresponsive, don’t rush to blame your hardware! Before upgrading your RAM or SSD, try Tuned — a Linux tool that optimizes system performance with minimal configuration. Here’s how it works!

image
A virtual machine, gasping for air, desperately seeking more power as it runs around in, trying to keep up with all the demanding applications and tasks thrown way, finally collapses in a heap binary exhaustion.

What is Tuned?

Tuned is a background service (daemon) that dynamically adjusts Linux kernel settings, CPU behavior, disk I/O, and other parameters based on predefined profiles. It’s perfect for users who want to boost speed or save power without diving into manual configurations.

Key Features of Tuned

  1. Pre-Built Profiles: Tuned offers dozens of optimization profiles for various use cases:
    • throughput-performance: Maximizes speed for servers.
    • powersave: Reduces power consumption for laptops.
    • latency-performance: Minimizes delays for real-time apps.
    • virtual-guest: Optimizes settings for virtual machines.
  2. Adaptive Tuning: Automatically adjusts settings based on workload.
  3. Custom Profiles: Create your own profiles if the defaults don’t fit.

Install & Use Tuned

Step 1: Install Tuned

Open your terminal and run the command for your distro:

Fedora/RHEL/CentOS:

sudo dnf install tuned

Ubuntu/Debian:

sudo apt install tuned  

Step 2: Enable the Service

sudo systemctl enable --now tuned  

Step 3: Choose a Profile

List available profiles:

sudo tuned-adm list  

Activate a profile (e.g., throughput-performance):

sudo tuned-adm profile throughput-performance  

Step 4: Verify

Check the active profile:

sudo tuned-adm active  

Popular Profiles in Action

For Laptops:

sudo tuned-adm profile powersave  

(Extends battery life, slightly reduces performance).

For Database Servers:

sudo tuned-adm profile latency-performance  

(Speeds up heavy queries).

For Virtual Machines:

sudo tuned-adm profile virtual-guest  

For Virtual Machines:

sudo tuned-adm profile virtual-guest  

(Optimizes I/O and memory for VMs).


Create Custom Profiles

If default profiles don’t fit your needs, build your own!

Create a profile directory in /etc/tuned/:

sudo mkdir /etc/tuned/my-custom-profile  

Add a tuned.conf file:

sudo nano /etc/tuned/my-custom-profile/tuned.conf  

Define your settings. Example:

[main]  
include=throughput-performance  

[sysctl]  
vm.swappiness=10  

(Combines throughput-performance with lower swap usage).

Activate your profile:

sudo tuned-adm profile my-custom-profile  

Pro Tips

Choose Wisely: Match profiles to your workload. Avoid throughput-performance on laptops to save battery.

Monitor Results: Use tools like htopiostat, or vmstat to track performance changes.

Reset to Default:

sudo tuned-adm profile balanced  

Final Thoughts

With Tuned, you can transform your Linux system into a speed demon or a power-saving champion in just a few commands. Best of all, it’s lightweight and beginner-friendly! Experiment with profiles or craft custom ones — your old laptop might just feel new again.

Want to dive deeper? Check out the official Tuned documentation. 🚀