Wednesday, October 14, 2009

Speed Up Debian Linux KDE Desktop

speed up debian linux kde desktopI still remember those days when RedHat 9 used to take almost two minutes to boot on my PIII PC. It was way too slow compared to Windows XP (that took roughly 40 sec) of that time. Thank God, these days Mepis 8 takes just 50 sec on my notebook. And the new OpenOffice.org 3 is a lot better than what it used to be 8 years back.

You too can achieve that speed by doing some easy tweaks.

Speed Up Booting

Boot directly from hard drive, make boot chooser timeout value to 0, and start parallel booting.

Default BIOS setting of modern PC has been set to seek Optical Discs and USB drives first, followed by hard drive and network. You can change it to seek hard drive first save some time. Besides you can set timeout value to 0 in your /boot/grub/menu.lst file so that Linux boot directly instead of waiting few seconds for you to choose a boot option. If yours is a multi-core processor you can still reduce boot time by setting parallel boot. Just edit your /etc/init.d/rc and change CONCURRENCY=none to CONCURRENCY=startpar.

Optimize Memory

Swapping is an important factor in system responsiveness. One important factor improve performance is to swap less and use RAM more. In case of a home desktop, you won't have to use swap if you have more than 1 GB of RAM. But for safety reasons you should have swap partition/file and change default swappiness value. In my system I have edited sysctl.conf file appending a line "vm.swappiness=10" (without quotes) to it.

Optimize KDE

Using auto-login and disabling some KDE eye-candy and services (disabling bootsplash (or splashy), ksplash, gui-effects and system startup check and using less items in Autostart) will further improve your desktop performance. Also you can change KDE options to start with an empty session. It will reduce the KDE-startup time.

Improve Filesystem Performance

Using "noatime" mount option and "data=writeback" mode will speedup your Linux desktop to a great extent.

Use "noatime" option. In my case it is:

# Pluggable devices are handled by uDev, they are not in fstab
/dev/sda1 / ext3 defaults,noatime 1 1
/dev/sda2 swap swap sw,pri=1 0 0
proc /proc proc defaults 0 0
devpts /dev/pts devpts mode=0622 0 0
/dev/sda3 /home auto defaults,noatime 1 2
# Dynamic entries below
/dev/cdrom /media/cdrom udf,iso9660 noauto,users,exec,ro 0 0
/dev/hda /media/cdrom udf,iso9660 noauto,users,exec,ro 0 0

Use data=writeback.

In a root terminal issue:

tune2fs -o journal_data_writeback /dev/hda1 (substitute hda1 with your partition name)

Disable IPv6

World will move towards IPv6. But not now. Most of the home desktops still access internet using IPv4. So you can disable IPv6 system-wide to save time (processing) that goes to translate between IPv4 and IPv6. Edit /etc/environment as root and append "KDE_NO_IPV6=True" to it. Also remove the ipv6 settings from sysctl.conf. You should also consider disabling IPv6 settings in Firefox. Open about:config in Firefox and change value of "network.dns.disableIPv6" to true.

Change Host Setting

Simply edit /etc/hosts files and change it something like

127.0.0.1 localhost
mepis 127.0.0.1 mepis

(change "mepis" with your hostname)

Optimise TCP Settings

As root user edit /etc/sysctl.conf add the following lines to it:

net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_no_metrics_save = 1

It will reduce packet transfer overhead and improve your internet speed.

Speedup Firefox

Create a new integer value "content.notify.backoffcount" in about:config and set its value to 5. Also create an integer "nglayout.initialpaint.delay" and set its value to zero. Similarly create another New Integer, name it Network.dnsCacheExpiration and give its value as 3600. Create another integer ui.submenuDelay and then set its value to zero. Change the network.http.pipelining and network.http.proxy.pipelining values to "true".

Remove Java

You should also consider removing Java runtime and allied packages from your Linux desktop and uncheck "java" from OpenOffice.org and Firefox options. It will speed up loadtime of both the applications.

Sunday, October 11, 2009

Home Users Don't Need to Update their Linux Frequently

home users need up update their linux frequentlyThere are certain Linux distributions, those so called rolling distros, generally don't break after you update regularly. But some bleeding edge distributions (like Fedora) break or behave badly. Good thing is, if you are running Linux on a home desktop, you don't need to update it frequently.

You can update Linux same way as you did on Windows. Either you choose regular updates, or you pull in the bulk updates following the said distro's systematic instructions for update. But very often the later is recommended for desktops. Regular update (those related to security bug fixes, performance enhancements) is a must if you are running some critical applications on server.

Suppose, you installed PCLinuxOS 2009.2 which detected and configured all your hardware devices. You did a full update plus pulled in all the necessary apps of your choice. Period. You don't need to regularly upgrade it. Frequent updates don't bring about great improvements. They only kill bandwidth, your time, some extra power and memory. You don't need to keep that "Fetch Updates" (or something similar) apps running in your system tray. It just consumes some extra CPU and RAM. If your system works don't break it - don't pull in unnecessary upgrades!

Stick to your distro of choice and make a clean install when a mega release shows up.

Monday, October 5, 2009

Sify Broadband Annoyance on Linux

Sify Broadband Annoyance on LinuxSome Internet Service Providers don't grow with time. Needless to say they fall apart. Sify Broadband (in India) is one such ISP. Even it lags behind MTNL in terms of technological awareness. Please read on if you are interested in further rant about Sify.

Due to some compulsion I had to subscribe Sify Broadband. And I contacted the local Sify Internet Agency (Annoyance No.1: this ISP does not provide internet direct to the consumer, there is always an agent who takes a good amount of service charge every month, alas!). The Sify agent of my locality is a total noob. He had no idea about IP configuration on Linux. Well, I configured it as per his given details.

I got connected to Sify LAN. But could I browse the web? No. (Annoyance No.2: You have to install a certain Sify Connect app). Instead, every page were redirected to a Sify server page that prompted me to install a Sify dialer. I chose to download the linux dialer (from something like http://210.18.11.199:81/bbandclient/...1.3-bin.tar.gz). Extracted the tarball and ran an install.sh file. The dialer was installed successfully. But did that run? No. (Annoyance No.3: On running that dialer it prompted that libssl.so.4 was missing). Bullshit! It displayed some error message stating libssl.so.4 and libcrypto.so.4 were missing, whereas both were present though their version numbers were different. Not a big deal, I made symlinks to those required files from the versions that existed in my /usr/lib.

su
cd /usr/lib
ln -s libssl.so.0.9.8 libssl.so.4
ln -s libcrypto.so.0.9.8 libcrypto.so.4

After the above dirty commands I ran sifyconnect as a non-privileged user. It did not work. (Annoyance No. 4: you've to be root user in order to run that sifyconnect dialer). Then I again issued "su" followed by sifyconnect. It worked. Sify Sucks Big! Phie on the Sify Broadband dialer developers who think it is necessary to have admin/root privileges to run that BS TCP/IP sifyconnect dialer. Well, no relief thereafter. I never saw persistent connectivy in Sify. There have been frequent "invalid sessions" and "autologout". I had to login every now and then.

The last and biggest annoyance is that Sify charges much more than that of Airtel or MTNL for comparable bandwidth. No wonder, it has always been the last resort for consumers. Grow up Sify competition is getting stronger!

Anyways, I am switching to MTNL.

Share your thoughts