Team LiB
Previous Section Next Section

Checking and Tuning Your Hard Disk

To get the best performance out of your hard disk, you sometimes have to do a bit of tuning. Although Linux will properly detect and configure most hard disks so they will work, sometimes the default settings will be either too conservative (so you get slow performance) or too aggressive (not as likely, but can result in errors).

This section describes how to display information about your hard disk. It then describes different ways of tuning disk options and benchmarking the results of those changes.

Getting Information About Your Disk

You can find out information about your hard disk using hdparm, fdisk, and other commands. To find out some general information, you could start out with hdparm simply followed by the name of the disk device. For example, you would identify the first IDE (ATA) hard disk using /dev/hda in the following command line:

   # hdparm /dev/hda
   /dev/hda:
     multcount    = 16 (on)
     IO_support   = 1 (32-bit)
     unmaskirq    = 1 (on)
     using-dma    = 1 (on)
     keepsettings = 0 (off)
     readonly     = 0 (off)
     readahead    = 8 (on)
     geometry     = 4865/255/63, sectors = 78165360, start = 0

The output shows some basic information about your hard disk. You can also list most of these items separately using options described below:

  • multcount-With multcount set to a number other than 0, IDE block mode is enabled. This allows multiple sectors to be transferred with each I/O interrupt (2, 4, 8, 16, or 32 sectors). Type hdparm-m /dev/hda to list just this line.

  • IO support-IO support set to 1 indicates that the hard disk supports 32-bit data transfers across the bus (usually PCI) to the interface card. From the interface card to the hard drive, data actually only uses a 16-bit connection over the ribbon cable. To take advantage of the 32-bit bus, however, data is packaged together in two 16-bit groups before it is sent to RAM or the CPU. Type hdparm-c /dev/hda to list just this line.

  • unmaskirq-The unmaskirq setting of 1 turns on the ability of the disk's driver to unmask other interrupts while processing a disk interrupt (to improve performance). Type hdparm-u /dev/hda to list just this line.

  • using dma-Describes whether or not DMA is on for the hard drive (1 is on; 0 is off). If the hard drive supports DMA, having DMA on can improve performance substantially. It should improve I/O throughput without increasing CPU use.

  • keepsettings-Shows whether or not DMA (-d), multcount (-m), and unmaskirq (-u) settings are kept after a soft reset. This is typically off, so that a reset will change settings back to a sane state in case of bad -dmu settings. Type hdparm-k/dev/hda to list just this line.

  • readonly-Tells whether or not the hard disk device is set for read-only. If read-only is on (1), no write operations are allowed to the disk. Type hdparm-r/dev/hda to list just this line.

  • readahead-This setting describes whether read-ahead seeks are on and, if so, how many sectors are read ahead. During large sequential reads, performance can improve by reading ahead some number of sectors, in anticipation that they will be needed by the operation requesting the data. The default eight sectors causes the file system to read ahead 4kb of data. Type hdparm-a/dev/hda to list just this line.

  • geometry-Displays information about the disk's geometry. From the output just shown, you can see that the hard disk has 4,865 cylinders, 255 tracks, and 63 sectors per tracks. The total number of addressable sectors is 78,165,360. The starting offset of the device is 0. Type hdparm-g/dev/hda to list just this line.

To display detailed identification information about your hard drive, you can use the hdparm -i command. The information displayed by hdparm-i was detected from the hard drive when you booted the computer. Here is an example:

   # hdparm -i /dev/hda
   /dev/hda:

   Model=WDC WD400JB-00ENA0, FwRev=05.03F05, SerialNo=WD-WCAD13418938
   Config={HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq}
   RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=40
   BuffType=DualportCache, BuffSize=8192kB, MaxMultSect=16, MultSect=16
   CurCHS=4047/16/255, CurSects=16511760, LBA=yes, LBAsects=78165360
   IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
   PIO modes:  pio0 pio1 pio2 pio3 pio4
   DMA modes:  mdma0 mdma1 mdma2
   UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
   AdvancedPM=no WriteCache=enabled
   Drive conforms to: device does not report version:

   * signifies the current active mode

