The Perfect Replacement For MP3

Digital music is probably the only kind of music everybody is listening to these days. The reason being that its smaller in size and thus makes it easy to share and store. Imagine downloading a 4 minute track thats approximately 40 Mb in size in a place where access to the internet is terrible and costs a bomb (thats usually the case in most places in the world). Thankfully, compression algorithms exists that can compress the same audio track to one-tenth its size, thus we do not have to imagine the above.

Few weeks back I downloaded 2 albums, “My Dying Bride – A Line Of Deathless Kings” and “Slayer – Christ Illusion”. The Slayer album was ripped at a very low bitrate and was not sounding too good. The album contained 14 tracks and obviously it was ripped at a lower bitrate to reduce its size. Many thanks to all the people who shared the album with me, but it was just not to my liking. There was no quality and I was furious because it took me a long time to download the album as not many people were sharing it. Boy, what a waste of time and a killer of expectation. Well thats what made me write this.

Mp3 is an audio compression format that has taken the world by a storm. Mp3 is almost a synonym for music nowadays as Google is for search. Now, here comes the problem.. MP3 was good at one point in time, but not anymore. What’s better? OGG VORBIS. AAC, Lame, MP3Pro neither of ’em match up to Ogg Vorbis’ standards. Don’t take my word for it, you can do simple tests to prove it. Take your favorite audio cd, select a track that you have heard a million times and don’t mind listening to a hundred more and rip it to ogg vorbis as well as to mp3.
Compare the mp3 and the ogg file to the track on the cd by listening, well now you know what I’m talking about. The ogg file is a much faithful reproduction of the cd than the mp3. An ogg file of 80kbps (bitrate) is equivalent to an mp3 encoded at 128kbps. Hey, there is still one more issue called “size”. Ofcourse here again the ogg file beats the mp3 hollow. For the same size one can achieve a higher bitrate with ogg vorbis than with mp3. The best part ogg vorbis by default encodes in variable bitrate (which deliveres better quality than constant bitrate).

Isn’t this a great piece of information for any music lover? There are a more advantages in using ogg. Ogg is patent-free. Ok, we are just not bothered about patents here in India, but in this case we have to be because a lot of music that we listen to everyday is coming from outside India. Musicians who sell their songs in mp3 have to pay royalties. They could just save a bit more of cash by selling all over the world their songs in ogg vorbis. Not just does it benefit them but it also benefits listeners and fans. But do you think that they are seriously bothered? Music is become a business rather than an art form. Nobody cares about the quality of music their fans are listening to as long as they are minting big bucks and are being voted for the Grammy’s. Portable players like ipod’s also have to pay royalties but still are unwilling to support patent-free formats like ogg. Why? Because they too are doing well in selling their products. Neither the musician nor the manufacturers of players are bothered about the listener.

As a guy on one of the mailing lists puts it “if only all the music in china was ripped into ogg vorbis”, surely then a lot of players would be supporting it. There are a few portable players available that support ogg vorbis. Many of the game developers are using ogg vorbis and are very happy with the quality of sound and even happier because they are getting away without paying licenses. e.g. Doom 3.

Ogg is only the container just like avi. It can contain several data streams at once, like video and the corresponding audio. Vorbis is the name of an open source audio compression format. There exists Theora for video compression and Speex for speech. I haven’t really tried these though. If you notice I haven’t mentioned anything about Windows Media Audio (wma) and Real Audio (ra), thats because I find these to be very cheap proprietary formats. I would never recommend these to any music lover.

The best part about using ogg is that its open source. A lot of intense development will continue to take place to ensure that ogg vorbis remains the best. Its going to be literally impossible for any other proprietary format to beat ogg in the future. Almost all linux distributions play ogg out of the box. Things are looking bright for ogg, especially with all the Dell machines being sold with Ubuntu, we can expect a lot of vorbis encoded music from the US. Happy listening!


Linux Performance Tweaks

