Optimize Ubuntu for Speed

Status
Not open for further replies.
Hello Everybody.

In the past few weeks or two, I suffered a lot because of this unstable bloat that ubuntu hardy heron is today. While the KDE3.5 and Xfce versions are fine, Gnome sucks. Almost all window managers are awssome, but for KDE4, Gnome and a lil bit of Xfce. KDE4 is obviously unstable, so I am going to leave that. Lets see how we can make ubuntu once again function seamlessly on a 256mb ram P4 2.66 GHz machine where it was once supposed to be the best usable OS. This doesn't greatly improve performance, but it does give a few speed boosts.

I am ditching ubuntu for debian now, but this is for newbies who can't run debian.

I became really angry when I noticed that Gnome 2.22 has had no noticable improvements over Gnome 2.18, which I was using on Ubuntu Feisty till I upgraded recently with my brand new Hardy LTS Disc. I have only an year's experience with linux(ubuntu in particular), but I still know enough to write this.

The following is a tutorial which I have made myself, by posting the positive results of my own experiments. I have given external links or quotes in some places where the steps are already well doccumented elsewhere, as I am a lazy guy and I hate having to type things myself again.



1. Nautilus - Replace with PCMan File Manager

I noticed that both Nautilus and Thunar are not fast enough. Lets get something thats more fast, small, robust but still has some tiny new and intresting features. I stumbled upon PCMan File Manager, and its a beauty. It has this couple of features in tools menu: tools>>open--folder-in-terminal and tools>>open-folder-as-root. Both these make an excellent tool for the average guy trying to configure/edit his system settings. A quick
Code:
sudo apt-get install pcmanfm
should do the trick and install PCManFM. But we want more than that. We want to make it actually REPLACE nautilus. *www.ubuntugeek.com/how-to-replace-nautilus-with-pcman-file-manager-in-ubuntu.html describes exactly how to do that better than I could(me too lazy to type). Then do a quick
Code:
sudo apt-get install gtweakui
this installs gtweakui, a set of tools in the preferences menu to quickly get some tasks done. Here, go to gtweakui-nautilus and uncheck use nautilus to draw desktop. Now you ended up freeing 19mb of space. Now select wallpaper via system>>preferences>>appearence and choose the first one, i.e., no wallpaper.

Then in PCMan, from edit>>preferences, in general tab disable thumbnails. In desktop tab, configure it to display icons on the desktop if you want them, but unfortunately instead of being displayed in vertical coloums, they are displayed in horizontal rows. You can select a wallpaper for the desktop here too, but for performance reasons I advice against having a wallpaper. With limited resources, even 3 megs of ram saved is a huge amount. And yes, PCManFM when running the desktop uses 8.8 mb compared to nautilus's 19mb.

Go to terminal and run gconf-editor, and in desktop>>gnome>>background uncheck draw background. This ensures that gnome does not apply a background by itself.

Now PCManFM can handle everything. But you need to open it atleast once, by going to places and clicking home icon. This will launch PCManFM desktop. Clicking again on home will result in PCManFM opening the folder, like any other folder. I still haven't figured out how to get PCManFM started at startup to take control of the desktop, but I will tell that later.



Firefox 3.0 Beta5 - Get Epiphany Browser instead

We all hate most beta software don't we ? Canonical has been kind enough to provide us a browser which is barely optimised for performance. Lets replace it with something else till it becomes usable once again shall we ?

I recomend epiphany, the default gnome browser. This uses firefox's gecko engine but is very fast and responsive. Do a quick install of this beauty from add/remove programs to start using it. In synaptic, there is epiphany-browser-plugins for extra features, but they may bloat the system so you may neglect them if you want.

To customise, rightclick on toolbar, select customise toolbars, and make all the buttons onto a singe bar and delete the extra one and select display only icons instead of icons and text. Delete unwanted(i.e. all default) bookmarks and make google the home page.

Issue: I am not able to activate digit forum's WYSIWIG editor in this. A solution will be apritiated.



Startup - Ditch items you don't want

