≡ Menu

hard disk

Linux Ramback: Use a Terabyte of RAM

An experimental new design for Linux's virtual memory system would turn a large amount of system RAM into a fast RAM disk with automatic sync to magnetic media. Most servers comes with 2-16 GB ram installed but not with a terabyte of installed memory (for 1TB+ ram go with IBM / Sun E25k server line). There is a new kernel patch called Ramback:

Ramback is a new virtual device with the ability to back a ramdisk by a real disk, obtaining the performance level of a ramdisk but with the data durability of a hard disk. To work this magic, ramback needs a little help from a UPS. In a typical test, ramback reduced a 25 second file operation to under one second including sync. Even greater gains are possible for seek-intensive applications. The difference between ramback and an ordinary ramdisk is: when the machine powers down the data does not vanish because it is continuously saved to backing store. When line power returns, the backing store repopulates the ramdisk while allowing application io to proceed concurrently. Once fully populated, a little green light winks on and file operations once again run at ramdisk speed.

However, this solution depends upon UPS:

If line power goes out while ramback is running, the UPS kicks in and a power management script switches the driver from writeback to writethrough mode. Ramback proceeds to save all remaining dirty data while forcing each new application write through to backing store immediately.

OS X Love: Apple MacBook Air ~ The world’s thinnest notebook

Wow, I'm seriously considering one
#1: It runs on UNIX (OS X)
#2: Lightweight
#3: 2Gig RAM / 80GiB hard disk
#4: Inbuilt video camera and much more.

The new MacBook Air will be shipping in two weeks through the Apple Store and Apple Authorized Resellers for a suggested retail price of US $1,799. I want one.

How to: Upgrade Fedora Linux From 32-bit System to 64-bit Version w/o Reinstalling Server

This small guide may come handy...

From the article:

One great thing about Linux is that you can transplant a hard disk from a machine that runs a 32-bit AMD XP processor into a new 64-bit Intel Core 2 machine, and the Linux installation will continue to work. However, if you do this, you'll be running a 32-bit kernel, a C library, and a complete system install on a processor that could happily run 64-bit code. You'll waste even more resources if your new machine has 4GB or more of system memory, and you'll be forced to either not use some of it or run a 32-bit Physical Address Extension (PAE) kernel. Cross-grading to the 64-bit variant of your Linux distribution can help you use your resources more wisely. A disclaimer: changing the architecture of your Fedora installation from 32 to 64-bit isn't recommended or supported in any way. Perform this at your own risk after creating a suitable backup.

=> Upgrade from 32-bit to 64-bit Fedora Linux without a system reinstall [linux.com]

How do I find out Linux Disk utilization?

I've already written about finding out Linux / UNIX cpu utilization using various tools. You can use same iostat command to find out disk utilization and for monitoring system input/output device loading by observing the time the physical disks are active in relation to their average transfer rates.

iostat syntax for disk utilization report

iostat -d -x interval count

  • -d : Display the device utilization report (d == disk)
  • -x : Display extended statistics including disk utilization
  • interval : It is time period in seconds between two samples . iostat 2 will give data at each 2 seconds interval.
  • count : It is the number of times the data is needed . iostat 2 5 will give data at 2 seconds interval 5 times

Display 3 reports of extended statistics at 5 second intervals for disk

Type the following command:
$ iostat -d -x 5 3

Linux 2.6.18-53.1.4.el5 (moon.nixcraft.in)   12/17/2007
Device:         rrqm/s   wrqm/s   r/s   w/s   rsec/s   wsec/s avgrq-sz avgqu-sz   await  svctm  %util
sda               1.10    39.82  3.41 13.59   309.50   427.48    43.36     0.17   10.03   1.03   1.75
sdb               0.20    18.32  1.15  6.08   117.36   195.25    43.22     0.51   71.14   1.26   0.91
Device:         rrqm/s   wrqm/s   r/s   w/s   rsec/s   wsec/s avgrq-sz avgqu-sz   await  svctm  %util
sda               0.00   108.40  1.40 64.40    49.60  1382.40    21.76     0.04    0.67   0.44   2.92
sdb               0.00    37.80  0.00 245.20     0.00  2254.40     9.19    28.91  108.49   1.08  26.36
Device:         rrqm/s   wrqm/s   r/s   w/s   rsec/s   wsec/s avgrq-sz avgqu-sz   await  svctm  %util
sda               0.00    97.01  1.00 57.29    39.92  1234.33    21.86     0.03    0.58   0.50   2.89
sdb               0.00    38.32  0.00 288.42     0.00  2623.55     9.10    32.97  122.30   1.15  33.27


  • rrqm/s : The number of read requests merged per second that were queued to the hard disk
  • wrqm/s : The number of write requests merged per second that were queued to the hard disk
  • r/s : The number of read requests per second
  • w/s : The number of write requests per second
  • rsec/s : The number of sectors read from the hard disk per second
  • wsec/s : The number of sectors written to the hard disk per second
  • avgrq-sz : The average size (in sectors) of the requests that were issued to the device.
  • avgqu-sz : The average queue length of the requests that were issued to the device
  • await : The average time (in milliseconds) for I/O requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.
  • svctm : The average service time (in milliseconds) for I/O requests that were issued to the device
  • %util : Percentage of CPU time during which I/O requests were issued to the device (bandwidth utilization for the device). Device saturation occurs when this value is close to 100%.

How do I interpret the output result for optimization?

First you need to note down following values from the iostat output:

  1. The average service time (svctm)
  2. Percentage of CPU time during which I/O requests were issued (%util)
  3. See if a hard disk reports consistently high reads/writes (r/s and w/s)

If any one of these are high, you need to take one of the following action:

  • Get high speed disk and controller for file system (for example move from SATA I to SAS 15k disk)
  • Tune software or application or kernel or file system for better disk utilization
  • Use RAID array to spread the file system

For example, from about iostat report it appears that /dev/sdb under load. Hope this information will help you diagnose and optimize disk related issues.

Related: How to find out Linux CPU utilization using vmstat, iostat, mpstat and sar commands.

Please note that command and information discussed here almost applies to any other UNIX like variant.

Download of the day: Fedora Linux Games Live DVD

Fedora Games spin is a custom variant of Fedora targeted at Linux gamers. This is to demonstrate the gaming potential of Fedora without altering user's existing configuration. The Live DVD also allows installation to hard disk or USB flash.

Fedora Linux Games Live DVD

Download Fedora Linux Live DVD

=> Download DVD ISO and Bittorent files

Test If Linux Server SCSI / SATA Hard Disk Going Bad

One of our regular reader sends us a question:

How can I test if my hard disk is going bad? I see few errors in /var/log/messages file.

I/O errors in /var/log/messages indicates that something is wrong with the hard disk and it may be failing. You can check hard disk for errors using smartctl command, which is control and monitor utility for SMART disks under Linux / UNIX like operating systems.
[click to continue…]

HowTo: Flashing Your System BIOS Under Linux

The BIOS is Basic Input/Output System used by a computer, which embedded on a chip on a computer's motherboard. It is used to controls various devices connected to your computer. When you turn on the computer, the BIOS starts up and perform a Power-On Self Test (POST). The BIOS will check all devices connected to your computer such as the CPU, RAM, the video card, the sound card and so on. Once the post test has completed, the BIOS will looks for Linux operating systems on the hard drive. At this point, the Linux takes over control of your computer and finishes starting up system in GUI or text based mode.
[click to continue…]