You should, by now, have realised that here at 2Pint we quite like the efficiency that the Microsoft Peer-to-Peer ecosystem brings to ConfigMgr Land. So it’s always nice when you find that the ConfigMgr team have added EVEN MORE P2P GOODNESS in the latest Current Branch release (which is 1802 at the time of writing btw)

ConfigMgr and BranchCache do a great job of making content from Distribution Points traverse the network efficiently using P2P, but we always thought that it’d be nice if ConfigMgr could also apply that to traffic from the Management Point (MP) such as Policy body download, Configuration Item (CI) digests, and the whizzy new ‘Run Script’ feature. We’ve been swapping email with the ConfigMgr devs on this for a while now, and this is now in the production release after being tested in a couple of Tech Preview releases! I cleared the BranchCache cache first (using netsh br flush), and then performed a Policy sync, and Bingo! A whopping 32k of content popped into the BranchCache cache (confirmed by running netsh br show status all). You can also check this using the BITS event log – check Event ID 4 and the bytesTransferredFromPeer field.

Although 32k doesn’t sound like a lot – multiply that by the number of clients that you have, add in some CI’s and scripts, and it can soon add up to a massive saving on your network – especially for Policy Downloads for Task Sequences that reference a TON of content – these policy downloads can be quite large. Anyway – Happy Days!  All you have to do is enable BranchCache on your Management Point (if it’s not already enabled) for the magic to start (well, see the undocumented tweak below also), and to do that you can simply run the following PowerShell command:

Install-WindowsFeature BranchCache
then, verify with Get-BCStatus
ContentServerIsEnabled : True

is what you want to see there..

Done! …almost..
The Undocumented (and unsupported) Tweak: Of course – it’s never that simple right? The problem is that BranchCache has a built-in limit of 64k, meaning that content smaller than that size will simply be ignored and left out of the P2P party. SAD! (as the Ginger Biscuit would say). The good news is of course that the 2Pinters have a lovely undocumented tweak for this, which will make your MP BranchCach-ing dance like Fred Astaire. We wrote about it some time ago here, but basically there’s a registry value on the server side with BranchCache, that sets the minimum content limit, so all you need to do it to set that value (I have it turned right down to 2048 (2k) here and it’s working fine but testing is always advised), and then cycle the BranchCache service so that it picks up the new settings. Here’s the registry value.
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\PeerDistKM\Parameters –  MinContentLength
In reality – leaving it at the default is fine for MOST networks – the above tweak is only really for the spectacularly bandwidth challenged amongst us. If you do want to lower this threshold – 32k should be fine – as most policy of any notable size should be processed. Any smaller than that and the overhead in terms of network (downloading BranchCache hashes etc) is not worth it really.
Of course, the hard work doesn’t end here! We have of course visualized this, adding a new ruleset to our StifleR product so that you can see these Policy transfers happen in real time, and prioritize them along the way..

If you want to see how much bandwidth BranchCache is saving for you on your Management Point – check out the ‘BranchCache Kernel Mode’ Perfmon counters – and specifically this one:  ‘Projected Server Bytes Without Caching’ – which tells you exactly how much you have saved on your network.

Standard 2Pint Disclaimer applies here, i.e if it breaks stuff we are in no way to blame at all. If however it is amazing and changed your life forever we take full credits. Super!
Happy Caching y’all

Phil 2Pint