Managing Computer Resources and Drivers

From Audacity Wiki
Jump to: navigation, search
This page provides a checklist of essential tips to ensure your computer has sufficient resources, properly tweaked hardware and appropriate drivers to record without dropouts or clicks.
Related article(s):

A computer is not a ready-made recording studio

Recording is a much more demanding activity than playing an audio file in an application like Windows Media Player. Real-time recording is a very resource-intensive task for computers, which in most settings are not recording studios but multi-task machines with many competing demands on their processor. Therefore it's important to take steps to maximise available computer resources when recording.

Also the computer sound device, the drivers it came with and other hardware as shipped may not be up to the job of recording properly. This is especially likely to be true on a laptop or netbook computer. Consider upgrading to better equipment such as a professional microphone and an external USB or Firewire recording interface.

Ensuring sufficient computer resources are available

  1. Close all un-necessary programs and processes while recording.
  2. Be aware of background virus scanners and other system tray programs. By default, Norton, Sophos and other anti-virus products scan each Audacity .au file as it is written. This scanning can affect recording as it takes too long. See if the scanner can be configured to ignore files written in Audacity's temporary directory (see point 3 below). Otherwise, consider disconnecting from the internet then disabling your firewall while recording - some common firewalls can consume 30% or more of a slower computer's processor usage.

    Avoid scheduling security updates such as Windows Update during recordings, or allowing the computer to choose its own random times to update. Instead, schedule updates to run overnight or at other times when you know you won't want to record.

  3. Set the path to the Audacity temporary directory to a local drive, not a network or USB drive. Audacity's temporary directory is used for storing audio data whilst recording and needs fast access. The path can be set in the Directories Preferences. Try to avoid data transfers between networked computers while recording is taking place.
  4. Set system swap or paging file appropriately. Recordings will stop if the paging file is full.
  5. Consider installing more RAM, RAM is relatively inexpensive and extremely cost-effective in improving computer performance.
  6. Consider reducing the bit depth for recording and importing from the default 32-bit to 16-bit. This can be done at "Default Sample Format" on the Quality Preferences. Reducing the bit depth halves the amount of data processed and the time taken to write it to the disk.
  7. Set the Project Rate to 44100 Hz at bottom left of the Audacity window or in Quality Preferences as above. Higher rates will significantly increase the data load without proportionately improving the quality.
  8. Don't record stereo unless you have to. Stereo requires your machine to handle twice as much data. A single instrument or solo vocal track should usually be recorded in mono. You can position it in the stereo mix later. To record in mono, set recording channels to "1 (mono)" on the Devices tab in Audacity .
  9. Turn off "Auto-scroll while playing" on the Interface Preferences. This stops the display re-drawing as the recording is made, freeing resources for recording. Alternatively minimize Audacity during the recording.
  10. Disable the Meter Toolbar on the View > Toolbars in Audacity. This prevents resources being used continually refreshing the meters.
  11. Zoom out to the whole length you will be recording.
  12. Consider turning off "software playthrough" on the Recording tab in Audacity. If you need to hear what you are recording, try unmuting and turning up microphone or line-in in the playback section of the Windows system mixer or Linux ALSAmixer. On Mac, try the Audacity "hardware playthrough" option instead of "software playthrough".
  13. Consider increasing the default "Buffer length" setting of 100 milliseconds. This can be changed in the "Latency" panel in the Devices Preferences. Doing so will increase the amount of time audio takes to travel through the sound device and will ease the strain on the CPU because the audio will be taken through in larger chunks. The disadvantage is that this will increase the delay in laying down and monitoring recordings.
  14. On slower machines, turn off clipping analysis at View > Show Clipping while recording.
  15. Disable screensavers if you are making a long recording and will be away from the computer. These can freeze recordings. Switch the monitor off instead.
  16. Reboot before a long and important recording, especially on a slower/older computer or one with limited RAM.
  17. Make sufficient disk space available. Audacity tells you how much longer you can record for (based on available disk space) in the Status Bar at the bottom of the window.
    • Delete un-needed files and temporary files.
    • Choose a disk with the most space. Go to the Directories Preferences and set the temporary directory to a disk which has more space. If saving an Audacity Project before starting recording, choose the disk at File > Save Project As....
    • Be aware of any disk quotas which may be in force for your user account. These restrict the amount of disk space you can use and will cause recordings to stop once your quota is exceeded.
  18. Defragment the hard drive (only affects Windows users).This increases the speed your computer can read and write information by ensuring that files are kept close together in a logical manner.
  19. Increase the priority of Audacity:
    • Windows 10/8/7/Vista users can try Task Manager to increase the priority of Audacity once it has been launched. Access Task Manager by pressing CTRL + ALT + DEL, then click on the Processes tab. Select audacity.exe under "Image name", right-click over it and choose one of the priorities above normal. "Realtime" is not generally recommended. Try "Above normal" or "High". Sometimes, reducing the priority of any other programs you must run can help too.

      To launch Audacity with a particular priority, you can try PsExec from the Windows Sysinternals Suite. Create a shortcut and in its Properties, set the "Target" to contain the path to PsExec, the required priority and the path to Audacity, as in this example (enclose the path in quotes if it includes spaces):

      C:\Windows\System32\PsExec.exe -d -high "D:\Program Files (x86)\Audacity\audacity.exe"
    • Mac users can use the Terminal's "renice" command. Lowering the "nice" level of Audacity will raise its priority if the priority of other devices is unchanged. The default nice level for most applications is 0, in a range between –20 (highest priority) and +20 (lowest priority). To change Audacity's nice value, type:
      sudo renice {nice #} {pid}
      where {nice #} is the nice level and {pid} is the process ID number of Audacity. You can determine a process pid with the "top" command or from Activity Monitor (Process Viewer in OS X 10.2 or earlier).
    • GNU/Linux, *BSD and most other Unix-like systems can also set program priority via the nice level. On Linux you may need to run as root to set very low nice levels. You may want to review additional help on nice for Linux and BSD
  20. Optimize Windows processor scheduling for "background services". Right-click over My Computer or Computer > Properties, then click the "Advanced" or similar link or tab. In the "Performance" section, click "Settings", then the "Advanced" tab. In "Processor Scheduling", choose "Background services" then OK and OK. Note: This may not be the best setting for general computer use; if programs seem slower to launch or respond, change the setting back to "Programs" after recording.
  21. Enable DMA mode for your hard drive (only affects Windows and Linux). Doing so can increase disk reading and writing speed tenfold and use less resources in doing so.
  22. Be aware of operating system conflicts. Sometimes (mainly on Windows) system conflicts can arise and the operating system can become corrupt or partially corrupt, affecting sound recording and playback even though the sound drivers are properly up-to-date. Unpredictable behaviour and error messages in programs would be strong evidence of this. Try backing up your data and reinstalling the operating system.
  23. Be aware of physical connections to and inside the computer.
    • Make sure the input cable and external audio device (if any) are firmly attached to the computer. Connect USB devices to a separate USB port on the computer, not a USB hub.
    • Make sure that connections inside the computer to the drive(s) and to internal sound devices are tight.

Ensuring proper device and driver performance

  1. Avoid interrupt sharing for your soundcard or Sound Device. This means checking with your motherboard manual which slot is best to put the soundcard in if you are installing a PCI soundcard, and trying to avoid IRQs shared with noisy devices like the graphics card and mouse. If your operating system and hardware support APIC with many more IRQs, then you can avoid interrupt sharing altogether.
  2. Update your hardware drivers to avoid conflicts and get better hardware performance. You should consider updating drivers for your:
    • Video (Graphics) Card - for example, if your graphics card is handling the display of the waveform efficiently in Audacity while recording is taking place, you have more resources available for laying down the recording properly.
    • Hard Drive Controller - this is especially important for RAID and other high performance controllers.
    • Soundcard or sound device. These are of course the most important drivers as regards Audacity. Low quality, generic or outdated sound drivers (mainly but not exclusively on Windows systems) are a common cause of crashes, especially during recording. If your computer reboots spontaneously when launching Audacity, or during recording or playback, it's a sure sign of sound driver problems. Using the latest sound device drivers for your computer model from the manufacturer of the sound device or motherboard will help avoid such problems. See Updating Sound Device Drivers for helpful hints and instructions on this.
  3. Check if Windows can process real-time audio efficiently:
    • DPC Latency Checker checks if your audio/video drivers may be causing excessive Deferred Procedure Call latency. If so, this may cause dropouts in live audio/video streams. This tool is easy to use but does not itself identify which drivers are causing excessive DPC's or test other potential causes of dropouts.
    • LatencyMon analyzes the possible causes of buffer underruns by measuring kernel timer latencies and reporting Deferred Procedure Call (DPC) and Interrupt Service Routine (ISR) execution times as well as hard page faults. This tool is not for novice users but it can identify the kernel modules and processes responsible for causing audio latencies which result in dropouts.