Under The Hood: I/O Priority and Networking

Along with working to modify the traditional cache hierarchy for better performance, Vista includes the introduction of several new technologies designed to help applications better utilize disk and network bandwidth. For disk bandwidth, Vista now includes an I/O priority system that allows applications to specify the priority of their I/O operations so that Vista can service the most important operations first, not unlike the priority system for applications. This is in comparison to XP which executes all I/O operations as if they have the same priority, which results in other applications having their own I/O operations slowed down even if they're more important.

With only four levels of priority (two of which are effectively for exclusive use by Vista), the I/O priority system in Vista isn't nearly as refined as the application priority system, but it's enough to get the job done. With two remaining priority levels, the benefit of the priority system to users is that traditional background tasks such as virus scanning can not only be low-priority tasks for the CPU, but now the disk too; anyone who has attempted two I/O heavy operations before has seen firsthand how they often cause the operations to take longer than their sums to complete. The new I/O priority system won't entirely alleviate any slowdowns caused by background applications as these requests have to be serviced at some point, but by reducing the interruptions caused by background applications these applications can be run without bringing a system to quite as much of a halt.

Somewhat related, I/O operation size has also been increased. Previously, Windows broke all I/O operations down to 64KB requests, which causes some overhead as each chunk of a larger operation needs to be processed separately. Vista no longer has a cap on I/O operation sizes, and will now attempt to execute I/O operations with the size a program requests. Microsoft has used Explorer as an example, where the copy command now uses 1MB operations.

Networking

Along with the changes in disk I/O to better maximize disk performance, Vista also implements a new TCP/IP stack - the so-called "Next Generation TCP/IP stack" - that includes new features to better maximize network utilization. However, since networking changes can affect entire networks and not just a single machine, only one of these features - Receive Window Auto-Tuning - is enabled. The other feature - Compound TCP - is disabled due to the potential to interrupt other machines on a network and/or hurt the client's network performance.

To discuss Receive Window Auto-Tuning, we must first quickly talk about TCP/IP networking and what a receive window is. In the most basic of terms, the receive window is the maximum amount of data that a sender can transmit at once before it must wait for an acknowledgement (ACK) from the receiver signaling that the data was received successfully. Once an ACK is received, the sender can begin transmitting more data. This process is intended to keep the sender from flooding the receiver with data, which could cause lost packets and other performance-reducing problems. The ideal size of this window varies upon network conditions and must be continuously renegotiated to maintain a transfer and maximize bandwidth usage; factors include both bandwidth and latency of a connection between two devices. For example, a computer using a dial-up modem can't send or receive data anywhere near as fast as a typical Internet server, so it would seldom have more than about 6 kB of data in-flight at once. Conversely, a high-speed broadband home computer might have several hundred kB of data in transit at once.

With Windows XP, the receive window could be scaled as needed, but it was not a fine-grained system. Except in specific cases, the maximum receive window size was a global value for all TCP connections. While on average it was usually good enough, it could be a poor value for specific connections. This is especially the case on high latency and high bandwidth connections, which is why one common tweak to improve networking performance for Windows machines with a broadband connection is to manually adjust this value - Windows simply didn't allow a window to normally scale to a large enough size to best utilize some broadband connections.

Auto-Tuning is a resolution to the inefficiencies of XP's scaling system, and it makes window scaling a more finely-grained operation. As the ideal receive window size is exactly the amount of data that can be in-flight between a sender and a receiver - the bandwidth-delay product (the product of the speed of a connection and its latency) - Vista's auto-turning system is designed to surpass XP's scaling system by not only allowing larger windows, but by also attempting to make a best-guess on the bandwidth-delay product in order to maximize bandwidth usage. Additionally, this is now a per-TCP connection attribute instead of a global attribute, allowing each connection to be more efficient rather than using the average connection values. As this is a safe optimization (QoS issues notwithstanding), this is one of the networking features enabled by default under Vista.

Compound TCP

