DMA mode

From Audacity Wiki
Jump to: navigation, search
DMA is an abbreviation for the Direct Memory Access method of data transfer. Windows and Linux users should ensure DMA is enabled on their hard drives, as described here. This will help ensure fast and efficient editing, and smooth playback and recording.


Contents

Methods of data transfer

In DMA mode, data transfer is not done by the central processor, but by a small special processor called a DMA controller. It uses a procedure called cycle stealing, where the central processor memory access cycles are delayed for very short times to intersperse DMA controller memory access cycles. Some newer, faster DMA modes are called UDMA (Ultra DMA).

The alternative, slow and inefficient data transfer mode is called PIO, or Programmed Input-Output, where the central processing unit (CPU) transfers data byte for byte or word for word. This requires many processor commands for each data word and therefore causes a high and unwanted processor load. On a modern system, DMA can increase read and write speed by tenfold or more whilst substantially reducing CPU use.


Windows

DMA should be enabled on almost all modern Windows systems by default, and will cause problems if not. Some Windows 98 systems may not work with DMA on. Note that unused slots won't allow enabling of DMA. Older CD-ROM drives especially may not work with DMA on, or may have DMA mode permanently disabled. These drives should be left as they are. Consult your hardware driver documentation for guidance.

To enable DMA, follow the instructions below for your version of Windows.

Windows 98/ME

  1. Click Windows Start > Settings > Control Panel > System
  2. Click on the Device Manager tab at the top of the screen
  3. Click on the + sign next to the Disk Drives Icon
  4. Double-click on your IDE Disk Drive or CD-ROM drive as appropriate to display the Properties Window
  5. Click on the Settings tab located at the top of the screen
  6. Within the Options section, check the white box marked "DMA" to enable DMA mode
  7. Click OK and OK
  8. Repeat the above procedure for any additional Hard Drives or CD/DVD Drives you have in your system, then reboot


Windows 2000/XP/Vista

  1. Click Windows Start, right-click over My Computer > Properties, then on 2000 or XP click on the Hardware tab, then on the "Device Manager" button (on Vista click on "Device Manager" in the left-hand panel)
  2. Look for "IDE ATA/ATAPI controllers" and click the "+" sign to left of it
  3. Right-click on each channel in turn, hit Properties, and click the "Advanced Settings" tab
  4. For each listed device, make sure the transfer mode is set to DMA, not to PIO. On 2000 or XP this is done by selecting "DMA if available" in the dropdown of each device (on Vista, this is done by highlighting each device, then check "Enable DMA" in the panel underneath)
  5. Click OK (and a second OK on 2000 and XP), then reboot


Forcing DMA by uninstalling

If after reboot you find that the drive has reverted to PIO, the only real solution is to uninstall the drive (or channel on Windows XP and later), and allow Windows to detect and reinstall the drive or channel upon reboot. After this, DMA should be enabled and should persist. For example on Windows XP or Vista:

  1. Right-click over the Channel or Controller that has the disk which only offers PIO mode
  2. Click "Uninstall", or Properties > Driver tab then click "Uninstall"
  3. Confirm the uninstall if prompted, then reboot
  4. If the "Add new hardware" Wizard does not run, click Windows Start > Control Panel > Add Hardware
  5. Install the driver Windows prompts you to
  6. PIO mode should now be replaced with UltraDMA mode


Mac

Macs should not need any user intervention as hardware is usually very closely supported by the operating system.


Linux

Linux supports DMA but it is off by default in many distributions and this will compromise performance. If you use the hdparm command (as root), DMA can then be added to your initialisation scripts to run at boot time. To Enable DMA on Linux systems:

  1. Run as root
  2. Issue the command
    # hdparm /dev/hda
    which will give you a list of what mode your hard disk/controller is in; if you have multiple drives, you will need to use the appropriate last letter (hdb for 2nd drive and so on)
  3. Look for the line that says "using DMA"; If it says "using_dma = 1 (on)", DMA is enabled on this drive, or if it says "using_dma = 0 (off)" then you aren't using DMA
  4. Issue the command
    # hdparm -d1 /dev/hda
    to turn on DMA mode for that drive; if this gives a "not permitted" error, you may have to go further into IDE controller support (probably in the kernel)


For more information see some of the many articles on the web, such as this one.

Personal tools

Donate securely by PayPal, using your credit card or PayPal account!