# SATA HDD is fast but SATA DVD is slow

## Drewgrange

I've been playing with different kernel settings for awhile and can't figure this problem out. 

I have an SATA hard drive and DVD writer. Motherboard is a Gigabyte p35-ds3r with an Intel ich9r SATA chipset and JMicron SATA/IDE chipset. 

In the kernel ATAPI stuff is completely disabled, SCSI generic/cdrom/drive are enabled, and Generic ACHI, Intel ICH ACHI, and JMicron ACHI are all turned on in the SATA/PATA menu. Disabling JMicron does not fix the problem, and I get a kernel panic when Generic ACHI is turned off. combined_mode=libata and irqpoll are in my kernel parameters.

hdparm -tT /dev/sr0 shows a read rate of about 4MB/sec for the dvd drive, while the hard drive plugged in to the same chipset gets around 70MB/sec

----------

## Theimon

I've been wondering the same thing. I also have a SATA DVD-rw (Optiarc (Sony/NEC) AD-7170S) but it won't get a higher datatransfer than around 3-4MB/s. 

Hdparm on my WD Raptor: 

```
hdparm -tT /dev/sda1

/dev/sda1:

 Timing cached reads:   2222 MB in  2.00 seconds = 1111.71 MB/sec

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

 (also not mindblowing, but in comparison to the next example......)

Hdparm on my Optiarc: 

```
hdparm -tT /dev/sr0 

/dev/sr0:

 Timing cached reads:   2202 MB in  2.00 seconds = 1101.40 MB/sec

 Timing buffered disk reads:   10 MB in  3.30 seconds =   3.03 MB/sec
```

So I checked dmesg to see how the Optiarc gets recognized: 

```
ata3.00: ATAPI: Optiarc DVD RW AD-7170S, 1.00, max UDMA/66
```

I wonder why it's being recognized as UDMA/66. I do get DVD write speeds up to 18x, which is its max speed, but I still think it's odd..

Anyone got an idea?

----------

## gb

...but worse:

```
root@luthien [/root]

# hdparm  -tT /dev/sr0

/dev/sr0:

 Timing cached reads:     2 MB in  3.56 seconds = 574.75 kB/sec

 Timing buffered disk reads:    2 MB in  3.56 seconds = 574.48 kB/sec

```

I also have a brand new sata dvd player (Pioneer) and a Jmicron SATA controller:

```
# lspci | grep -i sata

00:1f.2 SATA controller: Intel Corporation 82801HB (ICH8) 4 port SATA AHCI Controller (rev 02)

02:00.0 SATA controller: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller (rev 02)
```

Everything else seems to work swell, except reading from a data CD.

I'm on linux kernel 2.6.25-r5

Have not any solution to this problem as yet, and have not seen that it's been reported upstream as a bug either.

The Jmicron chipset seems to be one common denominator...and the fact that everything else work fine.

Can you'all see any more common factors?

----------

## cyrillic

While it is normal for CD/DVD drives to be a lot slower than harddrives, I think there is something else wrong if your cached reads are the same speed as your buffered disk reads.

One of my machines has a JMicron SATA controller with SATA DVD drives attached, and an nVidia controller with harddrives attached.

```
# hdparm -tT /dev/sda /dev/sr0

/dev/sda:

 Timing cached reads:   3032 MB in  2.00 seconds = 1517.33 MB/sec

 Timing buffered disk reads:  262 MB in  3.02 seconds =  86.77 MB/sec

/dev/sr0:

 Timing cached reads:   2606 MB in  2.00 seconds = 1303.83 MB/sec

 Timing buffered disk reads:   28 MB in  3.17 seconds =   8.84 MB/sec 
```

```
# lspci

00:0d.0 IDE interface: nVidia Corporation MCP55 SATA Controller (rev a2)

03:00.0 SATA controller: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller (rev 02) 
```

----------

## gb

What kind of kernel parameters do you guys have?

Mine are like:

```
root@luthien [/root]

# cat /usr/src/linux/.config | egrep -i "ide|ata|jmicron|scsi|blk" | grep -v "^#"

CONFIG_BLK_DEV=y

CONFIG_BLK_DEV_LOOP=y

CONFIG_HAVE_IDE=y

CONFIG_SCSI=y

CONFIG_SCSI_DMA=y

CONFIG_BLK_DEV_SD=y

CONFIG_BLK_DEV_SR=y

CONFIG_SCSI_WAIT_SCAN=m

CONFIG_ATA=y

CONFIG_ATA_ACPI=y

CONFIG_SATA_AHCI=y

CONFIG_ATA_PIIX=y

```

Here is something useful that I found, but haven't had time to read yet:

http://linux-ata.org/driver-status.html

----------

## cyrillic

If you look at dmesg where the DVD drive is detected, there may be some useful error messages.

----------

## gb

Good pointer. I do get some strange messages:

```
# dmesg | grep need

Driver 'sd' needs updating - please use bus_type methods

Driver 'sr' needs updating - please use bus_type methods
```

Some ACPI stuff:

```
ACPI Warning (tbutils-0217): Incorrect checksum in table [OEMB] -  A4, should be 9F [20070126]
```

And this is how it detects the dvd player:

```
ata5.00: ATAPI: PIONEER DVD-RW  DVR-215D, 1.06, max UDMA/66

ata5.00: configured for UDMA/66

ata6: SATA link down (SStatus 0 SControl 300)

scsi 4:0:0:0: CD-ROM            PIONEER  DVD-RW  DVR-215D 1.06 PQ: 0 ANSI: 5

sr0: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray

Uniform CD-ROM driver Revision: 3.20

sr 4:0:0:0: Attached scsi CD-ROM sr0

sr 4:0:0:0: Attached scsi generic sg2 type 5

```

Is UDMA/66 the kind of speed to expect these days?  Don't know offhand, have to read up on that. Nothing strikes me ass odd here, except for the obvious fact that's it's supposed to be a pretty fast player.

----------