The startup of Ubuntu does have some unwanted stuff. Go to System>>Preferences>>Sessions. There, select the startup programs tab.

You may remove Bluetooth Manager if you use no bluetooth.

Remove check for new hardware drivers if you already have the best hardware driver or if you prefer to find out new releases from the internet(usually in this forum) and discuss its stability/improvements, etc before installing.

You may remove evolution alarm notifier if you prefer evolution not to bug you about new mail.

You may remove update notifier if you are the type who does sudo apt-get update && sudo apt-get updrade manually, or goes to synaptic manually, instead of being bugged with 100mb updates during daytime on a limited internet connection free only at night.

Remove visual assistance if you want to have no extra assistance.

Remove volume manager if you don't want to unmount/mount hard drives every now and then.



Media Player - Totem FTW

Totem Media Player is a nice light media player for Gnome. Once you install win32codecs, and all gstreamer codecs, Totem plays nearly everything. So associate all media files with it. It even has a youtube browser/player. Its really nifty.

Totem lacks postprocessing and most advanced features thanks to the gnome human interface guidelines which is in stark contrast to KDE's Kaffeine, but this ensures that its extremely light. Besides, on a slow computer using PostProcessing for video and Upsampling of audio is one of the best ways to make the system hang.

You are given a light media player that plays everything, and this package comes by default. So abuse it.



Widgets on Gnome Bars - Keep 'em low

The Gnome bar can be customised to include several widgets, but some take up lots of RAM and time to startup. Choose what you put in the toolbar wisely.



Alternate Window Managers - IceWM rocks dude

For those of you who find that despite all this, Gnome still is quite slow if you are trying to multitask, try a light window manager. The lightest one out there is IceWM.

IceWM is a simple, elegent and easy to use window manager thats light on system requirements. It uses noticably lesser memory than FluxBox, OpenBox or Xfce. Its easy to configure, either with a GUI or with easy to edit text files placed in the ~/.icewm directory. IceWM has support for gnome like features too, via icewm-gnome-support package. It looks like Windows95, OS/2, Motif, and other classic OSes, but is still overall a modern looking Window Manager. Whats really great about it is that it has very little memory usage, but it still provides a pretty decent looking GUI.

Through icewm-themes package, you can get lots and lots of themes for IceWM, and freshmeat provides tonnes more. The default UI is ugly, so I recomend you use a theme like True-Curve, SilverXP, Natural, or OSX.

It lacks a desktop by default, but you can easily use a desktop like nautilus within it, though I don´t recomend it for memory reasons. But it does have an excellent menu, which can be edited to show desktop as an entry.

Lightweight apps make a good combination with IceWM, but its main use is as a <<¨sidekick¨>> to gnome 2.22, so that you can use it as an alternative desktop environment ONLY while performing CPU and Memory intensive tasks like DVD Burning, Gaming, etc.

It has a simple taskbar with IceMenu, show desktop, workspace switcher and window switcher. Its IceMenu is accessed by either rightclick on desktop or clicking on icemenu button. Though the menu may appear ugly at first sight, its really great and easy to use.

IceWM launches and runs KDE apps faster than Gnome apps despite looking a lot like unthemed vanilla gnome, so if you use it, ensure that you make KDE apps default openers.

Expect to have a great time with IceWM, but to start using it, you first need to read this tutorial: *www.psychocats.net/ubuntu/icewm



Wallpaper - EyeCandy comes at a cost

Its pretty obvious, but having a heavy large size wallpaper makes it use more ram. So have a small wallpaper if possible, or none at all.



Tray Mode Apps - remember to close them


Some people forget to close apps in tray mode. So don't be an idiot like some of them and let tray apps eat system resources. Close them. Common sense really.



Abuse Commandline - Thats true linux

GUI is pretty, hey, but its resource demanding. Try to use the commandline as much as you can. I use it for installing/removing softwares, updating system, etc. This is basic use, which can be done by anyone, but its worth it. WGet makes an excellent commandline download manager for example, if you don't mind single instance downloads.



Office Suite - OpenOffice is waay too heavy

