How Windows 7 Will Effect Your Music Production?

borthwick2Cakewalk Chief Technical Officer Noel Borthwick, a noted expert on Windows platforms, covers crucial topics around the introduction of Windows 7, such as compatibility with Cakewalk products, issues in upgrading from Windows XP and related points of interest for PC users.

For an in-depth look at Windows 7 and how it might affect your use of Cakewalk products, check out Noel’s Q & A below. Also, see Peter Kirn’s article at Create Digital Music for more  insightful tips on Windows 7.

Q: In what ways has Windows 7 been optimized, in terms of performance, for audio production?

A: Windows 7 on the surface is very similar to Windows Vista. It has the same audio driver support and same audio system infrastructure as Vista. However it’s some of the under hood improvements that are more significant for audio production. There are some interesting innovations and optimizations in the Windows kernel, making the OS more scalable for concurrent processing. This makes it attractive for highly multithreaded applications like SONAR. Additionally there are various new API’s/SDK’s that may be of significance to developers. Some highlights are below:

Scalability and Distribution of Workloads

In Vista and earlier, on a highly multi threaded system (e.g. SONAR running on an 8 core hyper-threaded Intel Core I7 PC), you have many threads all processing tiny audio buffers at low latency. All these threads are ultimately waiting on the dispatcher lock when it comes time for them to be managed by the Windows scheduler. This global lock becomes a bottleneck in the system and prevents efficient multi-core workload distribution and scalability. This problem gets magnified as you increase the number of cores since they are all gated by a common lock. In Win 7 the kernel team changed the logic in the Windows scheduler to abolish this global dispatcher lock and use per object locks. This effectively removes this age old bottleneck and allows Win 7 to scale better even under workloads of 256 processors.

This change means a lot to applications like SONAR that rely on multithreaded processing of very small workloads. Initial benchmark results have been promising in this regard. SONAR performs more efficiently at low latency on multi core machines.

Memory Management

The PFN (page frame number) database lock was used by the memory manager to lock pages of memory in the working set. Like the dispatcher lock above, this would gate memory access from different threads causing resource contention. Work in this was first done in Windows server 2003 SP1 and Windows 7 has now has this optimization as well, improving asynchronous access to memory.

Power-Saving Processing

Windows 7 has a new feature called Core Parking. Core Parking is a power saving optimization that shifts processing load to one or more cores and puts other less busy cores to “sleep”. The objective is to let other cores idle if workload levels allow for it. This optimization had us scratching our heads when we ran a benchmark test on a Quad Core I7 machine. At any point in time we would notice that some cores were idle in task manager. The reason for this turned out to be Core Parking. Core parking can be useful to save battery life while running projects on laptops.

Q: Relative to Vista, are there any changes that are likely to introduce new compatibility issues with Cakewalk hardware or software?

A: With any new OS there is always the potential for compatibility issues. Win7 is built on the Vista foundation and one of its goals was better compatibility. As such most applications that are Vista compliant should work as well or better in Windows 7. UAC in Windows 7 has been improved so this might also help with general compatibility problems with some applications.

We have run into only a couple of compatibility issues in Win7 during the course of our development/testing of SONAR 8.5.

– The MMIO API in Win7 (typically used for writing RIFF wave files) has a compatibility issue with the mmioDescend API with LIST ‘WAVE’ chunks. This caused our code that reads audio bundle files to fail and read scrambled audio data. We worked around this problem in 8.5

– In WASAPI exclusive mode under Win7, the minimum latency you can achieve is now unfortunately 3ms and the code reports an error if lower. The fact that Vista has no such limitation has been reported to Microsoft. Hopefully its a mistaken fence in their code and this issue is fixed via an update, since it’s a step backwards for low latency in WASAPI mode.

Q: What hardware and software compatibility issues should users be aware of if they’re thinking of migrating from Windows XP to Windows 7?

A: The compatibility issues that typically affect users migrating from XP to Vista/Win7 are:

– UAC problems: Many applications and plug-ins are not built to handle the newer security settings in these OS’s. For example if an application relies on something that requires administrative access it will fail when running as a limited user in Win7. This is a serious issue since in Vista/Win7 even if you are running from an administrator account; programs are launched by default with limited user privileges. Unlike XP you have to explicitly run as an administrator to use such programs. To be Win7 logo compatible all applications need to should support running as a limited user.

– Drivers: Although for most practical purposes audio drivers in XP and Windows 7/Vista are similar (you still need to write WDM drivers) there are sometimes quirks in specific drivers may cause problems. Most typical driver issues here are caused by installers that make assumptions about the OS version. In many cases this issue can be solved by the end user by setting the “compatibility mode” to Vista in the file properties for the appropriate driver installer file. (Right click the setup exe file to set its properties)

Q: User Account Control (UAC) has also been streamlined in Windows 7. Do changes to the UAS impact audio apps at all? Are there corresponding under-the-hood changes that users should be aware of?

A: The UAC changes in Win7 are primarily to allow more customization over the UAC elevation prompting process. There are no changes to the fundamentals of how UAC itself works that I am aware of. The classic problem with audio applications with UAC is when programs or plug-ins write to areas of the registry or file system prohibited from standard user access. Even when you are running as an administrator, by default when you launch a program (or the program itself launches a secondary process) Windows 7 will run that process with standard user privileges. If a program or plug-in attempts to write to an area which it doesn’t have write privileges for, virtualization will kick in. While this may allow the program to work, in general it is bad practice to rely on virtualization, since it can cause many unwanted side effects and behaviors in applications.

There are now four customization settings for UAC:

1. Never notify (least secure). The user is not notified when a program tries to install software or make changes to the computer. The user is not notified when they make changes to Windows settings or when programs try to do so.