The model of this hard drive is a Western Digital WD400JB Caviar 40GB hard drive. If you ever need to contact technical support team about the drive, you can see the firmware revision (FwRev) and serial number (SerialNO) for the drive from this output. Because your settings can change after Linux starts running, you can see current hard drive settings using the -I option as follows:

   # hdparm -I /dev/hda
   /dev/hda:
   ATA device, with non-removable media
     Model Number:       WDC WD400JB-00ENA0
     Serial Number:       WD-WCAD13418938
     Firmware Revision:   05.03E05
   Standards:
     Supported: 5 4 3 2
     Likely used: 6
   Configuration:
     Logical        max   current
     cylinders      16383 4047
     heads          16    16
     sectors/track  63    255
   --
     CHS current addressable sectors: 16511760
     LBA    user addressable sectors: 78165360
     device size with M = 1024*1024:     38166 MBytes
     device size with M = 1000*1000:     40020 MBytes (40 GB)
   Capabilities:
     LBA, IORDY(can be disabled)
     bytes avail on r/w long: 40 Queue depth: 1
        .
        .
        .

The information just shown was obtained directly from the current drive. So if you have done any disk tuning since the system booted, this output (rather than output from -i) should be used. Near the end of this output is the Commands/features section. This section shows features that are supported by the drive. If the feature is supported, an asterisk appears in the Enabled column. Here's an example of the commands/features output from hdparm-I for a Western Digital WD800JB 80 GB hard drive:

   Commands/features:
     Enabled Supported:
        *    READ BUFFER cmd
        *    WRITE BUFFER cmd
        *    Host  Protected Area feature set
        *    Look-ahead
        *    Write cache
        *    Power Management feature set
             Security Mode feature set
        *    SMART feature set
        *    FLUSH CACHE EXT command
        *    Mandatory FLUSH CACHE command
        *    Device Configuration Overlay feature set
        *    48-bit Address feature set
             Automatic Acoustic Management feature set
             SET MAX security extension
        *    DOWNLOAD MICROCODE cmd
        *    SMART self-test
        *    SMART error logging

Many of the features described in the next section are listed in this section. As you turn these features on and off, you'll notice the asterisk in the Enabled column going on and off when you re-run hdparm-I.

Changing Hard Disk Settings

The hdparm utility is one of the key tools for setting parameters for tuning your hard disk. Before we talk about changing disk settings with hdparm, however, take a look at the first comment in the configuration file (/etc/sysconfig/harddisks) that comes with the hdparm utility:

   WARNING!!!
   The kernel will autodetect the correct settings for most
   drives. Overriding these settings with hdparm can cause data
   corruption and/or data loss.

I think it's a great idea to practice and learn about some of the more potentially destructive features of hdparm on a test computer-or at least on a computer before it is deployed in your business. With that said, however, there are times when you might want to override some conservative defaults to improve the performance of your hard disk.

This section describes some ways of using hdparm to check and tune your disks. It also describes ways of benchmarking your system to check whether the options have improved or affected your disk performance.

Benchmarking Your Changes

A common practice is to check the performance of your hard disk before and after you make changes to it. This gives you some idea of the effect of your changes. Common tools for testing your hard disk performance (as well as the general act of reading and writing data on your system) are the hdparm-Tt and time commands. I also describe the bonnie utility for testing performance, which is not part of Fedora or other Red Hat Linux distributions.

Timing Reads

Using hdparm, you can time cache reads (-T) and device reads (-t).

  • -T option-This option essentially checks the how quickly data can be passed between the processor, memory, and disk cache.

  • -t option-This option reads continuously from the hard disk without reading previously cached data. This gives an indication of the speed at which Linux can read sequential data from the disk.

Here's an example of hdparm-Tt:

   # hdparm -Tt /dev/hda
   /dev/hda:
   Timing buffer-cache reads: 1476 MB in 2.00 seconds = 740.00 MB/sec
   Timing buffered disk reads: 164 MB in 3.01 seconds = 35.18 MB/sec

The output just shown is from a Western Digital Caviar 80MB hard drive (WDC WD800JB). The first line of output shows the number of MB of data (1,476MB) that can be read from cache in about 2 seconds, without touching the hard disk at all. The second line shows the number of MB of data (164MB) that can be read from the hard disk directly in about 3 seconds.