OpenOffice is set to open files by default. Evil. It takes a real hell of time to start and is not at all suited for slower systems. Install the Gnome-Office package consisting of Abiword, Gnumetric, etc instead. Ecept for presentations, when you will be forced to use OpenOffice, this set takes care of database, spreadsheets and wordprocessing.



Download Mirrors - IITs always rock

Some of you might suffer from slow download speeds when updating the system. This can get really annoying. So ensure that you have the right mirror selected for downloads. The best for us Indians is the IIT Madras mirror. Yes, our very own IIT Madras provides Ubuntu Mirrors. Its super fast, and offers full speed downloads on even 2mbps lines.



Kernel Recompiling - |337

The following is a set of instructions for compiling the kernel yourself by my good friend praka123:
you are doing the wrong way boy!.that method is good for distros like fedora/suse.
remember 2.6.25 kernel faces problem with nvidia driver though latest driver 173.x does support .25 but without xen support.

I dont like "sudo" .so for the next steps ,I assume you are on a root terminal with "#" prompt generally.

In ubuntu, you do this to get root terminal :
Code:
sudo su -

I will brief my tutorial here: :D
1.
Code:
 apt-get update && apt-get upgrade
with internet ON

2.
Code:
apt-get install build-essential kernel-package libc6-i686  initramfs-tools libncurses5-dev

