# 3ware 9650 controller read cache disabled - how to enable?

## snIP3r

hi all!

recently i checked my dmseg messages to check everything is ok, i found out that on my 3ware controller the read cache is disabled:

```

3ware 9000 Storage Controller device driver for Linux v2.26.02.009.

ACPI: PCI Interrupt Link [APC7] enabled at IRQ 16

ACPI: PCI Interrupt 0000:02:00.0[A] -> Link [APC7] -> GSI 16 (level, low) -> IRQ 16

PCI: Setting latency timer of device 0000:02:00.0 to 64

scsi0 : 3ware 9000 Storage Controller

3w-9xxx: scsi0: Found a 3ware 9000 Storage Controller at 0xfdeff000, IRQ: 16.

3w-9xxx: scsi0: Firmware FE9X 3.06.00.003, BIOS BE9X 3.06.00.002, Ports: 4.

scsi 0:0:0:0: Direct-Access     AMCC     9650SE-4LP DISK  3.06 PQ: 0 ANSI: 5

sd 0:0:0:0: [sda] 1874933760 512-byte hardware sectors (959966 MB)

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00

sd 0:0:0:0: [sda] Write cache: enabled, read cache: disabled, doesn't support DPO or FUA

sd 0:0:0:0: [sda] 1874933760 512-byte hardware sectors (959966 MB)

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00

sd 0:0:0:0: [sda] Write cache: enabled, read cache: disabled, doesn't support DPO or FUA

 sda: sda1 sda2 sda3 sda4

sd 0:0:0:0: [sda] Attached SCSI disk

sd 0:0:0:0: Attached scsi generic sg0 type 0

```

i am wondering about this because the write cache is enabled. perhaps this might be an issue for the "poor" read performance of the controller like beeing discussed here https://forums.gentoo.org/viewtopic-t-556357-highlight-3ware.html

i use kernel 2.6.22-gentoo-r8 using driver version 2.26.02.009, in 3dm2 software i have enabled storsave "performance" profile. i do have no bbu connected to the 3ware controller because i have an apc "Back-UPS BR 800" ups connected to my server  :Wink: 

is there a way to enable the read cache??

any help would be appreciated!

thx in advance

snIP3r

----------

## mwhitlock

Mine says that, too:

```
3ware 9000 Storage Controller device driver for Linux v2.26.02.009.

ACPI: PCI Interrupt 0000:02:00.0[A] -> GSI 16 (level, low) -> IRQ 16

PCI: Setting latency timer of device 0000:02:00.0 to 64

scsi0 : 3ware 9000 Storage Controller

3w-9xxx: scsi0: Found a 3ware 9000 Storage Controller at 0xe5200000, IRQ: 16.

3w-9xxx: scsi0: Firmware FE9X 3.08.02.007, BIOS BE9X 3.08.00.002, Ports: 8.

scsi 0:0:0:0: Direct-Access     AMCC     9650SE-8LP DISK  3.08 PQ: 0 ANSI: 5

sd 0:0:0:0: [sda] 3749867520 512-byte hardware sectors (1919932 MB)

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00

sd 0:0:0:0: [sda] Write cache: enabled, read cache: disabled, doesn't support DPO or FUA

sd 0:0:0:0: [sda] 3749867520 512-byte hardware sectors (1919932 MB)

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00

sd 0:0:0:0: [sda] Write cache: enabled, read cache: disabled, doesn't support DPO or FUA

 sda: sda1

sd 0:0:0:0: [sda] Attached SCSI disk

sd 0:0:0:0: Attached scsi generic sg0 type 0
```

But what do you consider poor read performance?  Here's what I get:

```
# hdparm -Tt /dev/sda

/dev/sda:

 Timing cached reads:   9538 MB in  2.00 seconds = 4775.46 MB/sec

 Timing buffered disk reads:  1212 MB in  3.00 seconds = 403.73 MB/sec
```

----------

## snIP3r

yes! mine is poor compared to yours:

```

area52 ~ # hdparm -Tt /dev/sda

/dev/sda:

 Timing cached reads:   2262 MB in  2.00 seconds = 1131.32 MB/sec

 Timing buffered disk reads:  544 MB in  3.01 seconds = 180.62 MB/sec

```

but i saw that you have a newer firmware... perhaps this might be the issue? i also saw you have an 8port controller, mine is only 4port.

what drives do you use?? i use 4x320gb wd 3200ys raid edition

----------

## WhiteSpade

So, the thing to use is sdparm to do this.  It's in portage.  In theory you just run the following command and then all is well

```
sdparm -s  RCD=0 -S /dev/sda
```

This, of course, doesn't work for me and I get an error.

```
   /dev/sda: AMCC      9500S-8    DISK   2.08

change_mode_page: failed setting page: Caching (SBC)
```

I've tried setting this using hdparm and blktool, but no dice so far.  Anyone have any thoughts? Is the problem because it's seeing the card and not the drives?

I hope the sdparm command helps you.

---Alex

----------

## snIP3r

 *WhiteSpade wrote:*   

> So, the thing to use is sdparm to do this.  It's in portage.  In theory you just run the following command and then all is well
> 
> ```
> sdparm -s  RCD=0 -S /dev/sda
> ```
> ...

 

hi alex!

thx for your reply! i thisk this will also not work for me cause i have also an 3ware controller... but i think i will try.

does the usage of sdparm make your system hang up??

greets

snIP3r

----------

## WhiteSpade

sdparm doesn't make my system hang up, but I noticed that using old firmwares caused me random hang-ups when using tw_cli.  3ware is pretty specific about which firmware should be used with which bios and which client.  Make sure they're all up to date and that might fix it.  It fixed the hanging for me.

Let me know if you make any progress!

---Alex

----------

## BernieKe

In order to get write cache you need to purchase and attach the battery backup unit. See http://www.newegg.com/Product/Product.aspx?Item=N82E16816116051

----------

