All postings, articles, and other content on this blog are provided ”AS IS” with with no warranties, and confer no rights. Any sample on this blog is subject to the terms specified at Microsoft
I would like to highlight some points concerning Distributed Cache and SharePoint 2013:
The Distributed Cache service can end up in a nonfunctioning or unrecoverable state if you do not follow the procedures that are listed in this article. In extreme scenarios, you might have to rebuild the server farm. The Distributed Cache depends on Windows Server AppFabric as a prerequisite. Do not administer the AppFabric Caching Service from the Services window in Administrative Tools in Control Panel. Do not use the applications in the folder named AppFabric for Windows Server on the Start menu.
On a server that has more than 16 GB of total physical memory, allocate a maximum of 16 GB of memory to the Distributed Cache service. If you allocate more than 16 GB of memory to the Distributed Cache service, the server might unexpectedly stop responding for more than 10 seconds.
The Distributed Cache service can run on either a physical or virtual server. When using virtualization, do not use Dynamic Memory to manage shared memory resources among other virtual machines and the Distributed Cache servers. The memory allocation for virtualized Distributed Cache servers must be fixed.
When your server farm has a dedicated Distributed Cache server. Use the following method to calculate how much memory can be assigned to the Distributed Cache service:
Determine the total physical memory on the server. For this example, we will use 16 GB as the total physical memory available on the server.
Reserve 2 GB of memory for other processes and services that are running on the cache host. For example, 16 GB – 2 GB = 14 GB. This remaining memory is allocated to the Distributed Cache service.
Take half of the remaining memory, and convert it to MB. For example, 14 GB/2 = 7 GB or 7000 MB. This is the cache size of the Distributed Cache service
Use the following procedure to update the memory allocation accordingly.
After installing the update you should do the following in all the servers that are holding the distributed cache
After you apply this cumulative update, AppFabric uses a nonblocking garbage collection (background server garbage collection). Nonblocking garbage collection is a new feature in the .NET Framework 4.5.
To apply this fix, follow these steps:
1. Upgrade the servers to the .NET Framework 4.5.2. Install the cumulative update package.3. Enable the fix by using the following setting <appSettings><add key="backgroundGC" value="true"/></appSettings> in the DistributedCacheService.exe.config file between
<appSettings><add key="backgroundGC" value="true"/></appSettings>
<dataCacheConfig>4. Restart the AppFabric Caching service for the update to take effect.Note By default, the DistributedCacheService.exe.config file is located under the following directory:
%ProgramFiles%\AppFabric 1.1 for Windows Server
Get-SPDistributedCacheClientSetting -ContainerType DistributedLogonTokenCache $DLTC = Get-SPDistributedCacheClientSetting -ContainerType DistributedLogonTokenCache$DLTC.maxBufferPoolSize = "1073741824"$DLTC.maxBufferSize = "33554432"$DLTC.requestTimeout = "3000"$DLTC.channelOpenTimeOut = "3000"$DLTC.MaxConnectionsToServer = "100"Set-SPDistributedCacheClientSetting -ContainerType DistributedLogonTokenCache $DLTCRestart-Service -Name AppFabricCachingService
Product Group update how to tune the Distributed cache please follow Fine-tune the Distributed Cache service by using a Windows PowerShell section https://technet.microsoft.com/en-us/library/jj219613.aspx
Héctor Calvarro Martín. SharePoint Dev/Core. EMEA Premier Field Engineer.
One question : I ve read that it is not à good thing to put the cache on the same server as the search engine ? Do you know why ?
Thanks for sharing