Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

What are your tips for improving overall system performance on ubuntu? Inspired by this question I realized that some default settings may be rather conservative on Ubuntu and that it's possible to tweak it with little or no risk if you wish to make it faster.

This is not meant to be application specific (e.g. make firefox load pages faster), but system wide.

Preferably 1 tip per answer, with enough detail for people to implement it.

A couple of mine would be:

  • Install Preload (via Software Center or sudo apt-get install preload);
  • Change Swappiness value - "which controls the degree to which the kernel prefers to swap when it tries to free memory";

What are yours?

PS: Since this is not intended to have a unique answer but rather, several useful tips, I'm making this community wiki out-of-the-box.

share|improve this question
It would be a good idea to mention how effective your tip is: how much of an improvement did you notice, or even better, measure? – Gilles Aug 13 '10 at 17:47
I have not found any evidence that changing the swappiness has any positive effect. It might give a temporary feeling of performance increase, that seems to subside quite fast. I have not seen any concrete evidence in form of benchmarks that would proof the effectiveness of changing the swapiness parameter – txwikinger Aug 14 '10 at 14:27
I doubt it has any noticeable performance impact. The ttys used hardly any memory, nor would there be any significant cpu usage. – txwikinger Aug 16 '10 at 14:37
Isn't "premature optimization the root of all evil"? ( – Alejandro Sep 26 '10 at 2:11
@Alejandro that quote assumes that you've done it as well as you could in the first place. – Thorbjørn Ravn Andersen May 16 '12 at 13:26

40 Answers 40

If you edit video files, set up a stripped RAID 0 configuration for your video files. I noticed significant improvement in the smoothness of video editing after I did this.

Of course you will need a minimum to two hard drives to do this, and it's easier if they are separate from the drive the OS is on (If you only have two hard drives, as I did, you can create a mirrored, RAID 1, boot partition and then a RAID 0 partition for everything else)

share|improve this answer

You may uninstall some applets you don't use, turn off auto-run command for some programs (or delay their auto-start). Don't forget about pre-load sudo apt-get install preload. This will greatly speed up starting up software you constantly use.

share|improve this answer

Another good way to boost performance is to install CompizConfig Settings Manager, and disable animation effects, Fading Windows, and Window Decorations. Desktop wall and Expo are an option, too.

enter image description here

Also, use fast texture filter under OpenGL

enter image description here

share|improve this answer


Compile your own kernel. It may take quite some time, so do something else while you compile it. Once you're done, install the files and celebrate. Especially if you get huge speed improvements. :D

share|improve this answer
Does anyone know if there are any remotely recent benchmarks that substantiate the idea that using a self-configured, self-built kernel is likely to produce significant speed improvements in current Ubuntu desktop systems? (If so, perhaps that information could be added to this answer.) – Eliah Kagan Jun 1 '12 at 22:43

RAID for everything!

(I'm experimenting with a lot of tips out there on performance, as the task is teaching me a lot of stuff, and as per the request in the original question, I'll make a separate post for each).

If you've more than one drive, you can set up RAID. The pros and cons of different RAID levels is well documented all over the place, so I won't go into it. Personally I have two drives so I'm really picking between 0 and 1 (though mdadm can do a form of 5 on just two drives, but I haven't tried it). Since there are things that can go wrong with a computer - especially a laptop that has a greater risk of physical mishap - that no RAID level can save you from, and you therefore need a strategy for dealing with risks that doesn't depend on RAID to save your bacon, (it won't save you if you experiment with a performance tweak you read on the internet and it makes things unbootable, for example) I decided to go with RAID 0.

The easiest way to do this for the whole system is to install from the alternate ISO rather than the desktop installer that lets you boot straight off the CD/DVD/USB into Ubuntu.

Select "Manual" paritioning. Divide up your disks so that you've partitions you will use on each disk. E.g. if you've two disks and decided to set aside 100GB for /home then you would set aside 50GB on each if using RAID 0, 100GB on each if using RAID 1.

Select "Configure Software Raid". Select "Create RAID Volume" (or something close to that, I'm not going to boot into the installer to check the wording). Pick those partitions you want in your first RAID volume, the type of RAID, and create it. Repeat until you have all of your volumes set up. (You don't need to put your swap on RAID, just give the two or more swap partitions the same priority in fstab and they'll be used together without RAID).

The assign filesystems and what's mounted where as you would with any installation and away you go.

A lot of stuff out there says you can only have /boot on a RAID 1 or non-RAID partition. I've had it on RAID 0 without any problems, which may be a matter of Ubuntu moves on, linux moves on, or BIOS moves on (and if its the last then your BIOS may not be okay with /boot on RAID 0).

The installer will install grub on all your drives. This gives one the benefit that if something stops booting on your "first" drive stops working, you can go into the boot menu and boot off the second.

hdparm does indeed see things has having been doubled in speed for me, and there's certainly a perceptible increase in speed on a lot of things too. I found in experimenting that the first part of booting (after the grub menu, when you've blank purple) seems to be slower, the second part to be faster (rarely time to show the animation now) and application use is faster - the greatest increase in performance of any of the tips I've tried so far.

share|improve this answer

Use EXT4 file system

Adding noatime and nodiratime Edit fstab file

# nano /etc/fstab

Add discard to your ssd drives or partitions, after ext4

UUID=bef10b86-494d-41c6-aa46-af72cfba90fd / ext4 discard,noatime,nodiratime,errors=remount-ro 0 1

