ruk·si

🐧 Linux
Speed Optimization

Updated at 2013-02-16 23:59

This note is about speeding up Linux operating systems.

Most efficient way to speed up your machine is to rebuild your kernel while removing anything you do not need. The lazy way is to use Con Kolivas kernel patch that is optimized for desktop use.

# Download your kernel and tools
sudo apt-get install linux-source
# OR
yumdownloader --source kernel

# Get the patch
wget <URL>

# Move to same folder with the kernel

# Apply the patch
patch -pl < patch-3.*-ck1

# Rebuild kernel and apply it to your distro.

Review All Running Software

Switch for more lightweight versions e.g. Firefox/Chrome -> Midori.

Use text editor for single file edits.

It all adds up.

Disable Services You Do Not Use

Your desktop environment should provide an interface to manage services that on boot.

On Ubuntu, some are hidden, to show all:

sudo sed -i "s/NoDisplay=true/NoDisplay=false/g" /etc/xdg/autostart/*.desktop

# install preload, allways loads programs you use frequently

Check upstart

# see upstarts
initctl list

# disable a service
sudo mv service.conf service.conf.off

Check system.

# list
systemctl -all

# disable service
systemctl disable name.service

Desktop Environment

Heavy: GNOME, Unity, KDE
Light: LXDE, Xfce

Display Manager

Heavy: GDM, KDM, MDM
Light: LDM
Lightest: XDM

In Ubuntu and other Debian derivates...

sudo nano /etc/X11/default-display-manager
# -> (edit)
/usr/sbin/

In Fedora and other Red Hat derivates...

sudo nano /etc/sysconfig/desktop
# -> (edit)
DISPLAYMANAGER="GDM"

Window Manager

Light: Openbox, after install, run openbox --replac

Swappiness

Linux writes to disk in addition to RAM.

# how usually system writes to swap disk, usually 50-60
sudo cat /proc/sys/vm/swappiness

# reduce disk writes
sudo nano /etc/sysctl.conf
# -> (add)
vm.swappiness=10

Source

  • Some UNIX magazine, can't remember the name.