Windows 8 Background
There has been a large amount of interest and speculation about Windows 8, Microsoft’s latest OS scheduled for release in late 2012. Windows 8 is one of the most ambitious OS releases from Microsoft since Windows 95, and is the first OS that attempts to unify the desktop and mobile user experience with multitouch support baked in across the board. A lot of attention in the media has been devoted to the new user interface and the brand new application model called Metro aka WinRT. Understandable, since changes to UI tend to attract the most attention in any software product.
After attending one of the Windows 8 developer camps and talking with some folk at Microsoft, we learned about some of the work done in Win8 to make the operating system scale better to devices with a smaller disk/memory/CPU footprint. This was done primarily to make Win8 perform more efficiently and with lower power requirements on mobile devices like tablets. I was curious if the effects of these changes would percolate through to the general OS and kernel level and benefit desktop applications as well. Let’s face it, call me cynical but in the multimedia/DAW industry we’re bottom feeders. Most operating systems vendors don’t really care about high performance audio, so most benefits we see tend to be “happy accidents” or side effects of other more commercially viable features.
A few years ago when Win7 debuted, I wrote about Windows 7 For Music Production for Create Digital Music. Windows 7 is now widely regarded to be Microsoft’s most stable Windows OS to date for music production and most Windows DAW users by now are running it. The question that many users will soon be faced with is whether Windows 8 offers any advantages for music applications. Or in other words, if it ain’t broke does it need fixing?
In this article, to try and address some of the typical questions, I will primarily focus on how Windows 8 performs as compared to its predecessor Windows 7, in the context of music production applications such as SONAR X1. But first, before we get our hands dirty putting Windows 8 through its paces, here is some general information about the new operating system.
Windows 8 has two basic modes of operation – Metro mode and Desktop mode.
– Metro mode is reserved exclusively for applications built using Microsoft’s new application framework called WinRT.
– Desktop mode refers to the mode that runs Windows desktop applications built with the “classic” Win32 application framework. In other words, your Windows applications like SONAR (built using the Win32 API) cannot run in Metro mode – they run as desktop applications. Only new Metro applications that have been built using the new WinRT framework will run in Metro. Interestingly, the desktop itself is a Metro application now, so to launch the desktop you have to pick the desktop tile from the new Metro task switcher.
Take the Metro?
So what’s special about Metro apps? There are some important limitations, some general and some specific to music production apps that you will want to know about.
- Metro apps are multi-touch enabled
- Metro apps are designed to run stand alone. When you switch to another app, WinRT will unload the Metro app from memory typically. There are a few exceptions to this – a Metro app can request realtime status to tell windows that it needs to stay resident to play audio for example. It’s not clear how this applies to apps that need to stay resident to respond to other realtime events such as MIDI.
- Metro apps cannot communicate with Desktop apps. There is a not so invisible firewall that separates Metro applications and desktop applications preventing them from communicating with each other. Windows 8 has a nifty new sharing feature that allows any app to share data with another compatible application – a more modern evolution of the trusty clipboard. However this feature is only available to Metro applications and there is no cross communication with desktop apps. At the time of this writing there appears to be no easy way for a metro app to communicate with a running desktop application. In other words there is no direct inter process communication protocol. So doing something like rewiring one music app to another isn’t easy to do in the new Metro world. (To clarify, this doesn’t apply to classic windows desktop applications which can communicate with each other as before)
- For applications that rely on a plug-in model for add ons support is limited. While Metro supports dll’s (dynamic link libraries) these libraries must be built using only WinRT API’s. As such you cannot use any of your plugins built for classic Windows. Additionally, even if you use Metro dll’s there is no straightforward way for a Metro app to use plugin’s built by another vendor. To be fair this scenario is common to IOS as well as Android.
- For audio streaming Metro utilizes the WASAPI (Windows audio streaming api). This is the multimedia framework that Microsoft debuted in Windows Vista. WASAPI supports low latency via what is known as “exclusive mode” where an application can bypass the high latency introduced by the system mixer.
However based on reports from Microsoft it would appear that low latency audio applications were not considered in the Metro application model. See this blog post where Microsoft states that 100 msec was considered to be their goal for acceptable latency!
UPDATE: I have received confirmation from Microsoft that WASAPI exclusive mode is indeed supported even for Metro apps (via C++ only). This is great news since it means that Metro apps can in theory have low latency support just like desktop apps. If this is indeed as good as desktop mode, audio latency in Metro should be better than Android and potentially on par with IOS. Of course until we do some real world tests on Win8 tablets we won’t know for sure so stay tuned for future tests. See sidebar below for the full Microsoft quote on Exclusive mode.
- No low level support for low level driver models. e.g there appears to be no easy way to use the low latency Windows driver access that DAW users are accustomed to, such as ASIO or WDM kernel streaming, so access to custom USB or Firewire audio interfaces is questionable.
- There is no built in MIDI support for Metro applications in the current version of Windows. This is a major disadvantage for music apps. Hopefully in the near future Microsoft will rectify this problem.
UPDATE: I received word from Microsoft that although there is no MIDI support in Metro, that it was “high on their list”. So if we’re lucky we may see an update in this area. MIDI support for desktop Windows 8 applications should be identical to Windows 7.
- Microsoft has introduced a new Windows Store exclusively for selling Metro apps. However, only metro apps can be listed in the store and not desktop apps. Additionally you can only list app’s, not plugins, which could be hard for plugin vendors to sell Metro based plugins independently. Plugin’s need to be distributed on a per application basis.
WASAPI Exclusive Mode in Metro
Since Windows Vista, Windows has supported a low latency audio signal path using whats known as WASAPI Exclusive Mode. Similar to how WDM kernel streaming and ASIO drivers work this provides a low latency gateway to the audio device allowing music applications to stream audio in real time to the device driver. There were originally conflicting reports that Exclusive Mode was not supported in Windows 8 under Metro and that only shared mode would be supported. The alternative to this is WASAPI shared mode. However since shared mode uses the system mixer it incurs a high latency hit, making is unacceptable for real time music applications.
I have since received information from Microsoft that this is not the case in Windows 8 and that Metro applications have identical access to WASAPI exclusive mode as do desktop apps. Here is a direct quote from Microsoft on this topic sharing the technical details:
Exclusive mode works the same in Windows 8 as it does in Windows 7.
If you set AUDCLNT_SHAREMODE_EXCLUSIVE you bypass the system mixer and get exclusive access to the audio endpoint. For example, there is low latency audio available in Metro. However, you will only be able to access it by writing to WASAPI, which is exposed to Metro applications.
The good news is that despite some of the above limitations in Metro, which are not particularly conducive to music software applications, there has fortunately been no regression in how desktop applications work. Desktop apps still have access to low level audio and can communicate with drivers at a low level to get low latency performance. There are no changes to how drivers work as far as desktop applications go, so its very likely that your Windows 7 drivers will work on Windows 8 without modification. (unless the driver installation prevents it)
Windows 8 ships with 3 SKU’s, Windows 8, Windows 8 Pro and Windows RT. Windows 8 is the standard version and Pro is the advanced version that includes some extras like drive encryption, virtualization, and remote desktop hosting. In both cases, 32-bit and 64-bit versions will be offered.
Windows RT applies to ARM based processors only and only ships with tablet hardware and with a few Microsoft preinstalled microsoft desktop apps.
Microsoft’s recently announced Microsoft Surface, a Win8 tablet that is designed and sold by Microsoft. Surface will be available in a Windows RT version that runs on an ARM processor as well as a Pro version that runs on an Intel processor. The difference between the pro and RT version is especially important if you are considering a Win8 tablet, since the Windows RT version will not allow you to load desktop applications of your choosing. Only the bundled Microsoft Office apps are desktop apps in Windows RT. The Pro version looks compelling since its essentially an Ultrabook class PC containing an Ivy Bridge Core i5 processor, USB 3.0 ports, 64/128GB of storage and 1080p from a 10.6-inch ClearType display. If the system is as good as it seems on paper, this could be the most powerful tablet based solution for music production today. It should be able to run most desktop apps with ease and will be compatible with external USB audio interfaces as well.
Benchmark: SONAR X1 performance in Windows 8 vs Windows 7
So let’s get to the meat of the benchmark. To evaluate how Windows 8 performance stacks up as compared to Windows 7, we ran our standard SONAR benchmarking test suite. The test suite covers common scenarios that cause performance bottlenecks in a DAW. Besides the test suite, we also included a real world test by including a couple of the sample content demo projects in the tests. The files tested were the Cori Yarkin project “Floating” and “Shifty and the big shots”
System configuration and specs:
Processor: Intel(R) Core(TM) i7 CPU 965 @ 3.20GHz, 3193 Mhz, 4 Core(s), 8 Logical Processor(s)
Installed Physical Memory (RAM): 4.00 GB
Audio Interface: Motu Ultralite MK3, Firewire audio interface.
Operating Systems: Windows 7 and Windows 8 were set up on the same physical machine and all tests were run from the same disk partition.
The operating systems were clean default configurations and the OS images were loaded using disk imaging software.
Capturing the results
To perform the tests, we load the reference projects above and start playback and monitor several metrics to determine the system load at various audio latencies (buffer sizes). To monitor these we use a nifty in-house application called SONAR Perf, developed by principal engineer Keith Albright, which hooks into SONAR and captures and displays these performance metrics.
Windows 8 Benchmark Results
The tables below show the results from the Windows 8 benchmarks
Windows 7 Benchmark Results
The tables below show the results from the Windows 7 benchmarks
Summary and Analysis
The results of the benchmarks were surprisingly good! Windows 8 performed better than Windows 7 across the board in all categories, and in many cases with fairly dramatic performance gains.
Disclaimer: Though this benchmark was performed in a relatively controlled environment, it represents a single hardware configuration. As such the results here cannot be assumed to be generally valid until such tests are validated across a larger variety of systems. Also the tests were performed by running the application with sample sets lasting a few minutes. To be more conclusive the tests would need to be repeated multiple times to reduce jitter error.
SONAR CPU load at low latency
SONAR CPU gains were observed when using Windows 8 for Low latency performance tests. These gains mean you can run bigger loads in Win8 at low latency without audio glitching.
low latency plugins… 15.5% CPU reduction
input monitoring… 8% CPU reduction
high track count… 23% CPU reduction
High bandwidth audio …6.2% CPU reduction
SONAR multi-core CPU load balancing at low latency
Workloads for cores are more evenly balanced at low latencies on Windows 8. Better balanced core workloads translate to more efficient use of multiple CPU core hardware and thereby better workload scaling for large projects.
low latency plugins… 23% improvement
input monitoring… 31.7% improvement
high track count… 30.6% improvement
High bandwidth audio …17.5% improvement
A 7.9% reduction in memory use under Win8 was observed when loading a large real world SONAR project (Cori Yarkin project from SONAR sample content) under identical system configuration. Reduced memory load can be observed in most of the tests.
A 78% improvement under Win8 was observed in disk read/write performance while reading large buffer sizes. Improvements were more moderate at smaller buffer sizes.
System calls per second
An 85% reduction in system calls was observed under Windows 8 in the input monitoring case and more moderate gains in the other cases. Fewer system calls translate to improved CPU load as well as fewer user mode to kernel transitions which mean fewer audio glitches.
25 – 50% reduction in kernel use can be observed in some of the tests with Win8. Lower kernel use results in fewer audio glitches since it leaves more headroom for audio drivers.
All the tests above were done running the current shipping version of SONAR X1 with no special Win8 tweaks. The tests ran very smoothly with no problems noted under Win8 using SONAR X1. In fact you could push the system harder under Win8 without getting glitches in audio as compared to Win7. The tests show that despite the controversial changes to Windows, there are some significant benefits even for standard Windows desktop apps running Windows 8. This is great news for existing Windows 7 users who are considering an upgrade to Windows 8.
Regarding Metro however, the jury is out on whether it will be a suitable platform for high performance music production applications. Until Microsoft addresses some of the concerns in Metro, WinRT is unlikely to be very robust as a platform for building such applications.
Since this article was written there have been updates to the information about metro. It appears that the low latency concerns have been somewhat allayed since WASAPI exclusive mode is indeed supported.
A big thank you to Seth Kellogg from QA who did the laborious benchmarking. Also thanks to Ryan Munnis from Tech Support for his help with some of the tests.