# Is this correct speed for SATA?

## NeoX

Hi,

I've search through the forums and it seems anyone with SATA hdd has like double the speed of the cache read speed....

This is my speed: 

```
/dev/sda:

 Timing cached reads:   1280 MB in  2.00 seconds = 639.14 MB/sec

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

 Timing buffered disk reads:  172 MB in  3.03 seconds =  56.77 MB/sec

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

```

My system specs:

gigabyte ga-7vm400am 

sempron 2400

Maxtor Maxline III 300gb hdd

Yes my cached read just seems so slow.....is this correct or is there definately something wrong with my system?

Thanks

----------

## agent_jdh

It looks like that's your limit for whatever chipset you have - however the "Inappropriate ioctl for device" part is interesting, maybe there is some issue with the kernel and your chipset. There isn't much tuning you can (or should have to) for SATA - it should all auto-configure.

The 2nd figure is far more important btw and seems a reasonable number.

----------

## zietbukuel

/dev/sda:

 Timing cached reads:   1668 MB in  2.00 seconds = 833.95 MB/sec

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

 Timing buffered disk reads:  168 MB in  3.02 seconds =  55.55 MB/sec

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

I had that "failed" message too , what could be wrong?   :Confused: 

----------

## agent_jdh

Well, I'm getting this-

```
hdparm -t -T /dev/sda

/dev/sda:

 Timing cached reads:   2092 MB in  2.00 seconds = 1045.93 MB/sec

 Timing buffered disk reads:  168 MB in  3.00 seconds =  56.00 MB/sec
```

With a Hitachi 160GB SATA on a Sil3112A (ABit AN7, nForce2).  But nothing about the ioctl.

What chipset(s) are you guys running?  This is on gentoo-sources-2.6.15 btw.

----------

## troebel

hey, I have those ioctl lines too  :Surprised: 

```
# hdparm -t -T /dev/sda

/dev/sda:

 Timing cached reads:   2200 MB in  2.00 seconds = 1099.93 MB/sec

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

 Timing buffered disk reads:  170 MB in  3.02 seconds =  56.36 MB/sec

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

```

on a 2.6.14-gentoo-r5 kernel

@NeoX: I never had to do any configuring... except for building nvidia SATA support in my kernel.

----------

## agent_jdh

 *troebel wrote:*   

> hey, I have those ioctl lines too 
> 
> ```
> # hdparm -t -T /dev/sda
> 
> ...

 

Maybe it's some (minor - your speeds seem OK) issue w/ the nvidia sata driver.

We seem to have attracted a spammer.

----------

## zietbukuel

Anyone knows how to fix that errors?   :Shocked: 

----------

## agent_jdh

 *zietbukuel wrote:*   

> Anyone knows how to fix that errors?  

 

I guess that it's a driver issue the only thing you can really try is upgrading your kernel.

----------

## drescherjm

```
# hdparm -t -T /dev/sda

/dev/sda:

 Timing cached reads:   960 MB in  2.01 seconds = 478.06 MB/sec

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

 Timing buffered disk reads:  168 MB in  3.01 seconds =  55.77 MB/sec

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

```

Same here for a Segate 400 GB 7200.8

 *Quote:*   

> What chipset(s) are you guys running? This is on gentoo-sources-2.6.15 btw.

 

Advanced Micro Devices [AMD] AMD-760 MP

RAID bus controller: Silicon Image, Inc. SiI 3114 [SATALink/SATARaid] Serial ATA Controller (rev 02)

```
 # uname -a

Linux jmd0 2.6.13-gentoo-r3 #1 SMP Sat Oct 8 21:46:30 EDT 2005 i686 AMD Athlon(tm) MP 2200+ AuthenticAMD GNU/Linux

```

----------

## fserafin

i have the same problem but my speeds seem very high 

```
 hdparm -t -T /dev/sda

/dev/sda:

 Timing cached reads:   3572 MB in  2.00 seconds = 1785.89 MB/sec

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

 Timing buffered disk reads:  182 MB in  3.01 seconds =  60.42 MB/sec

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

```

```
uname -a

Linux localhost 2.6.14-gentoo-r7 #1 SMP Mon Jan 9 01:14:05 CST 2006 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ AuthenticAMD GNU/Linux

```

----------

## drescherjm

 *Quote:*   

> i have the same problem but my speeds seem very high 

 

The first number is a measure of cache performance which is dominated by the performance of your memory. Since you have very fast ram and a fast processor you will get a high score here. Your second number is normal for sata disks.

----------

## xbb

```

/dev/sda:

 Timing cached reads:   4820 MB in  2.00 seconds = 2407.96 MB/sec

 Timing buffered disk reads:  206 MB in  3.02 seconds =  68.24 MB/sec