The other significant addition to Vista's TCP/IP stack is Compound TCP, the product of an earlier research project by Microsoft in combining several different known techniques for maximizing bandwidth usage under high latency conditions. Under these conditions, traditional TCP traffic algorithms are reliable but slow to let the sender and receiver increase their windows to fill very large bandwidth-delay products. This is because traditional TCP is inherently a conservative and well behaved system based on reliability and sharing as the most important properties.

Compound TCP on the other hand is the merger of several aggressive algorithms - including Fast TCP, High Speed TCP, TCP Vegas, and TCP Reno - which when combined are far more aggressive at trying to quickly maximize bandwidth usage while maintaining reliability; unfortunately, these algorithms weren't originally designed to work all that well with traditional TCP. To that extent, in order to make Compound TCP safe for use on larger networks, Microsoft has reworked these algorithms so that they are effectively a single algorithm under Compound TCP, and their over-aggressive nature has been removed so that they will not dominate over traditional TCP traffic.

The end result is that while Compound TCP is designed to be safe, it's a cutting-edge technology that is not well tested, and for this reason it is disabled by default on Vista. Longhorn Server will be the first Windows product to ship with it enabled by default when it ships later this year. In our network tests, we have tested Vista both with Compound TCP enabled and disabled so that you can see the results of using it; however, until Compound TCP has undergone some more rigorous testing we would caution that it's not advisable to enable it on home computers or in production environments.

Hard Drive Performance and ReadyBoost Networking Performance
Comments Locked

105 Comments

