Home > Windows > Slow network file copying / moving / deleting in Windows Vista when playing audio (MMCSS)

Slow network file copying / moving / deleting in Windows Vista when playing audio (MMCSS)

September 24, 2007 Leave a comment Go to comments

File copying in Vista is, well, slow. I’m pretty sure I’m not the only one who has been sitting there wondering what exactly Vista is doing while it spends 5 minutes “calculating the time remaining” to copy half a dozen files.

Before you trash Vista

Install these updates:

KB938194 – Windows Vista Compatibility and Reliability update
KB938979 – Windows Vista Performance and Reliability update

(these updates were on Microsoft’s site for a good while but were pushed out to Windows Update on 28th August 2007)

For most people with normal setups, you should find that gives a breath of fresh air to your computer’s performance, especially if you use a laptop.

Slow file copying over the network

(I’m only going to deal with audio here but everything in the article applies equally to video)

Are you listening to music? You may have read one of the genius features of Vista is that it lets you stream audio and video smoothly over your LAN or wireless network even when it’s under load. That’s cool… unfortunately it does that by throttling all of the rest of your network traffic and giving audio and video absolute priority.

Vista only throttles the connection when you’re actually running an audio application. Try copying a large file over your network with and without music running to see if you’re affected by this. Here are my shocking figures for a 265MB file copy over Gigabit Ethernet, with and without Winamp playing:

Vista to network – 8 seconds without Winamp, 21 seconds with Winamp
Network to Vista – 14 seconds without Winamp, 41 seconds with Winamp

Extenuating factors

It gets better. There are some bugs, and one obvious design flaw in the throttling system:

  • There is a hard-coded limit of 10,000 packets per second for non-AV traffic. This means the faster your connection is, the harder you’re gonna get hit as you can hit 10,000 pps much more easily on GigE than 100Mbit networks.
  • Each additional logical network adapter cuts the maximum packets per second rate due to a bug in Vista, for example if you have two LAN cards, the maximum goes down to 8,000. Cut the rate further for each additional adapter; if you’re running a wireless card and Bluetooth as well, those count as network adapters too.
  • The rate limit is applied globally, not per adapter.

The solution

The real solution is to wait for a patch from Microsoft because the steps below will significantly reduce the quality of your AV experience on Vista, and may leave you with skipping and clicking while you listen to music in some scenarios.

  1. Open the registry editor – press Start+R, type regedt32 and press Enter.
  2. Navigate to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Audiosrv
  3. Open the key DependOnService by double-clicking it
  4. Remove the last line which says MMCSS and click OK. Close the registry editor.
  5. Open the Services window (Control Panel, System and Maintenance, Administrative Tools, Services)
  6. Scroll down to the service called Multimedia Class Scheduler, right-click on it and choose Properties.
  7. Change the Startup type to Disabled and click OK. Do not try to stop the service running.
  8. Reboot.

The Multimedia Class Scheduler (MMCSS) is the service responsible for throttling the connection, following these steps disables it and takes it out of the equation. Windows Audio (the service that manages audio playback) claims to be dependent on MMCSS but really it isn’t; altering the registry key as above removes the dependency from Windows Audio’s dependency list, so that MMCSS won’t try to start when Windows Audio starts when Windows boots up.

After performing these steps, my file copy speeds where the same with and without Winamp running – 8 seconds to copy 265MB from Vista to the network, and 14 seconds from the network to Vista (the remote machine was running Windows Server 2003).

References

The Register’s coverage of the MMCSS issue
Larry Osterman’s blog at MSDN: Windows Vista Sound causes Network Throughput slowdowns – how Microsoft found out about the problem and what they’re doing about it
Mark Russinovich’s technical blog: Vista Multimedia Playback and Network Throughput – read here for a thorough technical report on the issue

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Share your thoughts! Note: to post source code, enclose it in [code lang=...] [/code] tags. Valid values for 'lang' are cpp, csharp, xml, javascript, php etc. To post compiler errors or other text that is best read monospaced, use 'text' as the value for lang.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: