Moving A FreeBSD System To AHCI

Make a full backup first. Unless everything goes exactly
right—and maybe even then—you can find yourself locked out without an
easy way to fix things. A fixit LiveCD is handy to have available, or
another FreeBSD system.

Does The Motherboard Controller Support AHCI?

If AHCI support is present, enable it in the BIOS. If your BIOS or
chipset doesn’t do AHCI, you might as well stop reading now.

Label Filesystems

Labeling your filesystems will eliminate
the dependence on dynamic device names and make switching to AHCI much
easier. See
FreeBSD
Labeled Filesystems.

Modify /boot/loader.conf

ahci_load="YES"

Alternately, add device ahci to the kernel config and rebuild the
kernel.

Either way, your disks that were ad devices will now show as ada
devices. ad0 becomes ada0, and so on. If you use filesystem
labels as advised above, you don’t have to care.

Optional: Modify /etc/sysctl.conf

Increase vfs.read_max for better performance.

vfs.read_max=32

Some people have reported higher speeds with values of 64 or 128. It
depends on your hardware, and benchmarking is really the only way to
tell. /usr/ports/benchmarks/bonnie++ is popular.

Done!

That’s it. The AHCI driver usually provides a performance increase in
addition to more modern features than the old ATA drivers.