You experience the following situations when using Windows:
- Using an internet connection where bandwidth capacity is limited
- Wide Area Network (WAN) link
- Home or residential grade ADSL/cable/broadband; or
- You live in Australia.
- One or more computers within the network is saturating the internet link (perhaps you’re trying to watch YouTube videos too and they’re buffering)
- The network usage is essential or routine, and therefore cannot or should not be cancelled
- It has a crippling effect on the internet connection for all users on the network (Skype calls are terrible quality, videos buffer, etc.)
- Programs responsible may include OneDrive sync traffic, Dropbox, OneNote sync to Office365 or Microsoft cloud storage, FTP traffic, “the kids computer traffic”, torrent programs or generally anything involving large file transfer.
Take advantage of Quality of Service. It’s so magical! Definition from Wikipedia:
Quality of service (QoS) is the overall performance of a telephony or computer network, particularly the performance seen by the users of the network.
To quantitatively measure quality of service, several related aspects of the network service are often considered, such as error rates, bit rate, throughput, transmission delay, availability, jitter, etc.
Quality of service is particularly important for the transport of traffic with special requirements. In particular, much technology has been developed to allow computer networks to become as useful as telephone networks for audio conversations, as well as supporting new applications with even stricter service demands.
Last Accessed: 7 Sep 2015
However, CISCO’s documentation includes the point most relevant to the aforementioned scenario:
The primary goal of QoS is to provide priority including dedicated bandwidth, controlled jitter and latency (required by some real-time and interactive traffic), and improved loss characteristics. Also important is making sure that providing priority for one or more flows does not make other flows fail.
Last Accessed: 7 Sep 2015
This is precisely our situation: we’re seeing flows fail through no or poor Quality of Service (QoS) configuration.
QoS is configurable at a network (routers and firewalls) or computer system tier. For example if FTP traffic is slowing down your entire network, QoS configuration could be applied to FTP ports at the router level, enforcing the policy upon all network users.
Though, this post will focus on configuring QoS at the Windows operating system level. The advantage being, QoS policies are granular and can be set to target all programs, specific .exe files, paths with wildcards, or any URL/hostname – without requiring access or having technical know-how with network equipment like routers or firewalls.
Obviously in corporate environments, the QoS policy would be deployed through group policy using object level targeting. This would ensure only systems requiring the configuration receive it. While this blog won’t detail group policy implementation, it does explain 90% of the work required for corporate group policy rollout, making adaptation easy.
In my scenario, I need to prevent OneDrive from flooding my network. I’ve documented the process below for replication.
You’ll need to open the local group policy editor on the local system. Another method is to Start > Run, or Windows Key + R and open gpedit.msc. I find it easy to just type gpedit.msc in the start search box though.
Expand the Computer Configuration node and Windows Settings. You’ll see Policy-based QoS. Right mouse click and click Create new policy.
Give the policy a name that identifies it among others. I’m targeting OneDrive so I’ve named mine “OneDrive”.
Whether Differentiated Services Code Point (DSCP) values or a speed rate are used, depends on the situation.
I prefer to utilise bandwidth if it is available for use, and hence prefer the DSCP values. DSCP values prioritise traffic or differentiate levels of service. Alternatively, speed limits simply restrict the maximum speed of upload/download – even if there’s ample bandwidth available.
Consider I have 20GB of files to sync with OneDrive. Reducing the speed of upload won’t best utilise the bandwidth available and will only serve to slow down the speed those files sync. Instead I want the QoS policy to reduce the OneDrive sync traffic priority to below that of other normal traffic (web browsing, VoIP calls, video, etc.).
Common DSCP values:
- 0 = Not applicable, off or none (QoS is disabled)
- 8 = Scavenger
- 10 = Bulk data
- 16 = Network management
- 18 = Transactional Data
- 24 = Call Signaling
- 26 = Mission-Critical Data
- 32 = Streaming Video
- 34 = Video Conferencing
- 46 = Voice
- 48 = Network Routing
I recommend a DSCP Value of 1 to 10 for low priority traffic and have found it the most effective.
For example, if backing up data over the network I noticed congestion affecting normal traffic, I’d select a DSCP Value between 1 and 10. If I was prioritising video, I’d select a more appropriate, higher priority value.
In my case of OneDrive sync, I decided to go with a DSCP Value of 10.
Enter the name of the executable file. I looked up the process to confirm I got the name correct. A full path with wildcards can be used, but honestly it’s not important in this case.
Here’s an example of looking up the process name. Just right mouse click on the process, click Properties.
One could apply the policy to only traffic coming and going to certain networks. Though I want my QoS OneDrive sync policy to apply to any/all networks.
While the protocol is adjustable, I personally am only concerned with TCP traffic.
I don’t bother with port numbers as I need the policy to apply to all traffic created by the OneDrive.exe process, regardless of what ports are used by that process.
Finished! The policy starts effect immediately, no restart or process recycle required. Below is a few other examples I prepared.
What’s your scenario? Let me know why you’re adjusting your QoS policies in Windows. 🙂
- What is sidebar.exe
- What process is locking this file?
- Error message “The file is either corrupted or does not have the latest credentials associated with recovery service. (ID: 34513) “
- What application pool is using all that CPU?
- 2 Reasons Why I Am rolling Back From Windows 8.1 to Windows 7
- Google Chrome and NTLM Auto Login Using Windows Authentication
- Windows sidebar.exe Memory Leak
- ISAPI Filter ‘C:\Windows\Microsoft.NET\Framework\v4.0.30319\\aspnet_filter.dll’ could not be loaded due to a configuration problem