```

WD Raptor WD740GD  :Smile: 

----------

## agent_jdh

 *xbb wrote:*   

> 
> 
> ```
> 
> /dev/sda:
> ...

 

68MB/s vs. 56 MB/s.  How much did that Raptor cost   :Wink:  per gig?

----------

## drescherjm

The benifit for the raptor is not really the STR but the seek time which is much faster (I believe 2 to 3 times as fast). Improved seek time greatly improves smaller / fragmented io operations that are dominated by seek time.

----------

## cyanide_nfs

/dev/sda:

 Timing cached reads:   2740 MB in  2.00 seconds = 1369.91 MB/sec

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

 Timing buffered disk reads:  140 MB in  3.02 seconds =  46.42 MB/sec

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

i get the same errors   :Laughing: 

----------

## dsd

those "errors" will go away in 2.6.15 (they are not really errors).

also note that if you run hdparm twice in a row on a kernel where those errors appear, the speeds (especially the first reading) will increase. this is an inaccurate way of measuring performance...

----------

## Gentree

could you expand on that last bit?

I always find that a second (or subsequent) run gives better figure. I assumed that was due to loading the libs related to hdparm and that the later figures where more accurate.

Is that true? Was your comment restricted to kernels displaying those errors?

Thx.   :Cool: 

----------

## eccerr0r

I found that merely having cpufreq set as 'ondemand' frequency scaling on my p4 drops hdparm results by around 15%,  setting it to 'performance' gets it back higher.  (was wonderring why my 58MB/s drive was only showing up as 49MB/s...)

OnDemand (power save)

 Timing cached reads:   964 MB in  2.00 seconds = 481.58 MB/sec

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

Performance (default)

 Timing cached reads:   1680 MB in  2.00 seconds = 839.45 MB/sec

 Timing buffered disk reads:  176 MB in  3.03 seconds =  58.18 MB/sec

I admit, I'm cheating here, this is a PATA (HGST 7k250) drive, ICH5, Single-channel DDR, P4.  Next I'll need to try it with the SATA-to-PATA bridge...

----------

## gasparov

Strange:

   on a newer 250GB sata maxtor running on debian stable 2.6 kernel with some via controller and a celeron 2Gig:

```

caldaia:~# hdparm -tT /dev/sda

/dev/sda:

 Timing cached reads:   1216 MB in  2.00 seconds = 607.18 MB/sec

 Timing buffered disk reads:  206 MB in  3.02 seconds =  68.24 MB/sec

```

on an older 160G maxtor (9 serie) ,all intel 2,6 NothwoodC ....and gentoo

```

gas@gentoo ~ $ sudo hdparm -tT /dev/sda

Password:

/dev/sda:

 Timing cached reads:   3472 MB in  2.00 seconds = 1736.30 MB/sec

 Timing buffered disk reads:  158 MB in  3.03 seconds =  52.13 MB/sec

gas@gentoo ~ $ sudo hdparm -tT /dev/sdb

/dev/sdb:

 Timing cached reads:   3232 MB in  2.00 seconds = 1615.22 MB/sec

 Timing buffered disk reads:  160 MB in  3.01 seconds =  53.19 MB/sec

```

Newer hardware =faster physical read 

but

Via chipset=worse than intel?

I don't know

TIP:don't be stupid like me and if you buy a bigger new drive buy the newest model with the most cache.

----------

## Gentree

newer hardware makes sense and agrees with the disk timings.

for the cached timings you need to take many other factors into account rather than just via vs intel.

memory size/speed; fsb ; cpu; and maybe you have more control over gentoo than you do with debs stable which I imagine you have kept pretty much standard trim. IIRC debs is compiled i586.

certainly with almost a factor of 3 difference it would be very interesting to pin down exactly where the gains are.

maybe look at the kernel config for debian and see if you can see any differences.

 :Cool: 

----------

## lodder_

i don't think this is very good how can i improve that  :Sad: 

```

dionysus lodder # hdparm -t -T /dev/hdc

/dev/hdc:

 Timing cached reads:   2176 MB in  2.00 seconds = 1086.48 MB/sec

 Timing buffered disk reads:    6 MB in  4.50 seconds =   1.33 MB/sec
```

----------

## Gentree

search the forum (a bit more) , there are lots of posts on this sort of prob even this week, I'm not going to repost all the advice.

check you have the right cable and then search for hdparm, that should bring up most relevant threads.   :Cool: 

----------

## lodder_

after a bit of searhing i found out that the kernel i was still using didn't support sata verry wel  :Sad:  and i yust updated the kernel and now it works perfect  :Wink: 

----------

## Gentree

glad you're fixed. For reference what was the problem kernel ? May help others searching sim probs.

always nice to post your solution and add [SOLVED] by editing first post.

 :Cool: 

----------