2. Only notify me when programs try to make changes to my computer. The user is not notified when a program tries to install software or make changes to the computer. The user is not notified when they make changes to Windows settings. However, the user is notified when programs try to make changes to the computer, including Windows settings.

3. Always notify me. The user is notified when a program tries to install software or make changes to the computer. The user is also notified when they make changes to Windows settings or when programs try to do so.

4. Always notify me and wait for my response (most secure). The user is notified when a program tries to install software or make changes to the computer. The user is also notified when they make changes to Windows settings or when programs try to do so.

Q:  The big question on everyone’s mind: almost no one recommended Vista over XP in the audio world. Generally, I think on any platform, if your OS is running well you’ll probably leave it that way for audio work, and switch operating systems when you set up a new machine. But that said, would you now feel comfortable endorsing Windows 7 over XP? Would you now make the switch yourself.

A: Yes, absolutely. Windows 7 finally delivers on the stability and performance that users hoped for from Vista. The kernel changes and optimizations for large scale multi-core processors make it very attractive to DAW users who are interested in better low latency performance. I will be building a new DAW soon and Windows 7 X64 will be my OS of choice.

Q:  How much customization would you advise people do to their OS? That is, you’ve just installed a build of Windows 7 for working with SONAR on a test machine. Do you run the stock configuration, or start turning off services, disabling disk indexing, etc.?

A: Optimization and customization is a topic that can’t be fully discussed in the scope of a brief article. In general you need to optimize a system when you have known bottlenecks. Otherwise you can spend a lot of time tweaking things that have little effect on the end goal. In fact you may even end up destabilizing a perfectly working system. A stock Win7 machine is not optimized for audio necessarily but it appears MS put some thought into trimming out unwanted startup tasks to cut down on startup time. For example there are now “Triggered start services” in Windows 7, so out of the box you can have fewer services running after a fresh boot. There are probably many background services in a modern DAW that could be suspended if you don’t need them but they should be evaluated on a case by case basis depending on what you use the machine for.

Q:  A lot of users were advising running Vista with Aero off, certainly in the early days. Do you think it’s now advisable to leave Desktop Window Compositing switched on for audio work? (Note: I am aware that there’s actually no way to *completely* disable the Aero windowing environment in a way that it reverts to XP, as even in Class mode with no compositing settings the engine has been altered.)

A: Generally speaking turning off Aero will free up some resources on your system since it uses more costly 3D graphics rendering and transparency a lot. However on any modern graphics card, Aero offloads a lot to the GPU so unless your DAW is also competing for the same GPU resources, turning it off may or may not make an appreciable difference to performance.  Most applications that are not graphics intensive use GDI for rendering to the screen and since GDI doesn’t take advantage of DirectX hardware acceleration it’s normally not contesting with the GPU. If you are using plug-ins that use Direct 2D or Direct3D you are probably better off disabling Aero.

Other areas of interest:

77 Additional Tips

Microsoft lists an extensive list of tips for getting the most out of Windows 7, found here: http://technet.microsoft.com/en-us/magazine/2009.10.77windows.aspx 

Additional File Format support

Windows 7 adds native playback support for media in MP4, MOV, 3GP, AVCHD, ADTS, M4A, and WTV multimedia containers. It has native codec’s for H.264, MPEG4-SP, ASP/DivX/Xvid, MJPEG, DV, AAC-LC, LPCM and AAC-HE. Yes, you read that right – QuickTime MOV file support is now natively available in Windows 7 so you don’t need to install QuickTime. Another big plus is that this is supported under the X64 version of Windows 7 as well, something you cannot do with Apple’s native QuickTime itself!

All media files using these codec’s should play in Media Player. It appears that these new codec’s are exclusively available to Media Foundation applications and not via other legacy API’s such as DirectShow etc.

File format transcoding

File format transcoding of many popular formats is now built into the Windows 7 shell. I.e. dragging and dropping files onto a device automatically performs the necessary format transcoding if the format is supported. This was primarily done to copy formats to portable devices like cameras but should be useful in other scenarios as well.

Multi-function devices and Device Containers:

Prior to Windows 7, every device attached to the system was treated as a single functional “end-point”.  While appropriate for single-function devices (such as an audio interface), this does elegantly represent multi-function devices such as a combination audio/MIDI interface. In Windows 7, the drivers and status information for multi-function device can be grouped together as a single “Device Container”, which is then presented to the user in the new “Devices and Printers” Control Panel as a single unit.

Here’s a link for customers who want more information: http://www.microsoft.com/whdc/Device/DeviceExperience/ContainerIDs.mspx

FireWire/USB

Windows 7 contains a new FireWire (IEEE 1394) stack that fully supports IEEE 1394b with S800, S1600 and S3200 data rates. According to reports, USB 3.0 may be supported in a future Windows Update. It was initially planned for Win7 but is not supported in the shipping version of Win7 due to delays in the USB 3 specification.

Multi-touch

Windows 7 includes integrated support for multi-touch displays.

Libraries

Libraries are user-defined collections of content including folders. It’s a handy way to categorize and create shortcuts to samples, music, etc. Special shell folders (Documents, Pictures, Music, and so on) are now Libraries.

Accelerators for Windows

Windows 7 Accelerators provide a way for learning more about selected text, optionally using voice control.

Virtual hard disks

The Enterprise and Ultimate editions of Windows 7 incorporate support for the Virtual Hard Disk (VHD) file format. VHD files can be mounted as drives, created, and booted from.

An installation of Windows 7 can be booted and run from a VHD drive, even on non-virtual hardware, thereby providing a new way to multi boot Windows.

Leaner Footprint

Win7 has a leaner footprint and has been tweaked to work well on less powerful PC’s, laptops and Netbooks. I have heard reports of Win7 working more smoothly on machines that would be slow under Vista.

***