Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Wednesday, April 25, 2007

Ubuntu Performance Guides

Here is the list of resources that can be used to improve performance on your Ubuntu operating system.

1) Hacking Ubuntu to Improve Performance - This article includes various hacks to boost Ubuntu’s performance, such as viewing running processes, identifying resources, finding process startups, tuning kernel parameters, and speeding up boot time.


2) Ultimate Ubuntu performance tweaking guide - Detailed step by step instructions on what to do in order to improve performance on your system.


3) Improve Ubuntu Performance - This is an index of threads posted on ubuntuforums.org on how to get the best performance out of your Ubuntu machine.


4) Optimizing Desktop Performance - Skip to the section titled Ubuntu Services for Performance Tuning to find some performance tips. Excellent article series covering performance techniques on major flavors of Linux.


5) Feisty performance - Fly like a butterfly - A collection of settings used to tune the speed and performance of Kubuntu/Ubuntu Feisty.


6) Only Ubuntu Linux - Performance tip for Ubuntu Edgy and Feisty users by simply editing your /etc/hosts file.


7) Desktop performance tweaks - Here are a couple of performance tweaks that are nice for desktops/laptops. These tweaks are relatively easy to perform and reasonable safe. Everything you do is on your own risk.


8) Improve Performance in Ubuntu Edgy - Tricks and hacks on how to improve the overall performance of your system.


9) Ubuntu: 32-bit v. 64-bit Performance - Not specific to system tweaking but a nice article comparing performance on a 32-bit vs. a 64-bit server.


10) Best Ubuntu Guide Ever - This guide has everything you need.


11) Tweak ubuntu for speed - These tweaks will make your system faster and more responsive without a doubt. Read on to perform the tweaks and enjoy your faster system.


12) Ubuntu Customization Guide - About customization, we’re gonna make Ubuntu look and feel the way you want.


13) Local DNS Cache for Faster Browsing - Nice article explaining how to use DNS caching to speed up internet browsing on your Ubuntu install.


14) Super Fast Internet for Ubuntu - Basically you disable ipV6 which apparently conflicts with ipV4. Good post.


15) Ubuntu/Linux Roundup - Good collection of links/articles for Ubuntu users.


16) Ten tips for new Ubuntu users - Here’s a list of tips that might save you some time while you’re getting used to Ubuntu.


17) 10 most popular Ubuntu sites on the net - You should definitely visit these top 10 sites which have a wealth of information on using and troubleshooting in Ubuntu.

Sunday, April 22, 2007

13 Things to do immediately after installing Ubuntu

1. Enabling/Adding Extra Repositories
Ubuntu comes by default with only some of the repositories enabled because of licensing issue since downloading certain codecs and apps may be illegal in some countries so you have to enable these repositories/add new repositories to enable installation of these packages.

To enable new repositories go to (System -> Administration -> Synaptic Package Manager ) , type in the root password .Then Go to (Settings -> Repositories ), there enable all the check-boxes to enable all the repositories you need .

Also for installing some apps extra repositories are needed since they are not in the default repositories so go to third Party and add the following there


deb http://ntfs-3g.sitesweetsite.info/ubuntu/ edgy main main-all
deb http://flomertens.keo.in/ubuntu/ edgy main main-all

This repositories below is for Multimedia files and stuff above was for ntfs-3g you can use any one of the above since they are mirrors.

deb http://mirror.ubuntulinux.nl edgy-seveas all

IMPORTANT: Do not press reload button now in synaptic package manager type first following command in the terminal to install the GPG keys.

After doing this exit Synaptic Package Manager go to (Applications > Accessories > Terminal) and type the following command to import GPG keys .

wget http://flomertens.keo.in/ubuntu/givre_key.asc -O- | sudo apt-key add -

wget http://mirror.ubuntulinux.nl/1135D466.gpg -O- | sudo apt-key add -



After doing this your system should be ready for installing extra application. Type the

sudo apt-get update
sudo apt-get upgrade


at terminal to start adding data from the repositories.

2. Installing ntfs-3g

ntfs-3g this is necessary if you have a ntfs drive in your computer ( Usually Windows XP installs on NTFS drive) and you want to read and write data to the drive you have to install this .

This can be installed as following type the following at the command prompt

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ntfs-3g

