How to make Ubuntu Linux run faster on a laptop

If you google around on the web you will find there are several tutorials on how to make your Ubuntu Linux installation run faster — especially on older hardware. These tips are very useful and range from minor tweaks to major overhauls. Being an intermediate Linux user myself, I found some of the more difficult optimizations to be overwhelming and not something I would want to try at home — changes to how Linux writes to the hard drive, for example. While researching and implementing the optimizations I felt comfortable with on my older Dell laptop and my new Asus eeePC 901, I jotted down all of my notes for future reference. Below are some tips for the intermediate user on how to optimize your laptop (or desktop) running Ubuntu Linux.

 

Reduce Swappiness

Most laptops have enough RAM installed that the swap space on the hard disk shouldn’t really be used. Yet the default setting for swappiness in Ubuntu is 60. By lowering it to 10 we can reduce the number of read/writes the the hard disk. This is especially handy for netbooks with solid state drives in them. To reduce the swappiness, follow these steps:

  1. sudo sysctl -w vm.swappiness=10
  2. Add the following line to /etc/sysctl.conf
    vm.swappiness=10

 

Preload

Preload is an adaptive read-ahead daemon that monitors running applications and analyzes them for commonalities. It then uses this data to predict what applications you might run and preloads them into memory. The result is faster startup times for commonly used programs. Installing preload is as easy. Just run the following line in a terminal window:

sudo apt-get install preload

» For further explanation, read this article on loading applications quicker in Ubuntu using preload.

 

Boot-Up Manager

The Boot-Up Manager (BUM) is a useful utility for starting and stopping boot-up scripts. Once installed it will appear in the System -> Administration menu. You can use BUM disable unnecessary boot-up scripts that may be slowing down your boot time. For example, I disabled saned, an API library for scanners, because I know I’ll never be attaching a flatbed scanner to my laptop. To install BUM:

sudo apt-get install bum

» Read the documentation for Boot-Up Manager

 

Startup Applications

If you are using Gnome for your desktop manager there will be an option to select which applications are started when you login. Go to System -> Preferences -> Startup Applications and uncheck the programs you don’t need. For example, I disabled the Evolution Alarm Notifier because I don’t use Evolution for setting alarms. I also disabled the Remote Desktop server, UME Desktop Launcher, and UNR Launcher. Just be careful to uncheck them and not remove them. In the case that you’ve removed something critical, you’ll want to be able to get it back.

 

Replace Metacity with Openbox

Openbox is a minimalistic and lightweight window manager that is known to run much faster than metacity, its bulkier counterpart. And you can easily get it working while still using Gnome as your window manager / desktop environment. By running Openbox inside the Gnome environment your desktop will become cleaner and faster. To install it, follow these steps:

  1. Install openbox using:
    sudo apt-get install openbox obconf openbox-themes
  2. Setup openbox as the default window manager by adding an entry in Startup Applications.
    To do this, go to System -> Preferences -> Startup Applications and enter the following:

    • Name: Openbox
    • Command: openbox ––replace

    Note: According to the Openbox documentation you can make it the default by choosing the GNOME/Openbox session when logging in and saving this as your default session. However, this functionality is broken in 9.04. The above steps are a workaround until this is fixed.

  3. Choosing the Openbox theme and other configuration settings
    Go to System -> Preferences -> Openbox Configuration Manager to choose a theme you like and to update other settings such as Appearance and Windows.
    Note: changing the Desktops setting doesn’t effect the Gnome applet controlling the number of desktops. To change the number of desktops, you will need to revert back to Metacity and change them, then re-enable Openbox

» More information, documentation and screenshots available at the Openbox web site

 

That’s all for now

I found that making these few simple changes decreased load times on my older laptop significantly and made my newer netbook more minimal. Hopefully, these tips will help you as well.

 

Tags: , , ,
Bookmark: Post to Del.icio.us Post to Digg Post to Google Post to Ma.gnolia Post to MyWeb Post to Newsvine Post to Reddit Post to Simpy Post to Slashdot Post to Technorati

