4 Tips to Speed Up Ubuntu 16.04 Even if You Have SSD
Linux users overall enjoy a faster operating system than Windows users do. However, if you use a heavyweight desktop environment like Unity, then your Ubuntu 16.04 could be running slow. This post lists 4 easy tips you can apply to speed up Ubuntu 16.04 system. You shall see a speed boost on low-end hardware and in Virtualbox. It also helps even if you installed Ubuntu on a solid state drive.
Let’s see how to make Ubuntu 16.04 faster again!
1. Disable Unneeded Startup Applications to Speed up Ubuntu Boot
Ubuntu starts a lot of applications during boot time which you may find unnecessary. To make Ubuntu 16.04 boot faster, you can disable some of them. However, most startup applications are hidden. To display them, simple run the following command:
sudo sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop
Then launch startup application from Unity Dash.
To disable a startup application, simply uncheck it.
Here are some applications you may find unwanted.
Accessibility Profile Manager
It is used to display the accessibility tray icon on the login screen. If you don’t need onscreen keyboard, screen reader, then disable it.
Backup monitor
This is deja-dup-monitor. If you don’t want to back up anything with deja-dup, disable it.
Caribou
Disable it if you don’t need on-screen keyboard.
Desktop Sharing
This is for VNC connection. Disable it if you don’t need anyone to remotely control your Ubuntu system. You still have the ability to remote control other’s computer through VNC.
Gnome Software
Disable it if you like to install software in the terminal and don’t use Gnome software.
Orca screen reader
Disable it if your eyes still can see the beautiful world.
Personal File Sharing
Disable it if you don’t use bluetooth to share files.
Update Notifier
Disable it if you don’t want to be notified when software updates are available.
Another way to speed up Ubuntu boot process is to disable some systemd services. You can view additional startup applications by executing the following command in terminal.
systemctl list-unit-files | grep enabled
Enabled indicates that the service automatically starts when Ubuntu is booting up. To disable a service to auto start, use the following command:
sudo systemctl disable <service-name>
For instance, my computer doesn’t have bluetooth, so I can disable bluetooth service.
sudo systemctl disable bluetooth.service
I don’t have a printer, so I can also disable the cups.service.
sudo systemctl disable cups.service
Caution: Make sure you know what a service does before disabling it.
2. Adjust Swappiness
We all know that RAM is way faster than hard drive.
Let’s do a little experiment: Boot your Ubuntu 16.04 system, open a few applications like Firefox, LibreOffice, Mozilla Thunderbird, Evince document viewer and then don’t do anything with it. Don’t suspend or hibernate it. Then after a few hours return to your Ubuntu 16.04. You will find that these applications are responding poorly to your mouse clicks because they were idle and swapped out to hard drive.
You can find in system monitor that Ubuntu is using swap space although you have plenty of free physical RAM.
This is due to the default swappiness value of Ubuntu. Swappiness is a Linux kernel parameter that controls how often Linux swap out idle processes to the swap space on your hard drive.
The value of swappiness is between 0 ~ 100
. Lower value means Linux will use swap space less whereas higher value causes Linux to use swap space more often. The default value on Ubuntu is 60
which means when your computer uses up 40% of physical RAM, Linux kernel begins swapping.
You can use the following command to check the current value.
cat /proc/sys/vm/swappiness
It’s recommended to set a low value for swappiness so that Linux kernel will use as much physical RAM as possible. For example, to set swappiness to 10:
sudo sysctl vm.swappiness=10
Do not add space before and after the equal sign. This command tells Linux kernel to use swap space when 90% or more of physical RAM is used up. This setting isn’t persistent.
To make it persistent across reboots, you need to edit a file.
sudo nano /etc/sysctl.d/99-sysctl.conf
At the end of this file, append the following line.
vm.swappiness=10
Save and close this file. (Press Ctrl+O to save, press Ctrl+X to exit) This tip is also applicable to your Ubuntu 16.04 server.
3. Preload Commonly Used Applications
Are you unhappy about the launch speed of Firefox browser or other slow applications? Here’s a little piece of software called preload
that memorize what applications you use most often and preload related libraries and binaries into memory so these applications can be launched faster.
Install preload on Ubuntu 16.04 with this one-liner.
sudo apt install preload
Once installed, the preload daemon will automatically be started. You can check it out with:
systemctl status preload
If it’s not running, then start it using the following command:
sudo systemctl start preload
Now you can forget about preload and do your other work.
4. Disable Fancy Effects
Fancy effects are eye candies, but they can slow down your computer. We can use the compizconfig-settings-manager to disable them.
sudo apt install compizconfig-settings-manager
Start it from Unity Dash. Then click the Effects
tab on the left and disable effects that you don’t like. You can disable all effects if you want to.
You can also disable the background blur of Unity Dash with Unity tweak tool to make Dash more responsive.
sudo apt install unity-tweak-tool
Then open it up, select the search
tab, and set Background blur to off.
Some people actually like the transparent background. Which do you prefer?
Before
After
Bonus Tip: Find out the Culprit of a Slow Boot
You can find out which service takes how much time to finish starting up by entering the following command in terminal.
systemd-analyze blame
As you can see from the above screenshot, mnt-pi.mount
and vboxadd.service
are the culprit on my computer. I know mnt-pi.mount
is responsible for mounting NFS from my Raspberry Pi, but I don’t need NFS any more so I can safely remove NFS mounting from /etc/fstab
file. I also know that vboxadd service
is only useful for virutual machines so I can disable this service on my physical machine.
sudo systemctl disable vboxadd.service
To find out the boot time, run:
systemd-analyze time
Before
After
Other Ways to Speed up Ubuntu 16.04
I hope these performance tweaks helped you make Ubuntu 16.04 faster. Do you know other ways that can speed up Ubuntu 16.04? Share your tips in the comments below. If you found this post useful, subscribe to our free newsletter or follow us on Google+, Twitter or like our Facebook page.
Thanks, nice tips!
some things here I didn’t know. Thank you!
Many good advices are here:
https://github.com/akalongman/ubuntu-configuration
Thanks I had no idea what to remove off of the last list yet load time is now 1 min 3 seconds