Then type the following command

gksu ntfs-config

This is automatic configuration of ntfs-3g , enable read , write support and it should be configured.

these commands would back up fstab file if configuration goes wrong.

sudo cp /etc/fstab /etc/fstab.bak
gksu gedit /etc/fstab


Now one more thing you want your windows (NTFS) drive to be mounted automatically add the following entries to /etc/fstab

/dev/
/media/ ntfs-3g defaults,locale=en_US.utf8 0 0

Where /dev/partition is the partition which is NTFS drive , in my case /dev/hda1
/media/ this is just the directory you want to use as a mount point where windows drive would be mounted , you can very well use any drive you like.

now Restart ubuntu your windows partition should be working well.

3. Making Windows see your Linux partition

Windows XP lacks support for reading and writing files to Linux file system however external utilities like free Ext2 File system for windows allows Windows XP to read and write files to a Ext2 , Ext3 file system however ReiserFS file system is not supported .

You can get Ext2 file system for windows at the following link : -
(http://www.fs-driver.org/download.html)

4. Installing flash-plugin

Macromedia Flash player is not installed by default but since we would be surely needing it while browing the net , installing it is necessary
it can be installed by following command

sudo apt-get install -y flashplugin-nonfree

5. Installing Microsoft True Type Fonts

If you are making a jump from windows to ubuntu you would surely miss the true type fonts that Windows uses , since Microsoft has released them free so they can be installed without a hitch in ubuntu (Though not distributed with Ubuntu) .

sudo apt-get install -y msttcorefonts

6. Installing unrar

RAR is one of the very widely used archives on Windows , however unrar tool to decompress RAR is not shipped with distribution and has ti be installed manually.

sudo apt-get -y install unrar 

7. Installing mpg123

mpg123 is a very nice command line based mp3 player that can play mp3 files even on a slow processor based computer , further installing this provides a way of playing mp3 files from within the nautilus file manager . Hence i recommend installing mpg123

sudo apt-get install -y mpg123

8. Installing Adobe Reader

Though ubuntu comes with default evince reader for viewing pdf files , but i am sure you would like to use more complete version of pdf reader Adobe Reader 7.0 which is quiet professional and
more robust , the Linux version of Adobe Reader 8.0 has not been released but the version 7.0 is available and could be downloaded from the following website : -

http://www.adobe.com/support/downloads/product.jsp?product=10&platform=unix

9. Installing DVD playback support

Now this is a contentious issue , in some countries playing DVD files through DEcss is illegal so use it at your own will , anyways to enable dvd playback issue the following command at the command line : -

sudo aptitude install libdvdcss2

Note : the above commands would only work if you have added the repositories i had mentioned before the Seveas repositories.

However if you do not have these Repositories installed issue the following command to install the DVD playback support : -

sudo /usr/share/doc/libdvdread3/./install-css.sh

10 . Installing the extra multimedia codecs,players

Now you would surely want to install all the codecs for playing various media files and the players primarily xine,vlc,mplayer issue the following commands to install the multimedia codecs.

sudo apt-get install gstreamer0.10-pitfdll gstreamer0.10-ffmpeg gstreamer0.10-gl gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse libxine-extracodecs w32codecs
vlc mplayer

This command would install most of the codecs for gstreamer multimedia architecture and vlc media player and Mplayer , as well as the dll files codec (w32codecs) for decoding various files whoose open source decoder are not available.

11. Updating the system

After installing Ubuntu you would surely like to update the system so that all the packages on the system are up to date to new version of the software .
It can be done by following steps , go to (System > Administration > Update Manager)
Now press the Check button and then Install updates to start the installation of updates to the ubuntu system.


12 . Installing beagle

Now Ubuntu does not come with beagle pre-installed maybe because it is still not a final 1.0 release still it is very nice and efficient for searching files and directories on Linux providing features similar to Google Desktop Search and Mac OS Spotlight anyways to install beagle issue the following command at command line :

sudo apt-get install -y beagle


13. Installing gdesklets

gdesklets gives user a collection of impressive widgets that can be placed on desktop this is similar to feature available on Windows Vista and Mac OS X , it does provide quite a good look to the desktop.

To install gdesklets issue the following command at the command line

sudo apt-get install -y gdesklets

after installation go to (System -> Preferences -> Sessions) There go to Start up program and add gdesklets shell , now every time gnome loads up you should see your gdesklets on the desktop.

This is how my desktop looked like with all the desklets (Widgets )

Late additions:-
If you find above steps complicated and would like to do it simple way try EasyUbuntu described below , since Automatix have not been well received by Ubuntu Developers and is somehwhat similar in features to EasyUbuntu i am describing EasyUbuntu only.

EasyUbuntu is a community maintained script that provides a easy way of installing most of the codecs , applications ,tweaks not included in official ubuntu installation. Initially there were fears that attracted a lot of negative publicity to the EasyUbuntu script that is it forces application installations and modifies systems sources.list however according to official EasyUbuntu website these problems have been corrected .

Some of the packages it installs include following : -
(Note : taken from official EasyUbuntu Website )

Multimedia

  • Enhance video player: Install a better multimedia backend (totem-xine replace totem-gstreamer)
  • Free Codecs: Add Support for playing mp3 and other non-free formats
  • Binary Codecs: Add support for proprietary video and audio formats (w32codecs) (only x86)
  • libdvdcss: Read commercial and encrypted DVDs
  • MIDI: Add support for playing midi files

Web

  • Flash: Enable the Macromedia Flash plugin (only x86)
  • Java: Enable the Java plugin (Sun Java for x86, amd64) (IBM java for ppc)
  • Videos: Enable viewing videos embedded in webpages

Archives

  • RAR: extract and create RAR archives
  • ACE: extract ACE archives
  • 7-Zip: Extract 7-Zip archives

System

  • Repository list: Main, Universe, Multiverse and PLF (replace your previous sources.list)
  • Fonts: Install Microsoft and other nice fonts
  • DMA: Enable Direct Memory Access to improve DVD reading (breezy)
  • Nvidia: install the official driver to enable 3D on Nvidia graphics cards
  • ATI: install the official driver to enable 3D on ATI graphics cards

Voice Over IP

  • Wengo: a free Voice Over IP software (available in dapper)
  • Skype: the most popular VoIP software (only x86)

Installation : -

To install EasyUbuntu first download the Ubuntu package from the following link:

http://easyubuntu.freecontrib.org/files/easyubuntu_latest.deb

now go to (Application -> Accessories -> Terminal) and go to the directory where you have downloaded the debian package of EasyUbuntu and issue the following command to install EasyUbuntu : -

sudo dpkg -i easyubuntu_latest.deb

after completeion of the above process issue the following command in terminal

sudo wget -q http://medibuntu.sos-sts.com/repo/medibuntu-key.gpg -O- | sudo apt-key add -

Now EasyUbuntu should be set up for installation of packages .

Go to (Applications -> System tools -> EasyUbuntu ) to launch EasyUbuntu , beyond this the applications interface is quite easy for beginner and one can easily install packages without much help.

Automatix is another community maintained script , similar to EasyUbuntu simplifies the installation of the commonly used codec(Mp3,Video formats, Flash 9 and more ),applications(like Google Earth,Picassa,VMWare Player and more) there has been both positive and negative things said about Automatix , personally i have not used it but i have heard a lot more positives than negatives in using Automatix ,However German version (not officially supported by the Automatix team) has some serious issues currently: removes its own files instead of using the packaging system. uses apt-get –force and –assume-yes anyways some of the programs and is not officially supported by Automatix team.

However Automatix has received some serious comments from Ubuntu Community which have criticized it since it makes Upgrading Ubuntu difficult since it adds it own repos.

Tweak ubuntu for speed

Description

You want your Ubuntu desktop to be more responsive? It will take less than a half hour to perform all these tweaks. These tweaks will make your system faster and more responsive without a doubt. Read on to perform the tweaks and enjoy your faster system.

From what I understand these tweaks will work with all forms of Linux. They are not Ubunut Specific. I have only tried them on Ubuntu though, so if you use them on other Linux Distro’s you do at your own risk.

Speed up your File System

About

Ubuntu Linux, unless you have set it up otherwise, uses the EXT3 system by default. It’s a pretty good system. There are 3 journaling methods for EXT3 system.

  • Journal Data Writeback
  • Journal Data Ordered
  • Journal Data

By default Ubuntu chooses “journal data ordered”. In data=ordered mode, ext3 only officially journals metadata, but it logically groups metadata and data blocks into a single unit called a transaction. When it’s time to write the new metadata out to disk, the associated data blocks are written first. data=ordered mode effectively solves the corruption problem found in data=writeback mode and most other journaled filesystems, and it does so without requiring full data journaling. In general, data=ordered ext3 filesystems perform slightly slower than data=writeback filesystems, but significantly faster than their full data journaling counterparts.

To speed it up, we are going to change it to the data=writeback system.

Tweak

  • Open your Grub boot menu.
sudo nano -w /boot/grub/menu.lst
  • Look for the Defoptions and Altoptions and make them look like the entry below.
# defoptions=quiet splash rootflags=data=writeback
# altoptions=(recovery mode) single rootflags=data=writeback
  • You need to update your Grub since you have altered it.
sudo update-grub
  • Now we are going to edit the Fstab because it will be expecting these options.
sudo nano -w /etc/fstab
  • Now you are going to want to add the (data=writeback and noatime=0) flags to your hard drive. It might be a little confusing because of the new naming system. Look for the (,errors=remount-ro) and add it afterwards to make it look like our example.
defaults,errors=remount-ro,data=writeback,noatime 0
  • Now you tell your system to use them both.
sudo tune2fs -o journal_data_writeback /dev/yourdrive

And you’re done.

Concurrent Booting

About

Concurrent booting allows Ubuntu to take advantage of dual-core processors, as well as processors that hyperthread or multithread or what ever the different companies call it now.

Tweak

  • These settings are located in your /etc/init.d/rc file. Lets open it up.
sudo gedit /etc/init.d/rc
  • Look through the file and you will find CONCURRENCY=none. You want to change it to:
CONCURRENCY=shell

And you’re done.

Swapping

About

Swappiness takes a value between 0 and 100 to change the balance between swapping applications and freeing cache. At 100, the kernel will always prefer to find inactive pages and swap them out; in other cases, whether a swapout occurs depends on how much application memory is in use and how poorly the cache is doing at finding and releasing inactive items.

The default swappiness is 60. A value of 0 gives something close to the old behavior where applications that wanted memory could shrink the cache to a tiny fraction of RAM. For laptops which would prefer to let their disk spin down, a value of 20 or less is recommended.

Tweak

  • First we have to gain access to your /etc/sysctl.conf file.
sudo gedit /etc/sysctl.conf
  • Just scroll to the bottom of the page and add the tag listed below. The number you want depends on how much ram you have and what you do with your system. Please read the about above this to make your decision. I have mine set to 0 on a dual core laptop with 1 gig of ram and have seen no issues and a good performance gain.
vm.swappiness=0

And you’re done.

Broadband Internet

About

These are various tweaks taken from various places. Here is an article that explains them all if you would like to read it in depth. http://www.santa-li.com/linuxonbb.html

Tweak

  • You have to open your /etc/sysctl.conf file back up again.
sudo gedit /etc/sysctl.conf
  • Then again, scroll to the bottom and just add these lines to it.
net.core.rmem_default = 524288
net.core.rmem_max = 524288
net.core.wmem_default = 524288
net.core.wmem_max = 524288
net.ipv4.tcp_wmem = 4096 87380 524288
net.ipv4.tcp_rmem = 4096 87380 524288
net.ipv4.tcp_mem = 524288 524288 524288
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_no_pmtu_disc = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_ecn = 0
net.ipv4.route.flush = 1
  • You have to reset your sysctl for these to take effect.
sudo sysctl -p

And you’re done.

IPv6

About

IPv6 is an internet protocol. Most of your software uses IPv4 though and it causes conflicts.

Tweak

  • We are going to create a file. Paste this into a terminal.
sudo gedit /etc/modprobe.d/bad_list
  • Then paste this into the file and save and exit the file.
alias net-pf-10 off

And you’re done.

Boot Profile

About

You have just made a lot of changes to your system. Re profiling your boot will reorganize it and make it faster on boots afterwards.

Tweak

  • Reboot your PC.
  • When you come to your grub list, hit escape to see your grub menu.
  • Edit the topmost line and add the word below to the end of it.
profile
  • Then just reboot the system.

Now you are done and you can enjoy your faster Ubuntu System.