Projects / hdparm / Comments

Comments for hdparm

24 Feb 2006 03:07 avalonn

Re: Do NOT enable -W1! DO USE -W0 instead!
Sorry for dublicate postings. My page is now
here. ( If some moderator combine the posts it will be good...

24 Feb 2006 03:03 avalonn

Re: Do NOT enable -W1! DO USE -W0 instead!
I moved my page here.

30 Dec 2005 03:04 avalonn

Re: Do NOT enable -W1! DO USE -W0 instead!

> To me it seems that TCQ, NCQ and any
> write reordering CQ preserves the
> problem.

Ok. I've done some tests.

You can see how important is write cache for performance here. (

14 Nov 2005 07:54 avalonn

Re: Do NOT enable -W1! DO USE -W0 instead!

> If your drive supports tagged command

> queueing, it will help write performance

> as soon as support for this feature gets

> into your kernel. Tagged Command

> Queueing makes the write cache safe.

> Write barrier support patches are also

> circulating and may help safety, but

> before these are in you kernel, enabling

> the write cache or leaving it enabled

> without using tagged command queueing is



To me it seems that TCQ, NCQ and any write reordering CQ preserves the problem.

27 Jun 2005 12:38 ideguy

Re: sata drive usage?
If "hdparm -I /dev/sda" works (uppercase -I), then your kernel already has the passthru patch.

The I/O 16 bit only applies to non-DMA IDE drives. Since SATA drives all use DMA, that setting doesn't matter and is not supported by libata.

About the only flags you can play with to improve things are the "-A" (read-ahead) and "-W" (write-caching). A few people think -W1 is a bad idea, but as a kernel developer I generally crash my machine daily, and -W1 has never cost me any data while saving me hours of time (it really speeds up many machines).


27 Jun 2005 12:26 waltermh

Re: sata drive usage?

will try google for that patch i guess, never patched a kernel before
i have seen people online get numbers from -tT option for sata around 1000+ for cache, and 100+ for buffer, and i am getting 520-530 and 50-65 respectively
i am testing on 2 drives that dont do anything but hold backup files getting 60-65 buffer, and my main drive getting 54 buffer, of course testing multiple times, just hoping i can get numbers higher

io support is at 16 bit default, i get an error when switching to 32bit, is that one of those currently unsupported features?

27 Jun 2005 12:15 ideguy

Re: sata drive usage?

> is hdparm useful with sata drives, does

> it work with sata drives?

SATA drives in the 2.6 kernel are handled by the new "libata" SCSI driver. If you add the "ATA passthru" patch (from Jeff Garzik) to your kernel, then hdparm can work with those drives.

Some flags, like "-d", are not supported by libata. Currently, ALL SATA hard drives use DMA, so there is no need for -d. But eventually libata will have to implement ATA PIO (for CF cards..), and at that time it may (or not) begin to support the "-d" flag.

27 Jun 2005 11:53 waltermh

sata drive usage?
is hdparm useful with sata drives, does it work with sata drives?

when i try hdparm -d /dev/sda i get

[root@localhost ~]# hdparm -d /dev/sda


so i cant tell if its off or on, doing hdparm -v -I /dev/sda gets me this:

[root@localhost ~]# hdparm -v -I /dev/sda


IO_support = 0 (default 16-bit)

readonly = 0 (off)

readahead = 256 (on)

geometry = 30515/255/63, sectors = 251000193024, start = 0

HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device

I dont get that last part, when i try hdparm on my ata drive i can get all info.

03 Dec 2004 05:21 jago25_98

hdparm -Tt benchmark statistics
Anyone know of a site with hdparm benchmarks?

What do you get?

- post it here!

04 Mar 2004 19:26 johnlumby

unregistering / registering IF by hdparm - kernel prereq?
I am new to this. I have a laptop (IBM thinkpad) with ultrabay, and have a floppy drive and hard-drive-adapter which it can accept. I'd like to be able to hotswap them in and out as Windows can. I am running RH9 with a 2.4.20 kernel. I build hdparm 5.5 and after unmounting all partitions on my /dev/hdc, I tried
hdparm -U 1 /dev/hdc
(Based on the code in the contrib/idectl)
it replied
attempting to unregister hwif#1
but I can't pull the drive adapter and e.g. dd can still read the partitions. I assume it was not successful.

Do I need a newer kernel? 2.6.?

Also, I believe there is a bug in the contrib/idectl: it has

This looks the wrong way round to me, e.g. my dmesg says:
ide0: BM-DMA at 0x1860-0x1867, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0x1868-0x186f, BIOS settings: hdc:DMA, hdd:pio
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15


Project Spotlight


An open, cross-platform journaling program.


Project Spotlight


A scientific plotting package.