# hdparm, is this dangerous?

## Seather

Can anyone tell me if what I am doing here is dangerous at all? Specifically the read-ahead settings:

The drives are:

hda: Western Digital 80gb 2mb cache 7200 RPM ata-100

hdb: Western Digital 120gb 8mb cache 7200 RPM ata-100

hde: Western Digital 120gb Serial-Ata 8mb cache 7200 RPM

hdparm settings:

```
/dev/hda:

 multcount    =  0 (off)

 IO_support   =  1 (32-bit)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 65535/16/63, sectors = 117231408, start = 0

/dev/hdb:

 multcount    =  0 (off)

 IO_support   =  1 (32-bit)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 65535/16/63, sectors = 234375000, start = 0

/dev/hde:

 multcount    =  0 (off)

 IO_support   =  1 (32-bit)

 unmaskirq    =  0 (off)

 using_dma    =  1 (on)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 16383/255/63, sectors = 234441648, start = 0
```

This is the test results:

```
/dev/hda:

 Timing buffer-cache reads:   1240 MB in  2.00 seconds = 619.47 MB/sec

 Timing buffered disk reads:  110 MB in  3.00 seconds =  36.64 MB/sec

/dev/hdb:

 Timing buffer-cache reads:   1416 MB in  2.00 seconds = 708.11 MB/sec

 Timing buffered disk reads:  136 MB in  3.10 seconds =  43.85 MB/sec

/dev/hde:

 Timing buffer-cache reads:   1376 MB in  2.00 seconds = 687.42 MB/sec

 Timing buffered disk reads:  150 MB in  3.01 seconds =  49.86 MB/sec
```

Thanks!

----------

## mike4148

readahead is a software parameter; it's probably the least dangerous of all, though it's questionable whether increasing it to crazy levels will seriously help your performance under ordinary circumstances.

----------

## Seather

This actually does improve my performance dramatically!

----------

## NeddySeagoon

Seather,

You want to set multicount to 16, or the highest number the drive supports. Thats the number of sectors transferred per IRQ.  It will not increase the data transfer rate but it will reduce the CPU overhead, since you won't get an IRQ every sector.

----------

## dvc5

I've seen a lot of conflicting reports about this. But does anyone have a good hdparm setting for a laptop hard drive? Mine seems to be doing a lot of unnecessary reads/writes.

----------

## Seather

Thanks for that NeddySeagoon,

I now have my serial ata drive working through the scsi/via-sata driver, thus it's now /dev/sda, though hdparm doesn't work on it anymore? This isn't really a problem though seeing as the performance is good enough.

This is the current settings:

```

seather@lucy seather $ sudo hdparm /dev/hda /dev/sda

/dev/hda:

 multcount    = 16 (on)

 IO_support   =  1 (32-bit)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 65535/16/63, sectors = 117231408, start = 0

/dev/sda:

 readonly     =  0 (off)

 geometry     = 14593/255/63, sectors = 234441648, start = 0

```

And the test results:

```

seather@lucy seather $ sudo hdparm -t /dev/hda /dev/sda

/dev/hda:

 Timing buffered disk reads:  120 MB in  3.02 seconds =  39.75 MB/sec

/dev/sda:

 Timing buffered disk reads:  152 MB in  3.03 seconds =  50.09 MB/sec

```

lozdvc5 : It depends a lot on the drive and the drive's capabilities. Maybe play around with it a bit, see what works for you?

----------