17 Responses to “How to make Ubuntu Linux run faster on a laptop”

  1. kat Says:

    Thanks for the great and easy to follow instrucitons. There is only one small change

    you missed a – in openbox –replace

    it’s got two — in the command in order to replace openbox using the startup.

  2. John Says:

    Argh! WordPress strikes again! It likes to convert two dashes into an em dash, much like MS Word does. Thanks for catching that, i’ve updated the html to display the command correctly.

  3. John Says:

    UPDATE: I’ve recently discovered LXDE, a lightweight desktop environment that replaces metacity with openbox and gnome with lx. Definitely check it out at http://www.lxde.org as it is a quick and easy way to get more speed out of older hardware when running Ubuntu.

  4. Linus_hsu Says:

    Thanks !!
    It’ really useful

  5. Firefox Says:

    Firefox…

    [...]Ubuntu Linux: How to make Ubuntu Linux run faster on a laptop :: Pelago :: web design & development blog[...]…

  6. dzone.com - New links Says:

    Kramer auto Pingback[...] 0 CommentsSaveShare Tags: css-html, news, standards, web design 1 [...]

  7. How to make Ubuntu Linux run faster on a laptop | Devmarks Says:

    Kramer auto Pingback[...] How to make Ubuntu Linux run faster on a laptop [...]

  8. Your page is now on StumbleUpon! Says:

    Kramer auto Pingback[...] Your page is on StumbleUpon [...]

  9. Project Management Software Review | Project management and time tracking blog for web designers and small business :: the Intervals Blog by Pelago Says:

    Kramer auto Pingback[...] Ubuntu Linux: How to make Ubuntu Linux run faster on a laptop Pelago :: web design, web development … Says: August 26th, 2009 at 5:46 pm [...]

  10. Disabling Swap on Cruncheee (Page 1) - Help & Support - CrunchBang Linux Forums Says:

    Kramer auto Pingback[...] Mini 9, I reduced my SSD swappiness to 10, added Preload and BUM per this most excellent article.http://www.pelagodesign.com/blog/2009/0 … -a-laptop/ Billy – etech, Sugar Land, TXDell Mini 9 32gb SDD, 2GB#! Crunchbang [...]

  11. Make ubuntu a bit faster Says:

    Kramer auto Pingback[...] Update: Using “openbox” would be much faster than the “metacity” settings as in this post, see Replace Metacity with Openbox in this page [...]

  12. How to make Ubuntu Linux run faster on a laptop - Ubervu social conversation Says:

    Kramer auto Pingback[...] http://www.pelagodesign.com/ var loading_functions_url = []; var loading_functions_callback = []; var queue_size = 0; [...]

  13. モバイル Ubuntu、NetWalker登場 軽量化 Gnome向け WindowManager最適化編  その24 - Kapperのブログ - 楽天ブログ(Blog) Says:

    Kramer auto Pingback[...]   下記のコマンドを追加、自動実行させて下さい。   詳細は下記のサイトより参考しました。    * 名前: Openbox * コマンド: openbox –replace Last [...]

  14. Anonymous Says:

    Kramer auto Pingback[...] [...]

  15. Pls make Ubuntu faster like other distros - Ubuntu Forums Says:

    Kramer auto Pingback[...] Pls make Ubuntu faster like other distros you can make it run faster http://www.pelagodesign.com/blog/2009/07/21/how-to-make-ubuntu-linux-run-faster-on-a-laptop/ I followed this on an older laptop and it makes a lot of difference __________________ Linux is [...]

  16. Pls make Ubuntu faster like other distros - Ubuntu Forums Says:

    Kramer auto Pingback[...] a bit lighter and will run faster on older laptops I followed this – it makes a lot of difference http://www.pelagodesign.com/blog/2009/07/21/how-to-make-ubuntu-linux-run-faster-on-a-laptop/ __________________ Linux is only free if your time has no value. OS: Ubuntu, Centos, Fedora. [...]

  17. reduce swappiness - Google Search Says:

    Kramer auto Pingback[...] or …"unix.stackexchange.com/questions/2658/why-use-swap-when-there-is-more-than-enough-ram 13. Ubuntu Linux: How to make Ubuntu Linux run faster on a laptop … "21 Jul 2009 … Yet the default setting for swappiness in Ubuntu is 60. By lowering it to 10 we [...]

Leave a Reply