Managing Computer Resources and Drivers

From Audacity Wiki
Revision as of 08:29, 8 July 2007 by Suf (talk | contribs) (''' Device and driver issues''': Wikifying list bullets)
Jump to: navigation, search

Introduction

There are plenty of things that can go wrong with recording at the best of times, but before you even begin you need to ensure the computer has sufficient resources and the hardware is properly tweaked so that the recording can be properly laid down on disk as it is received. Recording in real time is a very resource-intensive task for computers, and domestic computers are not recording studios but multi-task machines with many competing demands on their processor. Recording is also a big test of the sound device in the computer, far more than playing back. The drivers the sound device comes with out of the box are not always up to the job, especially on Windows machines. So give yourself and Audacity the best chance to make a good recording by preparing your computer first with these tips - especially if you are on an older or slower computer - or being aware of them if you run into problems with dropouts or duplications in the recorded waveform, or recordings suddenly stopping without warning.

Tips to ensure sufficient resources are available for recording

  1. Close all other programs while recording. Be aware of background virus scanners and other system tray programs. Norton, Sophos and other anti-virus products scan each file as it is opened and closed by default. On a slow computer this scanning can affect recording as it takes too long. Consider disconnecting from the internet and 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.
  2. If you are on a network, avoid if at all possible having the path to your Audacity temporary directory set to a network drive. Audacity's temporary directory is used for storing audio data whilst recording and needs fast access, so set its path (specified on the Directories tab of Preferences) to a local hard drive wherever practicable. Try to avoid transfers of data between computers on your network while recording is taking place.
  3. Consider reducing the bit depth for recording and importing from the default 32 bit to 16 bit at "Default Sample Format" on the Quality tab of Preferences. Reducing the bit depth halves the amount of data processed and the time taken to write it to the disk. Set the Project Rate button bottom left to 44 100 Hz: higher rates will significantly increase the data load without proportionally improving the quality.
  4. 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 Audio I/O tab of Preferences.
  5. Turn off "Auto-scroll while playing" on the Interface tab of Preferences. This stops the display re-drawing as the recording is made so reduces the amount of processing power used, freeing power for recording. Alternatively minimise Audacity during the recording.
  6. Disable the Meter Toolbar on the same Interface tab as this will conserve resources on a slower computer.
  7. Zoom out to the whole length you will be recording.
  8. If you use the Beta 1.3.3 version of Audacity, consider increasing the default "Audio to buffer" setting of 100 milliseconds. This can be changed in the "Latency" panel in the Audio I/O tab of 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.
  9. If you are making a long recording and you will be away from the computer, it is advisable to disable any screensaver you have as these can freeze recordings when they come on. Simply switch the monitor off instead.
  10. Make sure your system swap or paging file is large enough. As a working rule, with RAM of less than 512 MB the swap file should be set to 1.5 times the available RAM. Recordings will stop if the swap file is full. If you have 1 GB or more RAM, set the swap file to a low size like 256 MB to prevent the swap file being used in place of the (much faster) RAM. If you only have 128 MB or less of RAM, this is at the bottom end of what you need for trouble-free recording on a typical computer that is running other tasks at the same time. Consider installing more RAM as a priority, as RAM is relatively inexpensive and extremely cost-effective in improving computer performance. Note that Windows 98 and ME have a bug that may cause problems if you have more than 512 MB installed RAM. There are suggested fixes for this here.
  11. If you are going to start a long and important recording on a slower/older computer or one with limited RAM, consider rebooting first. Computers running Windows versions prior to XP are particularly likely to slow up and give poorer performance after a long period of use without reboot.
  12. Make sure you have sufficient disc space to record. Audacity tells you how much longer you can record for (based on available disc space) in the Status Bar at the bottom of the window. You can make more space by deleting files or setting the directory to which Audacity records to a disc with more space. If you save an empty Project before starting recording (as is recommended), choose the disc when you click File > Save Project As.. ; if you don't save an empty Project, Audacity records to its temporary directory. You can change the location of this to another disc on the Directories tab of Preferences. Also be aware of any disc quotas which may be in force for your user account. These restrict the amount of disc space you can use and will cause recordings to stop once your quota is exceeded.
  13. Defragment your 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.
  14. Try to increase the priority of Audacity:
    • Windows 2000/XP/Vista users can try increasing the priority of Audacity in Task Manager. 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".
    • Mac OS X 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 ProcessViewer.
    • GNU/Linux, *BSD and most other Unix-like systems can also set program priority via the nice level. For help with this command on Linux (you may need to run as root to set very low nice levels) see here. For help on BSD see here.
  15. Make sure (Windows/Linux) that DMA mode is enabled for your hard drive wherever possible. Doing so can increase disk reading and writing speed tenfold and use less resources in doing so. For instructions, see DMA mode.
  16. 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.
  17. Trivial as it sounds, be aware of physical connections on the computer. If you are experiencing problems with sound, make sure that connections inside the computer to the drive(s) and to internal or external sound devices are in place and tight.

Device and driver issues

  1. Try to avoid interrupt sharing for your soundcard or Sound Device. This means checking with your motherboard manual which slot is best to put the sound card in if you are installing a PCI sound card, 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.