Tuning Windows 2000 for Audio

PLEASE NOTE: This article has been archived. It first appeared on ProRec.com in July 2001, contributed by then Contributing Editor Jose-Maria Catena. We will not be making any updates to the article. Please visit the home page for our latest content. Thank you!

Windows 2000 is not exactly brand new. More than a year has elapsed since it came out, the Service Pack 2 is now available, and Win2K’s successor, Windows XP, is almost out already. But the fact is that many of us had difficulties using Windows 2000 for our digital audio workstations until recently, mainly because few professional soundcards had drivers for it.

Now, the time for the move has definitively arrived: many of the best soundcard manufacturers are providing drivers for Windows 2000, and the best music applications are ready to run on it. Some applications like SONAR and SAW Studio have been optimized specifically for Windows 2000. But the Windows 2000 feature that everyone will love in first place is stability. Anyone that was using the 9X family – Windows 95, Windows 98 or Windows Me – knows what I mean. Certainly, Windows 2000 is far more robust and stable comparable than 9X operating systems.

Windows 2000 runs very well “out of the box”, that is, the default configuration parameters are adequate for DAW use. But there are choices and settings that affect DAW performance, and this is our business here: this article intends to help you to get the most out of Windows 2000.

My intention is not to list a couple of recipes. I always prefer to explain how certain configurations behave, so you can understand and choose accordingly. It may be a bit harder, but I will try to keep the details easy for most users, and at the end you should know better what you have in your hands instead of having to follow recipes that you do not understand and that in many cases are harmful – yes, I have read a lot of misguided information about Windows 2000 tweaks out there.

Windows 2000 requirements

The minimum amount of RAM is 32 MB, but this is really too little, the system will run very slowly due to constant virtual memory usage. For good performance, the minimum I would recommend is 128 MB, and 256-512 MB is what I consider the adequate amount for most cases.

Before Windows 2000 installation: ACPI

Before installing Windows 2000, check if there is a BIOS update for your mainboard, especially if it contains any fix regarding ACPI or Windows 2000, and flash it following the instructions from the manufacturer.

If the BIOS allows you to enable and disable the ACPI functionality, now is the time to disable it. ACPI uses an additional interrupt and in my personal opinion does not add any useful feature to a desktop computer (a laptop is another story), so I prefer it disabled. Having ACPI enabled is not a problem unless there is a bug in the ACPI BIOS, so you can enable it if desired for any reason. However, if you experience problems, and have ACPI enabled, consider disabling it.

During setup, Windows 2000 will detect if your BIOS supports ACPI or not. If you decided to leave ACPI disabled, you may want to enable APM (Advanced Power Management) after the system is installed, so that the system can switch off the system after shutdown. You can do so at Control Panel > Power Options, in the APM tab.

File system: FAT32 or NTFS?

Windows 2000 supports an additional file system that is not supported by the Win9X family: NTFS. This file system incorporates many improvements, among others:

  • More robust and safer transactional system.
  • Supports folder and file level transparent compression and ciphering.
  • User and group permissions.
  • Allows joining separate physical devices as folders.
  • Contents indexing capabilities.
  • Software RAID support.

The problem is that none of these great new improvements are needed at all for audio applications. NTFS performance is slightly worse in most cases than FAT32 as shown by both DskBench and SONAR, but only by a little bit, less than 10% in the largest case. Also, defragmenting a NTFS volume may take longer than a FAT32 volume.

I would suggest the following guidelines:

  • For best performance, use a separate FAT32 disk for your audio files. The NTFS improvements are not any advantage for audio files, and formatting the disk with FAT32 makes the disk backwards-compatible with Windows 98 as well. If you cannot spare a separate disk for audio, you can instead format a disk partition with FAT32.
  • In particular, use FAT32 for any partition that you may need to use in a Win9X machine, including obviously the boot partition if you want to be able to dual boot Windows 2000 and Windows 98.
  • For any partition that does not fall in any of the earlier categories, NTFS can be a good choice.
  • If you work with video or other large files in excess of 4 GB, format NTFS.
  • Any time you format a disk or partition with FAT32, be sure to use the /z:64 switch (format [drive]: /z:64) to get 32K cluster sizes. This is critical to getting the best performance from the disk.

Early during installation Win2K will ask you to convert the installation partition to NTFS. Choose according to what you need. If you need compatibility for Windows 98 – especially if you want to dual-boot – don’t convert. Win2K includes also a FAT32 to NTFS converter that you can use on any other partition once the system is installed, but be cautious: backup first.

Dual Boot

The compatibility with legacy software in Windows 2000 is very restricted compared with Windows 9X, and this is mostly required to ensure stability against any kind of application failure or offense. In general, you can’t run programs that access the hardware directly, in particular DOS games and direct disk access programs. If any offending program is run, Windows 2000 will stop it as soon as it tries to access something that it should not, but it will not create any instability in Windows 2000 itself.

If you need to run such programs, or want to retain Win9X for some reason, be sure to install Windows 2000 in a dual boot configuration, so that you can still boot Win9X or DOS in case of necessity. This is a good idea anyway, and you can always remove the other OS later when it is not longer necessary. Dual boot will let you migrate safely to Windows 2000 and will allow you to always get back to your old working system just in case something doesn’t work in Windows 2000.

To install Windows 2000 in a dual boot configuration, have your older OS installed first, and then, start the Windows 2000 setup from it. When prompted do not upgrade to Windows 2000 but instead select “Install a new copy (clean install)”, and specify a new directory for it when asked. Microsoft recommends installing it in a different partition than your other OS. This is not strictly necessary, and I for one have both W98SE and W2K in the same partition. But if you decide to use the same partition: do not convert it to NTFS!

One interesting trick to do is to rename the W9X swap file so that it uses the same as Windows 2000, resulting in less wasted space. Since both systems will not ever run at the same time, this is safe. First configure the virtual memory in both systems so that it is placed in the same FAT32 volume, and make the minimum size the same for both OSs. Edit the SYSTEM.INI file in the W9X directory, locate the “PagingFile=” line and change the name to PAGEFILE.SYS. Reboot and delete the old WIN328.SWP file. That’s all. It won’t make your computer any faster, but it will reclaim wasted space on your disk.

Most applications can be installed in the same directory for both operating systems, saving space. You can also configure some applications like e-mail clients so that they use the same location for data files in both systems.

Virtual Memory

Windows 2000 does not allow disabling virtual memory. This is not a problem. I never recommend disabling VM, and Windows 2000 manages it much better than Win9X.

You can choose the disk volume where the VM file will be placed. Usually you will want a single file. If you have several disks, do not put it in the same disk that you use for the audio files.

The settings recommended by Windows 2000 are usually adequate, but some tweaking can prevent possible problems. When you are running Windows 2000, it will use the smallest swap file it needs. But if you do something that requires more RAM, Windows will enlarge the swap file to create memory headroom. If this happens when you’re recording or playing back, you could experience real performance problems when Windows tries to enlarge the swap file. Therefore, set the minimum virtual memory size so that the swap file should never need to grow. 256 MB should be the smallest value you should set, but 384 to 512 MB are better. The maximum size should be set at a large value, for example 1024 or even more. There is not harm in having a large maximum value setting, just don’t overfill your hard disk or the swapfile may be prone to fragmentation. If you wish you can set both values to the same large value, say 512 or 1024 MB, and Windows will never resize your swap file.

Disabling Visual Effects

Disable them! Go to Control Panel > Display > Effects Tab and disable “Use transition effects…”. It’s also a good idea to disable “Show window contents while dragging”. Or better, download and install the latest version of TweakUI from Microsoft, and disable every kind of visual effects and animations.

As principle, when the CPU is busy with high priority intensive tasks (like audio processing) the “transition effects” should perform slowly, giving CPU priority to the higher-priority tasks like audio. But apparently someone at Microsoft thought that was not acceptable – that smooth visual effects were more important – so they decided to assign a higher priority to the visual effects task. Consequence: displaying a menu or a tooltip can steal time from more critical tasks. Disabling those effects helps ensure that a pretty drop-down menu doesn’t cause a frustrating dropout.

Another thing I always disable are the system sounds. Go to Control Panel > Sounds And Multimedia and select “No Sounds”. I also disable web contents in folders Control Panel > Display > Web. Another good idea is to avoid desktop background and themes and screen savers. Use the power saving options instead. If you do not need 24/32 bit color, use 16 bit color. Screen redraws and updates take usually less CPU time in this mode and your applications should look just fine with 16 bit color.

Bus Mastering ATA Controller Drivers

Windows 2000 will detect and activate DMA modes by default whenever it recognizes the disk controller as DMA capable for any DMA capable device connected. You can review the mode set or change it at Device Manager > IDE ATA / ATAPI Controllers > Primary (and Secondary) Controller > Advanced Settings Tab. It only allows to set “PIO only” or “DMA if possible” for each device, and indicates the currently active mode. But does not show the actual PIO or DMA speed.

If you do not see these settings, or you cannot enable DMA mode for a device that you know supports it (which includes all modern devices), your controller may not have been recognized properly by Windows 2000 and you may need to install specific drivers provided by the manufacturer. Of course, all Intel chipsets are recognized and perform very well. Mileage with others may vary very much. In particular, the VIA 686A performs particularly bad. At any rate, you need to have DMA enabled for all of your drives, especially your audio disks. This is absolutely essential for good DAW performance – a system which can stream 100 tracks of audio in DMA can grind to a halt at only 12 tracks in PIO mode!

Remember that special 80 wire ATA cables are required for UDMA66 or UDMA100 operation, and highly recommended even for slower modes. If you are still using 40 wire cables, change them immediately, even if you’re running UDMA33. The extra 40 wires aren’t attached to anything – they just serve as shielding between every other wire. The result is less interference and fewer errors – which means fewer retries and faster performance.

File I/O Optimization

Windows 2000 file I/O is very efficient, more than Win9X, and you do not need to tweak any special setting in the operating system – specifically, the VCACHE setting which was so important in optimizing Windows 98 systems is not needed in Windows 2000. All you need to do is properly format your disks. Use FAT32 with 32KB clusters when formatting volumes for audio files –

FORMAT [drive-letter]: /z:64

Disk performance statistics can be disabled: type “diskperf –n” at a command prompt. They will remain disabled after subsequent boots. To enable them back, type “diskperf -y”. Disabling disk statistics may improve the file I/O efficiency a bit.

Power Management Options

It is better to avoid screen savers, and use instead the power saving modes for the monitor (Control Panel > Power Options). It is also preferable to not activate the automatic hard disk power down. Normally, start and stop cycles contribute more to hard disk wearing than “on time”. Also disable any options that throttle back the CPU when it is unused. These settings are useful for battery powered devices but offer no benefit to an AC-powered computer.

Less is More

Windows 2000 runs a couple of services that many of us will never use. These steal a very little amount of CPU time, but can waste some memory and startup time. So if you do not need a service, it is a good idea to disable its automatic loading at startup. You can do so going to Control Panel > Administrative Tools > Services. Look for any unneeded service with automatic startup type, and change it to manual. With this setting, the service will not start automatically at Windows startup, but can be started if needed.

Typical services that might not be necessary:

  • Distributed Link Tracking Client (networking, tracks file transfers across NTFS volumes for computers in NT domains)
  • DNS Client
  • IPSEC Policy Agent (networking, to manage IP security)
  • Remote Registry Service
  • Task Scheduler

Additionally, if you aren’t using a LAN, you should be able to disable:

  • Computer Browser (networking, to list computers in a LAN)
  • DHCP client (networking, to get automatically the IP address and DNS from a DHCP server)
  • TCP/IP NetBios helper (LAN)

CD-ROM Auto-Play

An important tweak in Windows 98 for DAWs was to turn off CD autoplay. The computer spends some amount of time determining if a CD has been inserted, and if it has, the computer then attempts to auto-run it. By turning off CD autoplay we were able to get improved performance and stability when tracking. This tweak no longer offers a significant performance benefit and we no longer need to make it. The only point to be made is that if you are recording or performing a critical task, just don’t insert a CD into the drive, or it will get priority and probably stop your critical task.

Do Not Touch Default Priority Settings

You may have seen advices recommending an increase of the default priority settings. This is a bad idea. Don’t do it.

Programs can set the appropriate priorities for any process or thread. Programmers require advanced skills in multitasking to analyze and design the appropriate priorities scheme for a given program. For example, in a DAW, the soundcard buffer events are of very high real-time priority, since if they are not serviced in few milliseconds, a dropout will occur. The file pre-read threads must have a lower priority, but still higher than window redraws, and so on. Even DskBench uses several threads with very specific priority each.

You do not have access to change the programmer assigned priorities. So some people have recommended increasing the default priority. Increasing the default priority only raises the priorities of all threads in the system for which the programmers did not assign a specific priority. This means that these threads do not have any special timing requirement, and you might make them take precedence over threads that require faster responses.

In the worst case, it may be true that many application programmers do not have the adequate skills to properly design the priorities schemes or even basic multitasking issues. But there is nothing you can do about that other than making things worse, unless you are truly an expert willing to spend some time face to face with SoftICE to improve someone else’s binaries.

Software Compatibility and the WIN32 API

Windows 2000 shares the same basic API (Applications Programming Interface) with Windows 95, Windows 98, Windows Me and NT4: the WIN32 API. More accurately, the Windows 2000 version is a superset of the others.

I must add an important note here: the code that implements the WIN32 API functions in Windows 2000 is 100% 32-bit code. Just to support 16-bit legacy applications, there are also 16-bit libraries that just call to the 32-bit ones to perform the tasks. That is the right way to implement 16-bit compatibility, but, as you surely know, the 9X family worked in the opposite way: the functionality was written in 16-bit code, and the WIN32 API was implemented by 32-bit libraries which called the 16-bit ones! This means that Windows 2000 is truly a 32-bit OS, unlike the 9X family.

Anyway, there are very few compatibility problems in the WIN32 API other than very rare side effects of implementation differences. Most pure WIN32 applications will run on Windows 2000 as well or better than on the 9X OSs. If you find some of the few 32 bit applications that do not run fine on Windows 2000, you should contact the provider for an update.

Multimedia and Other Newer APIs

Windows 2000 is ahead of any other older Microsoft OS in all aspects. It includes or can host the newer APIs and most recent versions of any API available, and can run all of them better than any older OS.

I have read all kinds of statements like “Windows 2000 is not optimized for audio”, “Windows 9X/Me is the best choice for multimedia”, etc. Surely people saying that were confused by the fact that NT4, the predecessor of Windows 2000, did not receive adequate support for multimedia. But this is not the case in Windows 2000 at all. Keep in mind that DirectX 8 was targeted for Windows 2000 in first place, and that the first beta only ran on Windows 2000. Microsoft is clearly targeting Windows 2000 for multimedia.

Here’s the deal. The key factors for multimedia applications – or any other applications requiring precise timing and massive I/O and processing – are the task scheduler latencies and I/O efficiency. In both, Windows 2000 beats any older OS hands down, in particular the extremely important scheduler latency, which is at least two orders of magnitude better than in the 9X family. Although the huge variety of hardware and software configurations out there makes very difficult to define figures valid in all scenarios, in the average PC Windows 2000 is able to meet worst case high priority task latencies close to 1 ms, while Windows 9X does not even meet 100 ms. Worst-case high priority task latency is the single most important measure of a systems ability to perform low latency real-time processing of massive data amounts.