Friday, 25 May 2018

Limit bandwidth used by Windows Update


I have a Windows 8 (64-bit, not Pro) machine, and I want to limit the Internet bandwidth available to Windows Update. I read about BITS and GPMC methods, but I don't know how to open the BITS window, and GPMC seems like a Windows Server feature.


How can I control how much bandwidth is available to Windows Update and BITS?



Answer



If you have a Pro edition of Windows, you can use Group Policy even if you're not on a domain. Run gpedit.msc to open the Local Group Policy Editor. Expand the following containers in the left pane: Computer ConfigurationAdministrative TemplatesNetworkBackground Intelligent Transfer Service (BITS). Double-click the setting called Limit the maximum network bandwidth for BITS background transfers. In the dialog that appears, you can set one maximum rate for "working hours" (on a schedule you define) and a different maximum for other times. If you want to set the maximum to a certain value all the time, just make the two rates the same and clear the Use all available unused bandwith box, like this:


the Group Policy setting


I set the rate to 100 Kbps. Once done, click OK and close the Local Group Policy Editor. The changes are applied to the Registry immediately, but you may need to reboot for BITS to see them.




If you don't have a Pro edition, you can do directly to the Registry what the GPME does. (Note: I haven't personally tested this, since my machine is Pro, but I did verify that some policy keys appear even on the Home edition.) Open regedit, and navigate here, creating subkeys if they're absent:


HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\BITS

Create a DWORD value called EnableBITSMaxBandwidth with a value of 1; that tells BITS that there are settings to look at. Create DWORD values called MaxBandwidthValidFrom and MaxBandwidthValidTo, each containing an hour of the day from 0 to 23. (For example, 8 is 8:00 AM, and 17 is 5:00 PM.) These actually don't matter a lot in this case, but I told you about them for completion's sake.


Create two more DWORD values called MaxTransferRateOffSchedule and MaxTransferRateOnSchedule. Give each of them the maximum rate of transfer in Kbps. Note that you may need to switch to Decimal entry mode to see the value as normal humans think about numbers.


registry way


Final results, equivalent to the previous Group Policy screenshot:


all registry entries




If you have a Home edition but still want a GUI, you can use my open-source application Policy Plus. You'll find the relevant policy setting under NetworkBackground Intelligent Transfer Service (BITS) just like before, or you can jump right to the setting editor window by pasting Microsoft.Policies.BITS:BITS_MaxBandwidth in the Find | By ID window. From there, you can adjust the setting just like in the real Group Policy Editor. Click File | Save Policies to commit your changes to disk.


Tip: "Element Inspector" on the context menu of a policy lets you explore the Registry effects of that policy.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...