I am trying to implement Policy-based QoS on a Windows Server 2012 VM (running on Hyper-V), but for some reason it's not kicking in. The way I added the policy was by going into the Local Group Policy Editor ==> Windows Settings ==> Policy-based QoS and added a new policy for a specific exe (didn't use the path, just the exe name), DSCP Value is 0 and a Throttle Rate of 40960 as a start.
When I ran the exe in question, it quickly started hitting outbound rates of 100mb/s and higher, which it shouldn't be doing. I tried doing a gpupdate /force
to the server, but that didn't change anything either. Finally, I changed the QoS policy to be any application, TCP/UDP and the throttle rate of 40960, but that still didn't do any throttling for me - it's still running at north of 100mb/s which correlates to a rather large colocation bill.
Any ideas on how I can rate limit this exe? I can't use our router for this, as I don't know the destination IPs for this outbound traffic - it just uses DNS to Azure, and if they changed an IP, I'd be out of luck.
Edit: I found a SF post (here: How can I limit a users bandwidth in Windows Server 2008 R2) that mentioned a utility called NetLimiter 4 and gave it a shot, but it also didn't seem to limit either as my bandwidth was still spiking at well over 90mb/s.
I think you are misunderstanding how QoS works.
Lets say you have two applications running on a server (app A and app B) and either one is maxing the bandwidth. You decide you want to make sure App A gets more of the bandwidth.
In this case you would define two polices (lets say using exe name), you give App A a DSCP value of 10 and App B 5. You assign a throttle value of 10 MB/s to App A and 5 Mb/s to App B.
The important bit When App A is running on its own it won't be limited to 10MB/s and when App B is running on its own it won't be limited 5MB/s. Only when the two are running together and there is bandwidth contention will the throttle limit be effective.
This happens because it isn't a bandwidth limiting mechanism it is quality of service, the design implementation is to prioritise traffic rather then limit it when there is available bandwidth.
Take a look at the article here for more information but the part relating to above is this
You may want to look at the bandwidth/qos settings on the vm configuration in hyper-v manager for true bandwidth control
I've worked with QoS in the networking world for years. I've not worked with it in Microsoft Windows Server (any version), but I would think the concepts are the same. Quality of Service is intended to control bandwidth. You can prioritize certain types of traffic over other types (voice and video over web browsing) when there is congestion, but what you want is traffic policing/shaping. With policing, you set a max bandwidth, and anything above that is dropped. With shaping, the excess traffic is queued and transmitted later, all while ensuring the bandwidth cap isn't exceeded.
https://technet.microsoft.com/en-us/library/hh831679.aspx#bkmk_bandwidth
I can't tell whether Microsoft's Maximum Bandwidth feature is intended to use policing or shaping, but the verbiage on that TechNet article makes me thing what you want to do is possible. However, I can't seem to get it working on my Windows 10 PC either. :/
Update 10/23/15 I found an article detailing the very process you want to implement (traffic police a single executable), but I've tried this on Server 2008 and Windows 10 to no avail, even after multiple restarts. Others seemed to have it working, except for the last commenter on that thread, so this should work... https://practicalsbs.wordpress.com/2014/08/05/onedrive-throttling-upload-speed/
Using powershell on Win Server 2012 R2 worked for me, there was about 5 min delay for policy to take new value, but worked.
I run psping in bandwidth mode as server on one machine and set policy on port 444 to throttle at 10Mbit/sec, 443 port remains unthrottled
From another machine, here's diff between 443 and 444 port bandwidth: