Windows XP: The Myth of QoS

There is not a single person who would at least once have not read any FAQ on Windows XP. And if so, then everyone knows that there is such a harmful service Quality of Service - abbreviated QoS. When setting up the system, it is highly recommended to disable it, because it by default limits the network bandwidth by 20%, and as if this problem also exists in Windows 2000.

Here are the lines:

"Q: How can I completely disable QoS (Quality of Service) service? How do I configure it? Is it true that it limits the speed of the network?
A: Indeed, by default Quality of Service reserves for its needs 20% of the bandwidth of the channel (any - at least modem at 14400, although gigabit Ethernet). Even if you delete the QoS Packet Scheduler service from the Properties connection, this channel is not released. Release the channel or simply configure QoS here. Launch the Group Policy applet (gpedit.msc). In Group Policy, we find the Local computer policy and click on Administrative templates. Choose Network - QoS Packet Sheduler. Enable Limit reservable bandwidth. Now reduce Bandwidth limit 20% to 0% or just turn it off. If desired, you can also configure other QoS parameters here. To activate the changes made, it only remains to reboot. "
20% is, of course, very much. Truly Microsoft is "Mazday". Approvals of this kind are roaming from the FAQ to the FAQ, from the forum to the forum, from the media to the media, they are used in all sorts of "tweaks" - programs for "customizing" Windows XP (by the way, open the "Group Policy" and "Local Security Policies" And no "tweak" can not be compared with them for the richness of the settings options). Unconditional allegations of this kind should be carefully discarded, which we will now do by applying a systemic approach. That is, we will thoroughly study the problem issue, relying on the official sources.

What is a network with a quality service?

Let's take the following simplified definition of the network system. Applications run and work on hosts and exchange data among themselves. Applications send data to the operating system for transmission over the network. Once the data is transferred to the operating system, they become network traffic.
The QoS network service relies on the ability of the network to process this traffic so that certain applications are guaranteed to execute requests. This requires a fundamental mechanism for processing network traffic that can identify traffic that has the right to special processing and the right to manage these mechanisms.

Functionality QoS is designed to satisfy two network entities: network applications and network administrators. They often have disagreements. The network administrator limits the resources used by a specific application, while the application tries to capture as many network resources as possible. Their interests can be reconciled, taking into account the fact that the network administrator plays a dominant role in relation to all applications and users.

Basic QoS Parameters

Different applications have different requirements for processing their network traffic. Applications are more or less tolerant of traffic delays and losses. These requirements are applied in the following parameters related to QoS:

• Bandwidth - the rate at which traffic generated by the application must be transmitted over the network;
• Latency - the delay that an application can tolerate in the delivery of a data packet.
• Jitter - change the delay time.
• Loss (loss) - percentage of lost data.

If endless network resources were available, then all application traffic could be transmitted at the required speed, with zero delay time, zero delay time variation and zero loss. However, network resources are not unlimited.
The QoS mechanism controls the allocation of network resources for application traffic in order to meet the transmission requirements.

Fundamental QoS resources and traffic processing mechanisms

Networks that connect hosts use a variety of network devices including host network adapters, routers, switches and hubs. Each of them has network interfaces. Each network interface can receive and transmit traffic at the final rate. If the speed with which traffic is directed to the interface is higher than the speed at which the interface transmits traffic further, then an overload occurs.

Network devices can handle the congestion state by arranging the traffic queue in the device's memory (in the buffer) until the overload passes. In other cases, network equipment may refuse traffic to facilitate congestion. As a result, applications are faced with a change in wait time (because traffic is stored in queues on interfaces) or with loss of traffic.

The ability of network interfaces to transfer traffic and the availability of memory to store traffic in network devices (as long as traffic can not be sent further) are the fundamental resources required to provide QoS for application traffic flows.

Distribution of QoS resources by network devices

Devices that support QoS intelligently use the network resources to transfer traffic. That is, application traffic that is more tolerant of delays becomes in the queue (stored in a buffer in memory), and traffic of applications critical to delays is transmitted further.

To accomplish this task, the network device must identify traffic by classifying packets, and also have queues and mechanisms for servicing them.

The mechanism of traffic processing

The traffic processing mechanism includes:
• 802.1p
• Differentiated services of per-hop-behaviors (diffserv PHB).
• Integrated services (intserv).
• ATM and others.

Most LANs are based on IEEE 802 technology, including Ethernet, token-ring, etc. 802.1p is a traffic processing mechanism for supporting QoS in such networks.

802.1p defines a field (level 2 in the OSI network model) in the packet header 802, which can carry one of the eight priority values. Typically, hosts or routers send traffic to the local network, mark each sent packet, assigning it a certain priority value. It is assumed that network devices, such as switches, bridges and hubs, will handle the packets accordingly, using queuing mechanisms. The scope of 802.1p is limited to the local area network (LAN). As soon as the packet crosses the local network (via OSI layer 3), the priority of 802.1p is deleted.

Diffserv is a level 3 mechanism. It defines the field in level 3 of the IP packet header, called diffserv codepoint (DSCP).

Intserv is a whole range of services that defines a guaranteed service and service that manages the download. A guaranteed service promises to carry a certain amount of traffic with a measurable and limited delay. The service that manages the download agrees to carry a certain amount of traffic with the "easy availability of the network." These are measurable services in the sense that they are defined to provide measurable QoS to a specific amount of traffic.

Because ATM technology fragmentes packets into relatively small cells, it can offer very low latency. If you need to transfer a packet urgently, the ATM interface can always be released for transmission for the time it takes to transfer one cell.

QoS has many more complex mechanisms that ensure the operation of this technology. We note only one important point: in order for QoS to work, it is necessary to support this technology and the corresponding adjustment throughout the transmission from the initial point to the final one.

We accept the following:
• All routers participate in the transfer of the required protocols.
• One QoS session requiring 64 Kbps is initialized between host A and host B.
• Another session that requires 64 Kbps is initialized between host A and host D.
• To simplify the scheme, we assume that the routers are configured so that they can reserve all network resources.

In our case, one request for a 64 Kbps reservation would reach three routers in the data path between host A and host B. Another query of 64 Kbps would reach three routers between host A and host D. Routers would fulfill these resource reservation requests because They do not exceed the maximum. If instead each of the B and C hosts simultaneously initialized a 64 Kbps QoS session with host A, then the router serving these hosts (B and C) would disable one of the connections.

Now assume that the network administrator disables QoS processing in the three lower routers serving hosts B, C, D, E. In this case, requests for resources up to 128 Kbps would be satisfied regardless of the location of the host participating in the connection. At the same time, quality assurance would be low, since traffic for one host would jeopardize the traffic of another. Quality of service could be maintained if the top router restricted all requests to 64 Kbps, but this would lead to inefficient use of network resources.

On the other hand, the bandwidth of all network connections could be increased to 128 Kbps. But the increased bandwidth will only be used when hosts B and C (or D and E) simultaneously request resources. If this is not the case, then the network resources will again be used inefficiently.

Microsoft QoS Components

Windows 98 contains QoS components only for the user level including:

• Application components.
• GQoS API (part of Winsock 2).
• QoS service provider.

The operating system Windows 2000 / XP / 2003 contains all of the above and the following components:

• Resource Reservation Protocol Service Provider (Rsvpsp.dll) and RSVP service (Rsvp.exe) and QoS ACS. In Windows XP, 2003 is not used.
• Traffic management (Traffic.dll).
• Generic Packet Classifier (Msgpc.sys). The package classifier defines the class of the service to which the package belongs. In this case, the package will be put in the appropriate queue. Queues are managed by the QoS Packet Scheduler.
• QoS Packet Scheduler (Psched.sys). Defines QoS parameters for a specific data stream. Traffic is marked with a specific priority value. The QoS Packet Scheduler determines the schedule for queuing each packet and processes competing requests between queued packets that need simultaneous access to the network.

The applications are at the top of the stack. They may or may not know about QoS. To use the full power of QoS, Microsoft recommends using Generic QoS API calls in applications. This is especially important for applications that require high-quality service guarantees. Some utilities can be used to call QoS on behalf of applications that do not know about QoS. They work through the Traffic Management API. For example, NetMeeting uses the GQoS API. But for such applications, quality is not guaranteed.

The last nail

The above theoretical points do not give an unambiguous answer to the question, where do the notorious 20% go (which, I note, no one has yet accurately measured). Based on the above, this should not be. But opponents put forward a new argument: the QoS system is good, but the implementation is a curve. Consequently, 20% still "otzhirayutsya." It seems that the problem has come to the fore and the software giant, since it has long ago disproved such fabrications separately.

However, we will give the floor to the developers and present the selected moments from the article "316666 - Windows XP Quality of Service (QoS) Enhancements and Behavior" in the literary Russian language:

"One hundred percent of the network bandwidth is available for distribution among all programs if a program does not explicitly request priority bandwidth. This" reserved "bandwidth is available to other programs if the program that requested it does not send data.

By default, programs can reserve up to 20% of the primary connection speed on each interface of the computer. If a program that reserves bandwidth does not send enough data to use it completely, an unused portion of the reserved bandwidth is available for other data streams.

There were statements in various technical articles and teleconferences that Windows XP always reserves 20% of the available bandwidth for QoS. These statements are wrong. "

If now someone else is "fattening" 20% of the bandwidth, well, I can advise you to continue using more "tweaks" and network drivers. And not so much will "otzhiratsya."

Everything, the myth of QoS, die!