Difference between revisions of "DMA mode"

From Audacity Wiki
Jump to: navigation, search
 
(Windows: XP removal)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
='''Introduction'''=
+
{{Intro|[http://en.wikipedia.org/wiki/Direct_memory_access 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.|}}
  
DMA is an abbreviation for Direct Memory Access, where 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.  
+
==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.   
+
==Windows==
 +
DMA should be enabled on almost all modern Windows systems by default, and will cause problems if not. 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.
  
To enable DMA follow the instructions below for your version of Windows.
+
'''Windows Vista'''
 
+
# Click {{menu|Windows Start}}, right-click over {{menu|My Computer > Properties}}, then on '''Vista''' click on "Device Manager" in the left-hand panel
 
 
'''Windows 98, ME , 2000'''
 
 
 
# Click <span  style="background-color:#CCFFCC; color:#a0522d"> Start Button > Settings > Control Panel > System</span>
 
# Click on the Device Manager tab at the top of the screen
 
# Click on the + sign next to the Disk Drives Icon
 
# Double-click on your IDE Disk Drive or CD-ROM drive as appropriate to display the Properties Window.
 
# Click on the Settings Tab located at the top of the screen.
 
# Within the Options section, check the white box marked "DMA" to enable DMA mode.
 
# Click OK and OK
 
 
 
Repeat the above procedure on any additional Hard Drives or CD/DVD Drives you have in your system, then reboot. 
 
 
 
 
 
'''Windows XP and Vista'''
 
 
 
# On '''XP''', click <span  style="background-color:#CCFFCC;color:#a0522d">Start button > (Settings) > Control Panel > System</span>, click on the Hardware tab, then on the "Device Manager" button on the Device Manager panel. On '''Vista''', click <span  style="background-color:#CCFFCC;color:#a0522d">Start button > Control Panel > System and Maintenance</span>, then scroll down and click on Device Manager (or with Vista "Classic View", there is a direct link to Device Manager in the Control Panel).
 
 
# Look for "IDE ATA/ATAPI controllers" and click the "+" sign to left of it
 
# Look for "IDE ATA/ATAPI controllers" and click the "+" sign to left of it
 
# Right-click on each channel in turn, hit Properties, and click the "Advanced Settings" tab
 
# Right-click on each channel in turn, hit Properties, and click the "Advanced Settings" tab
# For each listed device, make sure the transfer mode is set to DMA, not to PIO. On 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 the box in the panel underneath "Enable DMA".
+
# For each listed device, make sure the transfer mode is set to DMA, not to PIO. On '''Vista''', this is done by highlighting each device, then check "Enable DMA" in the panel underneath)
# Click OK (and a second OK on XP) then reboot.    
+
# Click OK, then reboot     
 
 
  
  
 
'''Forcing DMA by uninstalling'''
 
'''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:
+
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 Vista 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 Vista:
  
# Right-click over the Channel or Controller that has the disc which only offers PIO mode
+
# Right-click over the Channel or Controller that has the disk which only offers PIO mode
 
# Click "Uninstall", or Properties > Driver tab then click "Uninstall"
 
# Click "Uninstall", or Properties > Driver tab then click "Uninstall"
 
# Confirm the uninstall if prompted, then reboot  
 
# Confirm the uninstall if prompted, then reboot  
# If the "Add new hardware" Wizard does not run, click Windows Start button > Control Panel > Add Hardware
+
# If the "Add new hardware" Wizard does not run, click {{menu|Windows Start > Control Panel > Add Hardware}}
 
# Install the driver Windows prompts you to
 
# Install the driver Windows prompts you to
# PIO mode should now be replaced with Ultra DMA mode
+
# PIO mode should now be replaced with UltraDMA mode
 
 
 
 
 
 
='''Mac'''=
 
  
 +
==Mac==
 
Macs should not need any user intervention as hardware is usually very closely supported by the operating system.  
 
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:
  
='''Linux'''=
+
<ol>
 
+
<li>Run as root</li>
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:
+
<li>Issue the command {{code|# 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) </li>
 
+
<li>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</li>
# Run as root
+
<li>Issue the command {{code|# 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) </li></ol>
# Issue the command <br><span style="color:red"> <code> # hdparm /dev/hda </code></span><br> which will give you a list of what mode your hard disc/controller is in. If you have multiple drives, you will need to use the appropriate last letter (hdb for 2nd drive, etc).
 
# Look for the line that says "using DMA". If it says "using_dma = 1 (on)", DMA is enabled on this drive. If it says "using_dma = 0 (off)" then you aren't using DMA.
 
# Issue the command<br><span style="color:red"> <code> # hdparm -d1 /dev/hda </code></span><br> to turn on DMA mode for that drive. If this gives a "not permitted" error, then you may have to go further into IDE controller support (probably in the kernel) but this is a first starting point.
 
  
  
For more information see some of the many articles on the web, such as <span class="plainlinks">[http://www.linuxdevcenter.com/pub/a/linux/2000/06/29/hdparm.html this one].</span>
+
For more information see some of the many articles on the web, such as [http://www.linuxdevcenter.com/pub/a/linux/2000/06/29/hdparm.html this one].

Latest revision as of 18:25, 2 November 2017

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.


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. 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 Vista

  1. Click Windows Start, right-click over My Computer > Properties, then 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 Vista, this is done by highlighting each device, then check "Enable DMA" in the panel underneath)
  5. Click OK, 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 Vista 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 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.