Not too long ago my boss and myself came up with a wise idea to make a list of all the linux tweaks usually done to improve the performance of a linux system. The idea has been taken to a higher level and each and every silly possible change that could improve the performance of the system has been added. Of course the actual list would be never ending, but these are a few that I could think of. Do mail me if you think of more that can be added.

The first thing to look at a brand new machine is its BIOS. There is a lot of junk in there that you may never require. For example, if the machine is going to be used as a file server the on-board sound card is never going to be used, or if the machine is never to be connected to a lan why leave the on-board lan card enabled. If the system is going to be run in text mode only the shared graphics memory required should not be more than 2MB. All these changes should be done according to requirement.

During installation do try your best to avoid software raid and lvm unless absolutely required. These are two lovely features but both of ’em degrade performance considerably. The next most important thing is to use a kernel that’s suitable to your processor architecture. For example, if you have a 686 processor use a i686 kernel, if you have a 586 processor use a i586 kernel and if you have multiple processors/cores use the smp kernel. These are the 3 most common kernels provided with any modern distribution.

Most of us know that ext2/ext3 is the filesystem that has to be used during installation. No doubt that the ext2/ext3 file system is very reliable but if you are seriously looking forward towards a faster and much more responsive system ext2/ext3 is a bad option. Xfs is by far the fastest filesystem, and if you are dealing with many small files reiserfs is the best. If you have a directory with many different types of files, try to break it up. it definitely will improve performance. Oh, and do use a lighter file manager. Something like Thunar is great.

The next thing of course is to disable the services you never use frequently. Services like ‘timidity’ and ‘apache’ may very rarely be used by you. Well you can always start them when required. Running services when not required is such a waste of resources. Imagine running a service such as ‘postgresql’ when all that you are doing with you system is browsing the Internet.

‘Prelink” drastically speeds up application start-up times. There are a lot of benchmarks done with and without prelink just to prove its superiority. In most modern distributions prelink is very stable and reliable.

Avoid using stuff like Kat, Beagle, Evolution etc. etc. At times these apps make the system so unusable. There are much more lighter apps to get your work done. Take for instance, to do a quick word processing job why use ‘OpenOffice Writer’ when Abiword (which is much more lighter) can do the job just fine.

Use a light window manager. My best suggestion WindowMaker. Fluxbox also does a fine job. Well it will take you some time to get used to it. Hey but life is all about changes. I mean, when i started using computers i never knew what linux was. You just adapt to whatever suits you.
Well, i know that the above suggestion is not a easy one, but if you are using something like Gnome or KDE avoid using many taskbar applets. Those are real resource hungry. Also wallpapers, icons and files/folders on the desktop consume resources. In linux you have a central storage for each user, so use it for all your files. It keeps your system a lot cleaner, your desktop clear, and you can keep things more organized (atleast i can).

My greatest suggestion in this entire article would be to stay abreast with the latest distro. The only way to achieve this is to have a separate /home partition. So the next time you install a new distro, do not format your /home partition but only all the others for the installer to install the required packages and their related files. Packages change over time, Xorg is better than Xfree, Alsa is better than Oss, Udev is better than devfs. Most of all the kernel undergoes major changes, many of which are performance related.
Most of the latest distros have packages that are compiled using GCC 3.4 and upwards. GCC 3.4 compiles programs so they run at least 7% faster. Do you really want to miss out on such good performance gains?

For ext3 filesystems “noatime” and “data=writeback” are good options to have in the ‘/etc/fstab’ file.
/dev/hda1 / ext3 defaults,errors=remount-ro,noatime,auto,rw,dev,exec,suid,nouser,data=writeback 0 1
And for reiserfs add the option “notail” but remove “data=writeback”
/dev/hda7 /boot reiserfs noauto,noatime,notail

Six text-mode virtual consoles are absolutely unwanted for a user like me, and considering that each of these virtual consoles consume memory turns me off. Comment out the lines for the unwanted virtual consoles in ‘/etc/inittab’ and issue the command “init q” as root to make changes done without rebooting.

