How to enable write cache on sata drives?

Hello,

I'm building a NAS at home on FreeBSD 9.0-RC2. I'm wondering how can I enable the write cache on my SATA drives?
 
Will that increase performances?

EDIT: Yes it does: zpool scrub finished about 10 times faster!
 
I'm not sure it is the case because I see performance improvements since I enabled it
 
I think he is referring to 20110424 revision:

Code:
        The GENERIC kernels for all architectures now default to the new
        CAM-based ATA stack. It means that all legacy ATA drivers were
        removed and replaced by respective CAM drivers.
...
...
        It is possible to load devices ahci, ata, siis and mvs as modules,
        but option ATA_CAM should remain in kernel configuration to make ata
        module work as CAM driver supporting legacy ATA controllers.
...
...

        No kernel config options or code have been removed, so if a problem
        arises, please report it and optionally revert to the old ATA stack.
        In order to do it you can remove from the kernel config:
            options        ATA_CAM
            device         ahci

To be honest, I am confused here. Enabling this in /boot/loader.conf does make a difference in performance in all of my SATA based boxes.

On the other hand:

[CMD=""]hp# kldstat[/CMD]

Code:
Id Refs Address            Size     Name
 1   11 0xffffffff80200000 11cc3b0  kernel
 2    1 0xffffffff813cd000 203d18   zfs.ko
 3    2 0xffffffff815d1000 5bf8     opensolaris.ko
 4    1 0xffffffff815d7000 f3d0     aio.ko

It is obvious that there is no ahci module loaded.

Any ideas please ?

George
 
I guess loading ahci.ko in loader.conf is only a psychological performance boost after all :e

Code:
gkontos@hp>kldstat -v | grep ahci
                   
Id Refs Address            Size     Name
1   11 0xffffffff80200000 11cc3b0  kernel (/boot/kernel/kernel)
        Contains modules:
		72 pci/ata_ahci
		71 atapci/ata_ahci_ata
		50 pci/ahci
		49 atapci/ahci
		48 ahci/ahcich

What a shame :r :r
 
Back
Top