3.extract kernel source in .tar.bz2 format into /usr/src/ directory (in terminal use "tar -jxvf linux.tar.bz2)

4.change into /usr/src/linux-2.6.25 from terminal using :
Code:
cd /usr/src/linux-2.6.25

5.now,
Code:
make clean && make mrproper

6.
Code:
cp /boot/config-`uname -r` /usr/src/.config

7. now we have to customize :-
Code:
make menuconfig

8.press exit once you finishes.

9.now
Code:
make-kpkg clean

10. run :
Code:
make-kpkg --initrd --append-to-version=-gary-kernel kernel_headers kernel_image

Once the compilation is successfully finished ,the kernel .deb will be available in /usr/src directory.

there are some optimization using gcc for saving time like giving makeopts=-j3 for a normal SMP processor.that you can google I suppose.
best of Luck.

regarding kernel compile.this is the link with pictures:
*www.howtoforge.com/kernel_compilation_debian_p2

but you may not like to follow it as it is!
Ignore the begening words "you are doing it the wrong way boy...". Its out of context.




more to come...

I will continue updating this when I have more free time. Till then, if you are a user who is trying this, please feel free to comment. And if you are an experienced person, please feel free to add to this so that I may credit you and post it here for all to see.
 
Last edited:

amitava82

MMO Addict
Nice. I did not know How to replace nautilus which I so badly wanted to do.. Now I can try it out. I want to replace it with Dolphin.. :p
 
OK guys, I have updated the article a few times to include even more stuff. Please have a look and comment how useful it was.

I am going to add Kernel Compiling once I get prakash's permission to use his post.
 

infra_red_dude

Wire muncher!
Unfortunately nautilus is required to draw the desktop :( and its a shameless resource hogger :(

I suggest you replace gnome with xfce or even lxde (fastest) as both are based on gtk.. customization will not abe a problem at all!

Plus lxde + metacity window manager= all current themes work great out of the box!
 

nitish_mythology

OSS Enthusiast!
If I try all this, wll hardy work fine on my lappy a p3 1ghz 256mb Ram and an ages old 16Mb ati graphic card?

Or should I go 4 stuff like Dreamlinux or get Xfce+Ubuntu??
 

FilledVoid

Who stole my Alpaca!
Personally I think you all are over complicating alot of stuff. I mean I understand your preference to run Ubuntu and all but if you are conscious about resources you should be using like Arch, gentoo, slackware or something right? Why even use Ubuntu. I found that just changing from Gnome - Fluxbox (thanks hitboxx) ame a drastic increase in performance on my system. However theres a problem make sure you use apps which are not gnome related or etc i guess. Cause if use stuff like gnome system monitor etc it does tend to take a bit of time to start. Nonetheless good tutorial.
 

praka123

left this forum longback
well,optimizing a kernel for architecture only shows some benefits unlike distros like arch,gentoo,slackware which optimizes whole packages.It is not worth the time :)

the solution is ,to wait for a gcc version which can take maximum optimization possible if and only if Intel or amd or via or cell opens up the platform specifications fully.

I am sure if you compile a C/Fortran program on a Intel compiler ,it is way faster and better than gcc? .I hope you got it :)

those with low specs got the solution of using a low mem use WMs or Xfce/fluxbox :D
 

tgpraveen

Simpsons rox
u make some good points keep em coming
but i will say upgrade ff to latest Rc relaese rather than going for other browser.
 
Unfortunately nautilus is required to draw the desktop :( and its a shameless resource hogger :(

I suggest you replace gnome with xfce or even lxde (fastest) as both are based on gtk.. customization will not abe a problem at all!

Plus lxde + metacity window manager= all current themes work great out of the box!
Nautilus is NOT required to draw the desktop. I saw my task manager and nautilus is not running, but instead, I am using PCManFM for drawing desktop.

Xfce is ok, but too limited. And Xfce is waaaay to heavy. So I use IceWM instead, which, although still limited, uses the least amount of ram ever and is highly configurable via text files.
If I try all this, wll hardy work fine on my lappy a p3 1ghz 256mb Ram and an ages old 16Mb ati graphic card?

Or should I go 4 stuff like Dreamlinux or get Xfce+Ubuntu??
get IceWM + Ubuntu
Personally I think you all are over complicating alot of stuff. I mean I understand your preference to run Ubuntu and all but if you are conscious about resources you should be using like Arch, gentoo, slackware or something right? Why even use Ubuntu. I found that just changing from Gnome - Fluxbox (thanks hitboxx) ame a drastic increase in performance on my system. However theres a problem make sure you use apps which are not gnome related or etc i guess. Cause if use stuff like gnome system monitor etc it does tend to take a bit of time to start. Nonetheless good tutorial.
I am not overcomplicating stuff. I am just doing simple replacement of programs. Epiphany is good. PCManFM can everything for me, plus it has some useful new features. The instructions are detailed so that newbies can follow them.

I know about changing to fluxbox, but some still need gnome for certain administrative tasks. So it also needs litening up. Besides, when IceWM is there, why use FluxBox ? IceWM >>>> FluxBox in every way.(personal research)

And gnome/gtk apps run well only on gnome and sometimes Xfce. For users of IceWM, I recomend software like Kaffeine, K3B, Konqueror, etc. Konqueror is especially useful because its extremely fast loading, has minimal ram usage and KHTML is light and speedy. The same app can browse folders and web in tabs, so once again resources are saved.

If you get a little more memory, and up it to, say 0.5GB, KDE owns all. Its low on CPU usage, as shown by the fact that KDE apps start faster than gnome apps and more multitasking is possible. But RAM usage of default startup itself is ~200mb in gnome. So its slow sometimes.

And the main objective of this tutorial is to help newbie ubuntu users. They can't use arch, gentoo, slackware, etc. They sometimes are not even able to use KDE or Xfce. Gnome is too easy to use, and I intend to let it remain that way while changing some apps.
 
How functional is it?

1. wallpaper on desk
2. icons on desk - sizw predefinable
3. nautilus = 19mb ram, pcmanfm = 8.2mb, both while showing desk
4. icons are arranged in rows(like in folders) instead of coloumn - only issue
5. open folder as root tool
6. open in terminal tool
7. firefox like tabbed browsing
8. oh ya, it does have file browsing :p
 
^^^ new folder creation, drag drop on desktop?
yes, yes, yes. They are waaaay too basic features to be asked about.
New Folder and New Text Doccument.

Nice rename command for copy. If you copy and paste in same folder, you are asked for newname as a folder already exists under same name.

I LOVE PCManFM
FYI,nautilus uses only 9.2MB here :p
thats because you are on debian.
I am switching to Debian Sid tomorrow. KDE + IceWM.
Bye Bye Ubuntu. Had a nice time with you.
 
Status
Not open for further replies.
Top Bottom