The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

Tweak DMA settings for max drive performance

Contributed by: David Siefert
This tip is valid for: Both BeOS and Haiku

[Editor’s note: DO NOT use techniques outlined in this tip if your hard drives are not seen by your computer’s BIOS. Bad things may happen. In addition, if you have a modern BIOS and modern drives, DMA should be enabled by default. This tip may help you to eek a little extra performance out of the drives though. Use these techniques at your own risk!]

You can probably improve data rates with DMA transfers enabled on hard drives. To enable DMA, you must edit the ata configuration script. To start off, copy /boot/home/config/settings/kernel/drivers/sample/ata to /boot/home/config/settings/kernel/drivers/ata (i.e. move it out of the “samples” directory). Edit this file to suit your system, as follows:

deviceat 1 0 {



matchdevices {

    match {

        model "WDC AC23200L"


    use {




Where it says ‘deviceat 1 0’, make sure this is correct for your system as: deviceat bus[primary/secondary] id[master/slave]. In my scenario, the hard drive is on the secondary ide controller (thus I chose 1), and it is the master drive (so I chose 0). If your not sure what your hard drive is placed at, you can check the /dev fs. i.e.: /dev/disk/ide/ata/0/slave/0/raw , you would put, deviceat 0 1, because it is on 0 (primary), at slave (1). If you understand all that, your in the green. An easy way to get raw device paths is to use the “df” command.

Now, in the ‘match’ block, set the hard drive model string. You can find this out with the ideinfo or idestatus commands included in the /optional/experimental/diagonstics directory on the R4.x CD (ask a veteran user for these if you don’t have them handy). Alternatively, watch your bootup screen for the drives detected, or open up your computer and see what the model number is on the hard drive itself. Mine is ‘WDC AC23200L’ which is a Western Digital Caviar 3.2 Gigabyte drive (or 3200 Megabytes).

‘forcedma’ will enable DMA transfers along the drive(s) you specified, ‘nodma’ will disable DMA transfers.

Here are some of the benchmarks I achieved with BeRometer:

Test Units Without DMA With DMA

Disk File Creation files/second 188.7 365.8
Disk File Deletion files/second 226.2 260.4
Disk File Output KB/sec 2113.0 5324.3
Disk File Input KB/sec 1575.1 5977.8

As you can see, with DMA enabled on the drive, file transfers are a lot faster. Since the hard drive was faster, my system more responsive with DMA, and sluggish without DMA. This drive is only DMA/33 with Personal Edition. I have not tested it on my ata/66 drive yet, but eventually will in which this tip will be updated with additional benchmarks.

Posted in Hardware

(comments are closed).