Set up Delivery Optimization for Windows
Applies to
- Windows 10
- Windows 11
Looking for consumer information? See Windows Update: FAQ
Set up Delivery Optimization
You can use Group Policy or an MDM solution like Intune to configure Delivery Optimization.
You find the Delivery Optimization settings in Group Policy under Computer Configuration\Administrative Templates\Windows Components\Delivery Optimization.
Starting with Microsoft Intune version 1902, you can set many Delivery Optimization policies as a profile, which you can then apply to groups of devices. For more information, see Delivery Optimization settings in Microsoft Intune.
Starting with Windows 10, version 1903, you can use the Azure Active Directory (Azure AD) Tenant ID as a means to define groups. To set the value for DOGroupIDSource to its new maximum value of 5.
Allow service endpoints
When using a firewall, it's important that the Delivery Optimization Service endpoints are allowed and associated ports are open. For more information, see Delivery Optimization FAQ.
Allow content endpoints
When using a firewall, it's important that the content endpoints are allowed and associated ports are open. For more information, see Endpoints for Delivery Optimization and Microsoft Connected Cache content.
Recommended Delivery Optimization settings
Delivery Optimization offers a great many settings to fine-tune its behavior see Delivery Optimization reference for a comprehensive list, but for the most efficient performance, there are just a few key parameters that have the greatest impact if particular situations exist in your deployment. If you just need an overview of Delivery Optimization, see Delivery Optimization for Windows 10 updates.
- Does your topology include multiple breakouts to the internet that is, a "hybrid WAN" or are there only a few connections to the internet, so that all requests appear to come from a single external IP address a "hub and spoke" topology?
- If you use boundary groups in your topology, how many devices are present in a given group?
- What percentage of your devices are mobile?
- Do your devices have a lot of free space on their drives?
- Do you have a lab scenario with many devices on AC power?
Note
These scenarios (and the recommended settings for each) are not mutually exclusive. It's possible that your deployment might involve more than one of these scenarios, in which case you can employ the related settings in any combination as needed. In all cases, however, "download mode" is the most important one to set.
Note
Microsoft Intune includes a profile to make it easier to set Delivery Optimization policies. For details, see Delivery Optimization settings for Intune.
Quick-reference table:
Use case | Policy | Recommended value | Reason |
---|---|---|---|
Hub & spoke topology | Download mode | 1 or 2 | Automatic grouping of peers to match your topology |
Sites with > 30 devices | Minimum file size to cache | 10 MB (or 1 MB) | Use peers-to-peer capability in more downloads |
Large number of mobile devices | Allow uploads on battery power | 60% | Increase # of devices that can upload while limiting battery drain |
Labs with AC-powered devices | Content expiration | 7 (up to 30) days | Leverage devices that can upload more for a longer period |
Hybrid WAN scenario
For this scenario, grouping devices by domain allows devices to be included in peer downloads and uploads across VLANs. Set Download Mode to 2 - Group. The default group, when the GroupID or GroupIDSource policies aren't set, is the AD Site (1), Authenticated domain SID (2) or AAD Tenant ID (5), in that order. If your domain-based group is too wide, or your Active Directory sites aren't aligned with your site network topology, then you should consider other options for dynamically creating groups, for example by using the DOGroupIDSource policy.
In Group Policy go to Computer Configuration\Administrative Templates\Windows Components\Delivery Optimization and set Download mode to 2.
Using with MDM, go to ./Device/Vendor/MSFT/Policy/Config/DeliveryOptimization/ and set DODownloadMode to 1 or 2.
Hub and spoke topology with boundary groups
The default download mode setting is 1; this means all devices breaking out to the internet using the same public IP is considered as a single peer group. To prevent peer-to-peer activity across your WAN, you should set the download mode to 2. If you have already defined Active Directory sites per hub or branch office, then you don't need to do anything else since the Active Directory sites are used by default as the source for creation of Group IDs. If you're not using Active Directory sites, you should set a different source for Groups by using the DOGroupIDSource options or the DORestrictPeerSelectionBy policy to restrict the activity to the subnet.
With Group Policy go to Computer Configuration\Administrative Templates\Windows Components\Delivery Optimization and set Download mode to 2.
Using MDM, go to ./Device/Vendor/MSFT/Policy/Config/DeliveryOptimization/ and set DODownloadMode to 2.
Note
For more information about using Delivery Optimization with Configuration Manager boundary groups, see Delivery Optimization for Configuration Manager.
Large number of mobile devices
If you have a mobile workforce with a great many mobile devices, set Delivery Optimization to allow uploads on battery power, while limiting the use to prevent battery drain. A setting for DOMinBatteryPercentageAllowedToUpload of 60% is a good starting point, though you might want to adjust it later.
With Group Policy, go to Computer Configuration\Administrative Templates\Windows Components\Delivery Optimization and set Allow uploads while the device is on battery while under set Battery level to 60.
Using MDM, go to ./Device/Vendor/MSFT/Policy/Config/DeliveryOptimization/ and set DOMinBatteryPercentageAllowedToUpload to 60.
Plentiful free space and large numbers of devices
Many devices now come with large internal drives. You can set Delivery Optimization to take better advantage of this space (especially if you have large numbers of devices) by changing the minimum file size to cache. If you have more than 30 devices in your local network or group, change it from the default 50 MB to 10 MB. If you have more than 100 devices (and are running Windows 10, version 1803 or later), set this value to 1 MB.
With Group Policy, go to Computer Configuration\Administrative Templates\Windows Components\Delivery Optimization and set Minimum Peer Caching Content File Size to 10 (if you have more than 30 devices) or 1 (if you have more than 100 devices).
Using MDM, go to ./Device/Vendor/MSFT/Policy/Config/DeliveryOptimization/ and set DOMinFileSizeToCache to 100 (if you have more than 30 devices) or 1 (if you have more than 100 devices).
Lab scenario
In a lab situation, you typically have a large number of devices that are plugged in and have a lot of free disk space. By increasing the content expiration interval, you can take advantage of these devices, using them as excellent upload sources in order to upload more content over a longer period.
With Group Policy, go to Computer Configuration\Administrative Templates\Windows Components\Delivery Optimization and set Max Cache Age to 604800 (7 days) or more (up to 30 days).
Using MDM, go to ./Device/Vendor/MSFT/Policy/Config/DeliveryOptimization/ and set DOMaxCacheAge to 7 or more (up to 30 days).
Learn more about Delivery Optimization testing scenarios.
Monitor Delivery Optimization
Windows PowerShell cmdlets
Starting in Windows 10, version 1703, you can use new PowerShell cmdlets to check the performance of Delivery Optimization.
Analyze usage
Get-DeliveryOptimizationStatus
returns a real-time snapshot of all current Delivery Optimization jobs.
Key | Value |
---|---|
File ID | A GUID that identifies the file being processed |
FileSize | Size of the file |
FileSizeInCache | Size of the file in the cache |
TotalBytesDownloaded | The number of bytes from any source downloaded so far |
PercentPeerCaching | The percentage of bytes downloaded from peers versus over HTTP |
BytesFromPeers | Total bytes downloaded from peer devices (sum of bytes downloaded from LAN, Group, and Internet Peers) |
BytesfromHTTP | Total number of bytes received over HTTP. This metric represents all HTTP sources, which includes BytesFromCacheServer |
Status | Current state of the operation. Possible values are: Downloading (download in progress); Complete (download completed, but isn't uploading yet); Caching (download completed successfully and is ready to upload or uploading); Paused (download/upload paused by caller) |
Priority | Priority of the download; values are foreground or background |
BytesFromCacheServer | Total number of bytes received from cache server (MCC) |
BytesFromLanPeers | Total number of bytes received from peers found on the LAN |
BytesFromGroupPeers | Total number of bytes received from peers found in the group. (Note: Group mode is LAN + Group. If peers are found on the LAN, those bytes will be registered in 'BytesFromLANPeers'.) |
BytesFromInternetPeers | Total number of bytes received from internet peers |
BytesToLanPeers | Total number of bytes delivered from peers found on the LAN |
BytesToGroupPeers | Total number of bytes delivered from peers found in the group |
BytesToInternetPeers | Total number of bytes delivered from peers found on the LAN |
DownloadDuration | Total download time in seconds |
HttpConnectionCount | |
LanConnectionCount | |
GroupConnectionCount | |
InternetConnectionCount | |
DownloadMode | |
SourceURL | Http source for the file |
CacheHost | IP address for the cache server |
NumPeers | Indicates the total number of peers returned from the service. |
PredefinedCallerApplication | Indicates the last caller that initiated a request for the file. |
ExpireOn | The target expiration date and time for the file. |
IsPinned | A yes/no value indicating whether an item has been "pinned" in the cache (see setDeliveryOptmizationStatus ). |
Get-DeliveryOptimizationPerfSnap
returns a list of key performance data:
Key | Value |
---|---|
FilesDownloaded | Number of files downloaded |
FilesUploaded | Number of files uploaded |
Files | |
TotalBytesDownloaded | Total bytes downloaded |
TotalBytesUploaded | Total bytes uploaded |
AverageDownloadSize | Average transfer size (download); that is, the number bytes downloaded divided by the number of files |
AverageUploadSize | Average transfer size (upload); the number of bytes uploaded divided by the number of files |
DownloadMode | Delivery Optimization Download mode used to deliver file |
CacheSizeBytes | |
TotalDiskBytes | |
AvailableDiskBytes | |
CpuUsagePct | |
MemUsageKB | |
NumberOfPeers | |
CacheHostConnections | |
CdnConnections | |
LanConnections | |
LinkLocalConnections | |
GroupConnections | |
InternetConnections | |
DownlinkBps | |
DownlinkUsageBps | |
UplinkBps | |
UplinkUsageBps | |
ForegroundDownloadRatePct | |
BackgroundDownloadRatePct | |
UploadRatePct | |
UplinkUsageBps | |
ForegroundDownloadRatePct | |
BackgroundDownloadRatePct | |
UploadRatePct | |
UploadCount | |
ForegroundDownloadCount | |
ForegroundDownloadsPending | |
BackgroundDownloadCount | |
BackgroundDownloadsPending |
Using the -Verbose
option returns additional information:
- Bytes from peers (per type)
- Bytes from CDN (the number of bytes received over HTTP)
- Average number of peer connections per download
Starting in Windows 10, version 2004, Get-DeliveryOptimizationStatus
has a new option -PeerInfo
, which returns a real-time list of potential peers per file, including which peers are successfully connected and the total bytes sent or received from each peer.
Key | Value |
---|---|
IP | Peer device IP address |
PeerType | The type of peer used (LAN/Group/Internet/LinkLocal), determined by the Delivery Optimization Service, except for the LinkLocal option, which uses the DNS-SD protocol. |
ConnectionEstablished | True/False to indicate if peer is connected |
BytesSent | Bytes sent to/from the peer on the current connection |
BytesReceived | Bytes received to/from the peer on the current connection |
UploadRateBytes | Average value of upload rates on the current connection, over the past 20 seconds |
DownloadRateBytes | Average value of download rates on the current connection, over the past 20 seconds |
Starting in Windows 10, version 1803, Get-DeliveryOptimizationPerfSnapThisMonth
returns data similar to data from Get-DeliveryOptimizationPerfSnap
but limited to the current calendar month.
Manage the Delivery Optimization cache
Starting in Windows 10, version 1903:
set-DeliveryOptimizationStatus -ExpireOn [date time]
extends the expiration of all files in the cache. You can set the expiration immediately for all files that are in the "caching" state. For files in progress ("downloading"), the expiration is applied once the download is complete. You can set the expiration up to one year from the current date and time.
set-DeliveryOptimizationStatus -ExpireOn [date time] -FileID [FileID]
extends expiration for a single specific file in the cache.
You can now "pin" files to keep them persistent in the cache, only with files that are downloaded in modes 1, 2, or 3.
set-DeliveryOptimizationStatus -Pin [True] -File ID [FileID]
keeps a specific file in the cache such that it won't be deleted until the expiration date and time (which you set with set-DeliveryOptimizationStatus -ExpireOn [date time] -FileID [FileID]
). The file is also excluded from the cache quota calculation.
set-DeliveryOptimizationStatus -Pin [False] -File ID [FileID]
"unpins" a file, so that it will be deleted when the expiration date and time are reached. The file is included in the cache quota calculation.
delete-DeliveryOptimizationCache
lets you clear files from the cache and remove all persisted data related to them. You can use these options with this cmdlet:
-FileID
specifies a particular file to delete.-IncludePinnedFiles
deletes all files that are pinned.-Force
deletes the cache with no prompts.
Work with Delivery Optimization logs
Starting in Windows 10, version 2004:
Enable-DeliveryOptimizationVerboseLogs
Disable-DeliveryOptimizationVerboseLogs
Get-DeliveryOptimizationLogAnalysis [ETL Logfile path] [-ListConnections]
With no options, this cmdlet returns these data:
- total number of files
- number of foreground files
- minimum file size for it to be cached
- number of eligible (larger than the minimum size for peering) files
- number of files that found peers
- number of peering files (the number of files that got at least 1 byte from peers)
- overall efficiency
- efficiency in the peered files
Using the -ListConnections
option returns these details about peers:
- destination IP address
- peer type
- status code
- bytes sent
- bytes received
- file ID
Starting in Windows 10, version 1803:
Get-DeliveryOptimizationLog [-Path <etl file path, supports wildcards>] [-Flush]
If Path
isn't specified, this cmdlet reads all logs from the DoSvc log directory, which requires administrator permissions. If Flush
is specified, the cmdlet stops DoSvc before reading logs.
Log entries are written to the PowerShell pipeline as objects. To dump logs to a text file, run Get-DeliveryOptimizationLog | Set-Content <output file>
or something similar.
Monitor with Windows Update for Business Delivery Optimization Report
Windows Update for Business Delivery Optimization Report provides you with information about your Delivery Optimization configuration, including the observed bandwidth savings across all devices that used peer-to-peer, Microsoft Connected Cache (MCC), HTTP source/CDN distribution over the past 28 days.
For details, see Windows Update for Business Delivery Optimization Report.
Troubleshooting
This section summarizes common problems and some solutions to try.
If you don't see any bytes from peers
If you don't see any bytes coming from peers the cause might be one of the following issues:
- Clients aren’t able to reach the Delivery Optimization cloud services.
- The cloud service doesn’t see other peers on the network.
- Clients aren’t able to connect to peers that are offered back from the cloud service.
- None of the computers on the network are getting updates from peers.
Clients aren't able to reach the Delivery Optimization cloud services
Try these steps:
- Start a download of an app that is larger than 50 MB from the Store (for example "Candy Crush Saga").
- Run
Get-DeliveryOptimizationStatus
from an elevated PowerShell window and observe the DODownloadMode setting. For peering to work, download mode should be 1, 2, or 3. - If the download mode is 99, it could indicate your device is unable to reach the Delivery Optimization cloud services. Ensure that the Delivery Optimization host names are allowed access: most importantly *.prod.do.dsp.mp.microsoft.com.
The cloud service doesn't see other peers on the network
Try these steps:
- Download the same app on two different devices on the same network, waiting 10 – 15 minutes between downloads.
- Run
Get-DeliveryOptimizationStatus
from an elevated PowerShell window and ensure that DODownloadMode is 1 or 2 on both devices. - Run
Get-DeliveryOptimizationPerfSnap
from an elevated PowerShell window on the second device. The NumberOfPeers field should be nonzero. - If the number of peers is zero and DODownloadMode is 1, ensure that both devices are using the same public IP address to reach the internet (you can easily do this by opening a browser window and do a search for “what is my IP”). In the case where devices aren't reporting the same public IP address, configure DODownloadMode to 2 (Group) and use a custom DOGroupID (Guid).
Note
Starting in Windows 10, version 2004, Get-DeliveryOptimizationStatus
has a new option -PeerInfo
which returns a real-time list of potential peers per file, including which peers are successfully connected and the total bytes sent or received from each peer.
Clients aren't able to connect to peers offered by the cloud service
Try a Telnet test between two devices on the network to ensure they can connect using port 7680. Follow these steps:
- Install Telnet by running
dism /online /Enable-Feature /FeatureName:TelnetClient
from an elevated command prompt. - Run the test. For example, if you are on device with IP 192.168.8.12 and you're trying to test the connection to 192.168.9.17 run
telnet 192.168.9.17 7680
(the syntax is telnet [destination IP] [port]. You'll either see a connection error or a blinking cursor like this /_. The blinking cursor means success.
Note
You can also use Test-NetConnection instead of Telnet to run the test. Test-NetConnection -ComputerName 192.168.9.17 -Port 7680
None of the computers on the network are getting updates from peers
Check Delivery Optimization settings that could limit participation in peer caching. Check whether the following settings in assigned group policies, local group policies, or MDM policies are too restrictive:
- Minimum RAM (inclusive) allowed to use peer caching
- Minimum disk size allowed to use peer caching
- Enable peer caching while the device connects using VPN.
- Allow uploads when the device is on battery while under the set battery level
Feedback
Submit and view feedback for