View All Comments

  • Ryan Smith - Saturday, February 3, 2007 - link

    That's up to Vista, it benchmarks a flash drive to make sure it's fast enough to be effectively used as a ReadyBoost cache. If ReadyBoost won't engage, then your drive isn't passing one(or more) of their tests.
  • mlambert890 - Friday, February 2, 2007 - link

    How is the PC hemmhoraging marketshare to the Mac? You've got to be kidding. Their marketshare in 06 rose from a pathetic 4.4 to a somewhat less pathetic 4.8. Thats with ALL of their ridiculous hype, ALL of the asskissing from the press (including you guys now I guess?) and ALL of the armies of lunatic "Mac priests" that pollute every forum.

    Its hillarious that you would position this tiny growth in a share that declined steadily for 22 years until it hit rock bottom at like 3% in 2003 as a "hemmhorage". I have to wonder why you would characterize it that way. To be honest, it reeks of bias.
  • quanta - Friday, February 2, 2007 - link

    Think about it, ReadyBoost is treated by Vista as random access memory, to store temoprary contents than can change very often. Considering typical USB flash drive only has 100k write cycle, you will need to replace it very soon. Worse yet, when the flash drive is gone, so will your critical data at the worst possible time. With the hardware requirement of Vista, no amount of wear levelling is going to help.
  • Ryan Smith - Friday, February 2, 2007 - link

    No, this is wrong.

    ReadyBoost is a write-through data cache handled by the SuperFetch system; when enabled SuperFetch uses it as another cache location optimized for small files. Based on the information we've seen, it's used primarily to store DLLs and other static and semi-static data that is needed an intermediate amount of time(not important enough to spend valuable RAM, important enough to cache), with highly dynamic data sent to SuperFetch or the hard disk to avoid unnecessary wear out. It will most certainly put wear on flash memory, but it seems unlikely that it will put 51TB of write-wear(the amount of data that needs to be written on a 512MB flash card to write over all bits 100k times) before several years out.

    Of course, this is as according to Microsoft. We don't really know what exactly is being stored on a ReadyBoost drive at any given moment, however we have no reason to believe that Microsoft isn't really taking efforts to minimize writes. We'll find out if/when flash memory starts wearing out.
  • mlambert890 - Friday, February 2, 2007 - link

    We'll see. Please remember that the 100k write cycle is an average, that the flash is used as a small cache only, and that write leveling of COURSE will help before making assumptions.

    Ive been beating up flash for YEARS thats still going. There are moves to literally put OS's on flash based hard drives. Hybrid drives already use the same concept as ReadyBoost (and are also supported on Vista).

    Using flash as a cache for magnetic media is not some untested concept that is going to lead to global data destruction.

    MS must have really destroyed their mindshare that so many armchair scientists are just fully willing to believe that theyve figured out ALL the stuff that the "idiots" in Redmond dont realize. Give a little credit to the armies of PhDs that work on at least the basic concept for this crap. Maybe implementation gets flawed by the realities of release cycles and budgets, but BASIC CONCEPT is typically sound.
  • dugbug - Friday, February 2, 2007 - link

    UAC is like a firewall -- chatty at first (during installs and configurations), but once you have set up your system you will hardly ever hear from it. This should be obvious to the authors.

    And for that matter, the 6-operation file delete they discuss in the beginning was for deleting a file on a shared desktop (meaning a delete was for all users). This is commonplace for enterprise and workplace users, it should be no surprise that a file used by others would require permissions to delete. Though Im glad the number of operations was greatly reduced.

    As to the comments about vista being sluggish? Perhaps it is RAM? I have 2Gb and vista runs without any slowdown at all. Once you use it for a while you won't go back to XP.

    -d
  • LoneWolf15 - Friday, February 2, 2007 - link

    Untrue. Enthusiasts use lots of things like the Control Panel, MMC console, etc. and these all require UAC every time. Currently, I also have startup programs on my beta-test box that UAC blocks. This would be fine, if UAC had a feature saying "Yes, I know what this program is, let it run every time all the time" and be done. But, UAC doesn't have this option, so a user has to allow the program to run every single freaking time they boot their machine.

    I've tried changing the program properties so that it runs as Administrator; that hasn't solved the problem. I turned off UAC, which gives me a lovely annoying red-X shield in the system tray that every so often decides to warn me with a popup balloon that UAC is turned off and I could be in danger, so it's annoying even when turned off, and there's no easy way around it. Enthusiasts do a lot with their computers, and what they do is likely to increase their number of UAC prompts. Bottom line: Unlike OS X's methods, Vista's UAC happens far more often, and is far more annoying. And because it doesn't require a password (like OS X) and is just a click-through, I'll put money down that within a year, it will be worthless, as the average user will learn to click through it without reading a single bit of info.
  • funk3y - Sunday, February 4, 2007 - link

    The red cross can also be disabled for sure; on my computer, which is a member of a domain I recieve no error message at all, even if UAC & co are disabled.
  • haplo602 - Friday, February 2, 2007 - link

    Realy. What's the hype all about ?

    SuperFetch - trivial change to caching mechanisms. Anybody that would require it would have already implemented it in *NIX systems. This is a purely desktop user feature to hid some processing overhead. There's nothing new about this that would prevent implementation in w2k already except MS incompetence ...

    ReadyBoost - So the new standard is to have a permanently attached USB stick to have some performance ?

    Compund TCP, Receive window auto tuning - I laughed like mad. So they finaly made a proper implementation of something network related? End even then Vista is SLOWER. I'd suggest take a stand-alone NIC that Vista nad XP have drivers for themselves and test it. Should rule out driver bugs.

    I/O improvements - so I make an app that makes a high priority high capacity I/O operation (say 1GB) and you can go for lunch till the system is anyway usable. Seriously. I/O in small chunks makes perfect sense in multitasking environments since you have more entry point and can adjust the stream on OS level and tune performance. That XP or Vista are stupid enough to do this is their fault. I guess MS will hype this as the next best thing in a future OS ?

    All in All every feature hyped in the article does not deserve a Marketing Name(tm) because it is a normal concept. So we have a shiny new bigger and slower OS that is hiding this behind hyped features. F.E. memory compression could very much improve system performance without relying on external devices (ReadyBoost).
  • mlambert890 - Friday, February 2, 2007 - link

    Just admit your bias man. There is NOTHING MS could do that would cause you to give them kudos. I spend my days arguing with guys like you for a living (unfortunately) and its just exhausting.

    I could point you to REAMS of documentation of all the crap that has been rewritten and overhauled in Vista, but whats the point? You want to hate it so hate it.

    Its sad that technology debates are STILL religion for so many after all this time :(

Log in

Don't have an account? Sign up now