• subscribe
  • twitter

Four ways to improve the perfomance of your FileSystem

Determining bottlenecks on your system is a step-by-step procedure of narrowing down the root causes. Performance optimization is relatively a complex process that requires correlating many types of information with source code to locate and analyse performance. This post is about tuning the system so that you can get the best out of if in terms of performance.

1.Velocity with Runit
If your boot process is to slow, then think about passing from Init to Runit. The principal difference between Init and Runit is that, instead of the sequential boot process as with Init, Runit uses the parallel boot process. By converting the same Linux machine to Runit, one is able to reduce booting time drastically, say about a minute difference between Runit and Init. That’s much. For Debian users the conversion is very easy. Just add the following line to /etc/apt/sources.list:

deb http://ftp.us.debian.org/debian unstable main non-free contrib

Then run:

sudo apt-get update
sudo apt-get install runit runit-services runit-run

Debian will take care of the conversion from Init to using Runit. Before rebooting tell the kernel to use runit instead of init.
Edit /boot/grub/menu.lst, find the line that loads your Linux kernel, and add init=/sbin/runit-init to the end
Now you can reboot and use runit for the first time by typing:

sudo runit-init 6

For non Debian users check out the producers website for more information.

2. Journaling. Most Linux users know this: When your system interrupts it takes several minutes and sometimes hours before it restarts. Time needed by the traditional filesystems to do special filesystem checks after an interruption. Using a filesystem that has journaling functions helps avoid these lengthy filesystem checks. Lost information can easily be recovered if a journaling filesystem is adopted. The most used journaling filesystems are EX3, ReiseFS and XFS.

3. Optimise your hard disk with hdparm. The performance of old hard disks could be improved by employing hdparm. First try to check-out the actual state of your hard disk with hdparm -i /dev/hda for example. In the PIO, DMA and UDMA modes you can see the current active mode in use. It’s marked with the asterisk(*). To change a hard disk to the PIO Mode 4 for example, carry out the following command

hdparm -p 4 /dev/hda

Hdparm has many options: Lets look at

hdparm -Tt /dev/had

The -T means to test the cache system (i.e., the memory, CPU, and buffer cache). The -t means to report stats on the disk in question, reading data not in the cache. The two together, run a couple of times in a row in single-user mode, will give you an idea of the performance of your disk I/O system. With hdparm you can also manipulate in on the size of the hard disk cache or make the hard disk go to the sleep mode.

4. RAM and CPU information. To quickly classentify the bottlenecks on your system, give a quick look at these files that are found in your filesystem /proc.

cat /proc/cpuinfo
cat /proc/meminfo

Cpuinfo gives detailed information on processor of the computer and the clock. Also shows data on processor model and Stepping.
Meminfo gives a long list of information on the Ram.

These commands (in rare cases) can cause data corruption, It is good advise to at least backup your system and bring it down to single-user mode(if you can) before proceeding.