In most of the modern machines with 512MB and more ram a lot of swapping is not required. The more the swapping done when there is enough ram to do the job is a waste of performance. The default value is vm.swappiness=60. To change it issue “echo ‘vm.swappiness=<value>’ >> /etc/sysctl.conf” as root. Then issue #swapoff -a and #swapon -a. Generally a value from 20-30 is great for most modern machines. Find the right value that suits your needs.
The swap partition has to be created roughly in the middle of the harddisk for it to be easily accessed. Since the swap partition is accessed in very short bursts occasionally its the best option. Yeah, this is not one of those easily experimentable suggestions.

Coming to the harddisk.. Oh no, this is my most hated piece of hardware in a computer. It has moving parts, its unreliable and its a pain to maintain. Sometimes i wish i had an external usb hub with max capacity thumb drives built into it to use as a storage medium. I guess it would be enough for my day to day work. I dont know if it would be faster than a 10000 rpm hdd, but im sure its much more reliable because it can withstand more shocks, it does not heat up as much and it has no moving parts. To increase hdd performance there’s nothing better than ‘hdparm’. It tests speeds of the drive and give you a quite a bit of control over the hdd’s parameters. With ‘hdparm’ you can set the readahead, configure power management, enable/disable dma, display drive geometry, speed up/down the head movement, set spindown time and a whole lot of other neat stuff. Once you have got all options to your liking, add it to the end of ‘/etc/rc.sysinit’ so that it gets executed towards the end of the system’s booting process.
For example a line like this could be added:
hdparm -a1024 -c3 -d1 -m16 /dev/hda

Like i said earlier there are a lot of ways to improve the system’s performance. These are only a few i can think of. Try out ‘powertweak’ its good. Readahead, preload, upstart, teardown are good for boot-up, shutdown, and faster application loading times. Do not forget to inform me of something that i could add to this list.

Enlightenment e17 Installation

Yesterday I installed Enlightenment e17. I had heard a lot about Enlightenment e17, had seen a lot of screensots (,,, and found them impressive. After a lot of searching I got all the packages for ubuntu edgy (6.10) from http://seerofsouls. This is a great repository for all the PLF packages for Debian, Ubuntu and Mandriva. The total size of all the e17 packages and its dependencies was about 50MB. Got it all installed perfectly. The moment of truth was when I logged in.

Awesome, gorgeous, sexy, simply superb… boy oh boy this is what everyone who has used e17 was going ga ga about. This is the best window manager I have seen till date. I’m still using the default theme, haven’t changed it yet. Its a bit more heavier than the enlightenment e16.. but for the eye candy its definitely worth it. Not to forget its much much lighter than gnome or kde. The effects are mind blowing, I bet you can use it on a machine with 128 megs of RAM.

The best part of e17 was that it generated beautiful menu’s with all my installed packages. e17 is very modular in the sense you only enable whatever you require and disable the rest which will then not consume any resources in the background. As soon as you turn off all effects you can notice a significant improvement in performance. The configuration and settings are real simple to change, thanks to the lovely gui tools.

There is a very well maintained user guide at along with all the packages and other forums. For all the missing files and libraries visit

After a bit of playing around I decided to try beryl with e17, although I knew beryl only works with kde, gnome and xfce. Well the obvious happened, my X server cashed. It would have been nice to see the both working together. I wouldn’t call e17 very unstable because I didn’t experience any crashes. I wonder why the developers still want to say e17 is in its alpha stages. Believe it or not every library for e17 has been written from scratch.. nothing taken from e16. I haven’t come across any file manager, I guess they do not have one. Maybe I’ll use PCMan or Thunar along with e17.

WindowMaker still remains my favourite lightweight window manager (I believe its the lightest)… but I guess I’ll be sticking to e17 on my home machine atleast for a long time.