Disable hibernation Edit

# nano /usr/share/polkit-1/actions/org.freedesktop.upower.policy

Look for


Change from “yes” to “no”, there are two, one for hibernation, and another one for suspend. If you have to disable them both, make sure to replace them both from yes to no.



Edit fstab file

# nano /etc/fstab

Add the line to the end of fstab file

tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

If logs aren’t important for you (laptop or desktop), you can also mount /var/log to

tmpfs. Add the line to the end of fstab file
tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0

Preload To install preload on Ubuntu, Linux Mint or debian based distributions

# apt-get update && apt-get install preload

To install preload on Fedora, Centos or Redhat based distributions

# yum install preload

Swap and Swapiness To change swappiness setting:

$ su -
# nano /etc/sysctl.conf

And add this line into sysctl.conf file.

vm.swappiness = 10

You can read more at nam huy linux blog How to tweak and optimize SSD for Ubuntu, Linux Mint

share|improve this answer

I find strange that no one has mentioned anything about Unity. Unity is definitely something that one should consider removing if the system has to work faster (I shall not discuss whether Unity boost the user's productivity or not since this is quite subjective for many people).

I just got my hands on a virtual appliance created with VirtualBox with Ubuntu 14.04 with Unity in it. The default machine settings were 32MB memory for video, 2GB for RAM and 100% performance cap on the CPU (single one was chosen). Of course my CPU is a bad one (a 5-6 years old i3 from Intel with 1.66GHz and two cores). Because of the huge amount of RAM that was dedicated to the VM and the presence of only 3.8GB physical memory on my host I decided to reduce it to 512MB. It was unbelievable how sluggish the system was.

The recommended minimum system requirements given by Canonical are a joke. I cannot imagine anyone working at all under such conditions. Yes, these are minimum requirements but what is usually understood by that is that the system is still usable to a some non-suicidal degree with the exception of working with applications that require a lot more. The window manager should not put such a huge restriction on the hardware used (Windows Vista anyone?) especially since Canonical removed the Gnome 2 Classic option upon login (currently there are of course alternative, which are however not officially supported by Canonical). Appearance is something important especially if we follow one of the most profound rules in design and usability - "Form follows function". It should not however do what Unity does to the system resources. I strongly recommend starting from reducing the fancy-pancy garbage on your system and the first thing towards that is to replace Unity with for example LXDE, which looks great, offers a lot of room for customization (Unity and customization - pfffff...) and is a beast when it comes to small CPU usage and miniature memory footprint combined with the functionality it provides. My VM is currently flying after a single step of installing vanilla lxde:

$ sudo apt-get install lxde

A much more better way is to go for one of the variations of Ubuntu such as Lubuntu (LXDE) or Xubuntu (XFCE), which profit from the fact they share the same repositories, security updates, patches etc. with Ubuntu yet do not suck the life out of your machine. Installing another window manager on top of Ubuntu (which defaults to Unity) definitely helps a lot but Ubuntu's default installation also comes with a huge amount of resource-hungry services and applications most (all?) of which have more lightweight alternatives.

share|improve this answer

The other answers say a lot, already. However, make sure you're using the optimal video card driver for your system. Using the wrong one can really slow it down. The best one for my system on Xubuntu 15.04 is the legacy Nvidia one. The newest version and the open source one are either slower with certain applications (such as Tkinter apps and SciTE), or they crash my computer.

I might recommend not using lightdm for locking your screen and such, because unless they've fixed it in this new release, it's a lot slower going to sleep and waking up than what they used to use. That might seem program-specific, but it really does go a long way toward a faster computer, practically speaking, in my opinion.

I would recommend looking at hardware instead of software tweaks, after you've done all the software tweaks you can handle. You might consider a solid state hard drive.

You also might consider using a different window manager.

share|improve this answer

One desktop that I would definitely recommend over Unity, or even XFCE, is i3. There's a website for it here. I have seen major improvements in performance, even on my netbook with 1GB of RAM.

share|improve this answer

edit /etc/sysctl.conf with the following

vm.swappiness=5 net.ipv6.conf.all.disable_ipv6 = 1     
net.ipv6.conf.default.disable_ipv6 = 1        
net.ipv6.conf.lo.disable_ipv6 = 1     
net.core.rmem_max = 16777216     
net.core.wmem_max = 16777216     
net.ipv4.tcp_rmem = 4096 87380 16777216     
net.ipv4.tcp_wmem = 4096 65536 16777216      
net.ipv4.tcp_no_metrics_save = 1     
net.ipv4.tcp_moderate_rcvbuf = 1      
net.core.netdev_max_backlog = 2500     
net.core.netdev_max_backlog = 30000    
net.ipv4.tcp_timestamps = 0     
net.ipv4.tcp_window_scaling = 1     
net.ipv4.tcp_sack = 1 net.ipv4.tcp_fack = 1

Add the following line above exit 0 in rc.local:

renice -n -5 $(pidof X)  

Install preload DO NOT install clamav. This causes a memory leak in nautilus that makes python processe peak at 2.2 gb, as well as nautilus. change the following in fstab


finally install namebench and check your dns servers.

Shut off dns caching. No joke, take out pdnsd and any other dns cachers. They won't beat google or openDNS times on getting responses.

share|improve this answer
Downvote: Lots of "magical" recipes with no explanation of what they do or why they work. This is not a good answer to me. – Javier Rivera Feb 14 '13 at 21:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.