By way of comparison, I ran the same command on a Quantum Bigfoot CY6480A 6GB hard drive:

   # hdparm -Tt /dev/hda
   /dev/hda:
   Timing buffer-cache reads: 128 MB in 2.01 seconds = 63.56 MB/sec
   Timing buffered disk reads: 20 MB in 3.31 seconds =  6.04 MB/sec

You can see that the reads are considerably slower from this circa 1996 hard drive (not a bad command to try if you are looking to buy a used computer).

Here are a few tips for benchmarking with hdparm-Tt to get the best results:

  • Have as few processes as possible active when you do the benchmark. (You can run the top command to see active processes. Type P (which is the default) to sort by CPU usage. Then you can kill any very active processes that you don't need.)

    Caution 

    Don't just randomly go killing processes, even processes that are consuming a lot of CPU time. A better idea might be to go into single-user mode, since that should provide you with a system with very little activity.

  • Run it a few times, to be sure a momentary hiccup doesn't skew your results.

  • Have some free memory available. (If you are using top, press M to sort by memory usage and kill any process that is not required to free some memory.)

Timing Writes

To test options that change how writing is done to a disk (such as write-caching), you can simply time a large write operation with the options on or off. Here is an example where I used the time command to see how long it would take to copy a large file (in this case, a 637MB iso image) from one partition to another:

   # time cp severn-i386-disc1.iso /root
   real     0m34.295s
   user     0m0.110s
   sys      0m7.860s

Note 

Because the I/O speed depends to some extent on the location of the data on the platter, you will probably get different results from running the exact same command several times. By running it a few times, however, you can get an idea of the average amount of time the command takes.

The example just shown copies the iso image from the current directory to the /root directory. The time command shows that the operation took 34.295 seconds in real time. The user and sys lines show the amount of CPU time that was consumed by user-space calls and from kernel-space calls, respectively. Next, I turned off the write-caching feature (hdparm -W0), removed the iso file from /root, and ran the command again:

   # time cp severn-i386-discl.iso /root
   real  1m59.077s
   user  0m0.60s
   sys   0m8.900s

You can see that the copy took about four times as long (1 minute, 59.077 seconds) to complete. So, if you are willing to risk possible data loss in case power goes out, you can see that the time command shows significant improvement in completing a large copy operation with write-caching on in this case. (Of course, if you are that worried about data loss due to power going out, you should get a UPS.)

Instead of a plain copy, you can use the dd command to take a bit more control over the writes you test. With dd, you can precisely specify the block size and the number of blocks being copied. Using /dev/zero as the input file, you can copy as many "\0" characters to the output file as you like. Here's an example:

   # time dd if-/dev/zero of=/tmp/my-file bs=8k count=65536
   65536+0 records in
   65536+0 records out
   real    1m7.649s
   user    0m0.030s
   sys     0m3.780s

This created a 513MB /tmp/my_file. I can adjust the blocksize from 8k or the count from 65536 to test the disk performance based on different amounts and sizes of data.

Checking Reads, Writes, and CPU with Bonnie

Bonnie is a nice tool for checking performance of your hard disk, CPU, and other components in ways that emulate how the system is actually used. Using bonnie, you can check the actual system calls that are being made by the kernel to different devices as well as library calls to the basic libc library. The following are the types of performance activities you can check with bonnie:

  • Programs that read and write single characters-Bonnie can test writes of single characters (putc call) and (getc call) to hard disks. The potential bottleneck for these operations is the time it takes to make libc library calls on your computer.

  • Programs that read and write blocks of data-Bonnie can test writes (write call) and reads (read call) of blocks of data. Because performance of these activities may reflect buffering (that is, data that is in memory but not being currently read or written to hard disk), you might want to add some options to insure that you are testing disk performance and not just buffering. With the -y option to bonni e, buffered data is synced to hard disk after each write.

  • Database applications-Bonnie can test activities that are similar to the way applications access data in a database. The block in/out rewrite test that bonnie does interacts with data on a hard disk by reading some data, changing several bytes, writing the data back to disk, and rereading the data. This is a kind of overall test of how well your system might handle database access.

  • Busy system-By requesting more data than the system can handle (using the lseek call), bonnie can emulate how an overloaded system will perform. This tests how fast the hardware is at randomly accessing data from the hard disk.

The Bonnie project (www.textuality.com/bonnie) contains descriptions of bonnie and links where you can get the software (it's not included in any Red Hat distribution). I found a SuSE RPM version at www.garloff.de/kurt/linux/bonnie, which had a few nice enhancements. You can build from the source RPM you get there or use the SuSE i386 binary (which seems to work fine on Fedora and other Red Hat systems). You can also get that package from rpmfind.net (until they change the release number) by typing the following (all on one line):

   # wget rpmfind.net/linux/SuSE-Linux/i386/8.2/suse/i586/bonnie-1.4-
   124.i586.rpm

It is a good idea to run bonnie with amount of data larger than the default (100MB by default). Likewise, for a better test of hard disk performance, adding the -y option will work the disk harder by syncing all writes to disk. I ran the following bonnie command with write-caching on (hdparm-W1/dev/hda) or you could drop -y if write-cashing is off:

   # bonnie -s 300 -y
   Bonnie 1.4: File './Bonnie.18177', size: 314572800, volumes: 1
   Writing with putc()...         done: 20386 kB/s 89.0 %CPU
   Rewriting...                   done: 15913 kB/s 25.1 %CPU
   Writing intelligently...       done: 34819 kB/s 31.8 %CPU
   Reading with getc()...         done: 20819 kB/s 95.6 %CPU
   Reading intelligently...       done: 36583 kB/s 31.3 %CPU
   Seeker 1...Seeker 2...Seeker 3...start 'em...done...done...done...
              ---Sequential Output (sync)----- ---Sequential Input- -Rnd Seek-
              -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- -04k (03)
   Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU
   toy 1* 300 20386 89.0 34819 31.8 15913 25.1 20819 95.6 36583 31.3 257.2 1.7

With the command just shown, 300MB of data (- s 300) is used for each operation and all writes are synced to disk (-y). Assuming a system with little or no extra activity, the CPU numbers above show cases where character-at-a-time writes (putc) and reads (getc) proceed about as fast as the processor can handle (89.0% and 95.6%, respectively). The hard disk, rather than the CPU, is the bottleneck for block writing and reading (31.8% and 31.3%, respectively), as well as rewriting (25.1%).

After that, I turned off write cache (hdparm-W0/dev/hda) and ran bonnie again.

   # bonnie -s 300 -y
   Bonnie 1.4: File './Bonnie.18151', size: 314572800, volumes: 1
   Writing with putc()...         done: 5950 kB/s 26.0 %CPU
   Rewriting...                   done: 5070 kB/s 8.0 %CPU
   Writing intelligently...       done: 6179 kB/s 5.6 %CPU
   Reading with getc()...         done: 20820 kB/s 96.0 %CPU
   Reading intelligently...       done: 33795 kB/s 29.7 %CPU
   Seeker 1...Seeker 2...Seeker 3...start 'em...done...done ...done ...
   ---Sequential Output (sync)----- ---Sequential Input- -Rnd Seek-
             -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- -04k (03)
   Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU
   toy 1* 300 5950  26.0 6179  5.6  5070   8.0 20820 96.0 33795 29.7 226.2 1.8

As you might guess, writing to disk in particular slowed down quite a lot. Writing operations were three to five times faster with write cache enabled. For more information on options to use with bonnie, see the bonnie man page or the bonnie README file (in /usr/share/doc/ packages/bonnie).

Enabling Disk Write-Back and Read-Ahead Caches

You can improve overall write performance to disks by enabling disk write-back caches. Likewise, tuning the disk to do read-ahead caches can improve disk read performance when large amounts of sequential data are requested from the hard disk.

Turning on Write-Back Cache

With the write-back option on, a write operation can appear to be done after data is written to cache, but before it is actually moved to the hard disk. The driver can move on to get more data, and delays that come from slow seek times and disk revolutions can be made up over time.

Risks to enabling write-back caches include:

  • Power failures-If someone kicks out the power cord or if there is a power surge, it is possible that data the driver has been told was written to hard disk is not yet written on the physical hard disk. This can lead to data corruption.

  • Data flushed out of order-It's possible that a second data block can be flushed to disk before the first block arrives, which might also cause data corruption.

  • Data might become inconsistent-In instances where data must always be consistent, write-back caching should be turned off. In RAID systems where write stripes can span multiple disks, it is more likely for inconsistencies to arise if write-back caching is on.

Most modern hard drives have write cashing enabled by default. In fact, in many cases, the driver will not let you disable it. However, with some older hard drives, you can risk data corruption by turning this feature on. In fact, the hdparm command labels this feature as DANGEROUS.

If this feature is not already on (and you have assessed the risk of data loss as acceptable), you can turn on write-caching using the following command:

   # hdparm -W1 /dev/hda
   /dev/hda:
   setting drive write-caching to 1 (on)

When I used the time command to time a large file copy (see the Timing Writes section), there was significant real-time improvements (about four times faster) with write-caching on (-W1).

Turning on Read-Ahead Cache

With the read-ahead cache option turned on (which is the case by default in most cases), the hard disk's driver will read ahead a specified amount of data with the assumption that the read action will need more data. If the feature is turned on, you should see the following near the end of hdparm -I output:

   Commands/features:
     Enabled Supported:
        *    Look-ahead

You use the -A option to turn on (1) or off (0) the read-ahead feature. The following shows the feature being turned on:

   # hdparm -A1 /dev/hda
   /dev/hda:
   setting drive read-lookahead to 1 (on)

With read-ahead on, you can try different values to set how far ahead data should be read. You do that with the -a option. For example, to set the read-ahead value to eight sectors (4KB) you would type

   # hdparm -a8 /dev/hda
   /dev/hda:
    setting fs readahead to 8
    readahead    = 8 (on)

With a slow, older hard disk, it can help to have a higher read-ahead value (to a point). The following examples show how read performance differed when I changed the read-ahead values with my old Quantum Bigfoot hard drive (described earlier).

Note 

Notice that changing the read-ahead value doesn't have any impact on the buffer-cache test. That's because the buffer-cache reads test only gets data from cache and doesn't touch the hard disk.

The following shows read performance with read ahead turned off (-A0). I had similar results when I set read ahead to 8 (-a8).

# hdparm -a8 /dev/hda
# hdparm -Tt /dev/hda
/dev/hda:
 Timing buffer-cache reads: 128 MB in 2.00 seconds = 63.98 MB/sec
 Timing buffered disk reads: 10 MB in 3.60 seconds = 2.77 MB/sec

The next example shows how performance improved with read ahead set to 128 (I had similar results on setting it to 256):

# hdparm -a128 /dev/hda
# hdparm -Tt /dev/hda
/dev/hda:
 Timing buffer-cache reads:  128 MB in 2.01 seconds = 63.69 MB/sec
 Timing buffered disk reads:  22 MB in 3.24 seconds = 6.79 MB/sec

Setting read ahead to 64 resulted in improved performance, although not quite as much as setting it to 128 or 256:

# hdparm -a64 /dev/hda
# hdparm -Tt /dev/hda
/dev/hda:
 Timing buffer-cache reads:   128 MB in 2.01 seconds = 63.56 MB/sec
 Timing buffered disk reads:  20 MB in 3.25 seconds = 6.16 MB/sec

Turning on DMA

Hard disks typically support several different modes for transferring data, direct memory Access (DMA) is enabled on most hard disks today by default. In most cases, DMA will be turned on and the best possible DMA mode will be enabled. Older disks that don't operate in DMA mode can operate in the slower PIO mode. Here are descriptions of popular transfer modes for IDE/ATA hard disks:

  • Programmed I/O (PIO)-This is a fairly safe transfer mode, but requires a lot of CPU overhead and results in slower data transfers. Available modes include pio0, pio1, pio2, pio3, and pio4.

  • Multiword DMA (MDMA)-Multiword DMA allows the hard disk to communicate directly with system memory, bypassing the CPU. It does this using a feature called bus mastering, which lets the hard disk device control the PCI bus. Available modes include mdma0, mdmal, and mdma2.

  • Ultra DMA (UDMA)-UDMA refers to certain DMA modes that operate at a much higher rate of speed than multiword DMA rates. Available UDMA modes include udma2 (ATA/33), udma4 (ATA/66), udma5 (ATA/100), and udma6 (ATA/133).

Caution 

Use caution when you are changing DMA settings. Linux will let you switch to an unsupported DMA mode using hdparm, which could result in data corruption. Be sure to back up any important data before trying different DMA modes.

To enable UDMA, your computer's BIOS must support DMA and the I/O controller and the hard drive itself must be capable of UDMA transfers. For modes greater than udma2, your hard disk must be connected with a 40-pin, 80-conductor cable. The hard disk should report which DMA modes it supports. Here's an example of the portion of hdpa rm- i output that describes supported DMA modes:

   # hdparm -i /dev/hda
      .
      .
      .
   PIO modes:  pio0 pio1 pio2 pio3 pio4
   DMA modes:  mdma0 mdma1 mdma2
   UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5

The asterisk next to udma5 shows that it is the mode that was activated during boot time. To see the current setting (in case you changed it), use the hdparm -I option. To turn on DMA mode, you can use the hdparm-d option and to switch DMA modes you use the -X option. For example, to turn on DMA and set the current mode to mdma2 for the first IDE hard disk, you could type the following:

   # hdparm -d1 -X34 /dev/hda
   /dev/hda:
    setting using_dma to 1 (on)
    setting xfermode to 34 (multiword DMA mode2)
   using_dma           = 1 (on)

Table 9-1 shows the different -X values you could use to set different DMA and PIO modes.

Table 9-1: DMA and PIO Transfer Modes

Mode

Option to hdparm

Theoretical Maximum Transfer Rate

pio0

-X08

3.3MB per second

pio1

-X09

5.2MB per second

pio2

-X10

8.3MB per second

pio3

-X11

11.1MB per second

pio4

-X12

16.7MB per second

mdma0

-X32

4.2MB per second

mdma1

-X33

13.3MB per second

mdma0

-X34

16.6MB per second

udma0

-X64

16.7MB per second

udma1

-X65

25MB per second

udma2

-X66

33.3MB per second

udma3

-X67

44.4MB per second

udma4

-X68

66.7MB per second

udma5

-X69

100MB per second

Again, most times Linux will probe the best available DMA settings for your hard drive and configure it correctly. You can change them as just described, however, if you feel that the settings were either too conservative or too aggressive. After you change these modes, try running some benchmarks described earlier to choose the mode that is working best.

Trying Other Disk Tuning Options

Here are a few other parameters you can tune with hdparm:

  • Block mode transfers-Turn on multisector I/O mode (also called IDE Block Mode) to allow the driver to transfer more than one sector for each I/O interrupt. The -m0 option turns off this feature. A number other than zero sets the amount of data transferred in each interrupt to that number (-m2, -m4, -m8, or -m16). This is often set to 16 for 16 sector transfers. (See the MaxMultSect setting from the hdparm- i output to see the maximum number you can set multcount to.)

  • Hard disks with smaller drive buffers may perform better with smaller sector counts. This includes some WD Caviar drives. The following is an example of this option being set to 16:

    # hdparm -m16 /dev/hda
    /dev/hda:
     setting multcount to 16
     multcount    = (on)
    
  • Keep settings over reset-You got your disk tuned just the way you want it. So you want to preserve all your settings as long as your machine stays up. The problem is that once the drive is reset, your drive goes back to all the default options. To override that behavior, you can use the hdparm options - k1 (to preserve -dma options) or -K1 (to preserve -APSWXZ options).

    Note 

    The -K1 option only preserves settings over a reset of the disk drive controller. To make the changes permanent across a computer reboot, see the Making hdparm Changes Permanent section.

  • Set options quietly-When you set options in a configuration file or any other time that you don't want any output, you can add the - q option in front of each option. For example, hdparm_qd1-qX69/dev/hda will suppress output when turning on DMA support and udma5 mode.

Making hdparm Changes Permanent

Once you find hdparm settings you like, you can make them permanent in Fedora and other Red Hat Linux systems by adding them to the /etc/sysconfig/harddisks file. That way, the settings are used each time you boot your computer. You can set some options by simply uncommenting appropriate lines from the hard disk file. For example:

   USE_DMA=1
   MULTIPLE_10=16
   EIDE_32BIT=3
   LOOKAHEAD=1

By uncommenting those lines (removing the "#" character) you can turn on DMA, enable I/O transfer in multiple sectors (16 as set here), enable 32-bit I/O support, and turn on the read-ahead feature, respectively. As an alternative, you can add hdparm parameters directly to the EXTRA_PARAMS line at the end of this file. For example:

   EXTRA_PARAMS="-d1 -X67"

In this example, DMA is turned on (-d1) and the mode is set to udma3 (-X67).


Team LiB
Previous Section Next Section