# hdparm help - SATA II

## Kvetch

I have been reading a bunch of posts about SATA and hdparm.  I am either confused or I am seeing mixed information.  Some say hdparm doesn't work on SATA because hdparm is only for IDE.  Others say it works fine for them.  Some say just add the "-i or -I" flag and it will work.  I don't see hdparm changing anything when I try stuff like # hdparm -d 1 -A 1 -m 16 -u 1 -a 64 /dev/sda.  I just get the error HDIO_SET_MULTCOUNT failed: Inappropriate ioctl for device.  I suppose my chip could be blacklisted along with what appears to be every other SATA drive/chip out there.  I have a SATA II Hitachi 160gb.  

hdparm gives me the following results.  These results look good to me but are they as good as they should be for a SATA II drive that should be 3gb/sec?  If it was 3gb/sec should it be something like 6000MB in  2 secs or 3000 MB in 1 sec?

livecd conf.d # hdparm -tT /dev/sda

/dev/sda:

 Timing cached reads:   3788 MB in  2.00 seconds = 1894.29 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

 Timing buffered disk reads:  186 MB in  3.03 seconds =  61.48 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

livecd conf.d # hdparm -tT /dev/sda

/dev/sda:

 Timing cached reads:   3748 MB in  2.00 seconds = 1873.35 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

 Timing buffered disk reads:  184 MB in  3.01 seconds =  61.08 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

livecd conf.d # hdparm -tT /dev/sda

/dev/sda:

 Timing cached reads:   3844 MB in  2.00 seconds = 1921.33 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

 Timing buffered disk reads:  184 MB in  3.02 seconds =  60.90 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

livecd conf.d # hdparm /dev/sda    

/dev/sda:

 HDIO_GET_MULTCOUNT failed: Inappropriate ioctl for device

 IO_support   =  0 (default 16-bit)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 20023/255/63, sectors = 164696555520, start = 0

Can I do anything to increase the performance of a Serial ATA II drive with hdparm.  Is sdparm what I want to use even if it isn't a SCSI drive?  

Thanks,

NickLast edited by Kvetch on Wed Jul 20, 2005 3:16 pm; edited 1 time in total

----------

## gonza

From the hdparm manpage:

"hdparm  provides  a  command  line interface to various hard disk ioctls supported by the stock Linux ATA/IDE device driver subsystem"

hdparm is not for sata or scsi disks. You can't use it to improve performance.

Your sata disks should be at /dev/sd* (I think you made a typo there)

----------

## Kvetch

Thanks

Yeah sorry that first line was a typo.  It is sda not hda.

So hdparm does me no good?

Is it showing me the true results of the performance of my drive?  If so how did it fare?

----------

## Kvetch

Okay I found some more stuff about hdparm and SATA.  I believe blktool is what I what to use (if I can)

http://sourceforge.net/projects/gkernel/

Basically for the SATA's they are probably set to their maximum potential already.

http://gentoo-wiki.com/HOWTO_Use_hdparm_to_improve_IDE_device_performance#I_get_.22Operation_not_supported.22_errors_on_even_basic_commands_such_as_.27hdparm_-i.27

According to this (generally above 1000MB for cached reads and above 50MB for buffered reads)

So my results aren't too bad I suppose.  Since I am doing about 1885MB/sec should I expect them to be higher due to SATA II, which should be double.  Am I wrong in thinking this?

Thanks,

Nick

----------

