Saturday, November 7, 2015

How to Increase Distributed Cache Memory Size in SharePoint 2013

By default, the Distributed cache memory allocation size defaults to a value of 10% of total physical memory when SharePoint Server 2013 installs. The Distributed Cache service uses half of that memory allocation for data storage (also known as cache size, 5% cache size). You can change the memory allocation as it significantly affects the performance of the Distributed Cache service. Or you may want to change the memory allocation if you added more memory to your SharePoint servers after SharePoint is installed.

Get Distributed Cache Memory Allocation size:
To Get the current memory allocation of Distributed Cache, use:

Use-CacheCluster  
Get-AFCacheHostConfiguration -ComputerName $env:computername -CachePort "22233"  
Increase Distributed Cache Memory Size in SharePoint 2013
SharePoint 2013 distributed Cache is explained in my another article: Distributed Cache Service in SharePoint 2013 - Explained

How to Change  Distributed Cache Memory Size in SharePoint 2013? 
To Change distributed cache memory settings follow these steps:
  1. Stop the Distributed Cache service on all cache hosts in the farm.
  2. Change the cache size of the Distributed Cache service using: Update-SPDistributedCacheSize cmdlet
  3. Start the Distributed Cache service on all cache hosts in the farm
Step 1: Stop Distributed Cache Service:
Follow these steps on each host to stop distributed cache service.
  • Go to SharePoint 2013 Central Administration >> System Settings >> Manage services on server. 
  • Locate and Click on "Stop" link next to Distributed Cache.
You can also use PowerShell to stop Distributed Cache Service instance.
$instanceName ="SPDistributedCacheService Name=AppFabricCachingService" 
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername} 
$serviceInstance.Unprovision()

#Or Use: Stop-SPDistributedCacheServiceInstance -Graceful

Step 2: Increase Distributed Cache Memory Size
You can increase size of the Cache with the following PowerShell Command. Login to any one of your SharePoint server which is part of Distributed cache cluster and run this command, it would set same Cache Size on all cache host on the farm including application servers if they are part of Cache cluster.
Update-SPDistributedCacheSize -CacheSizeInMB 1024
The maximum amount of memory that can be allocated to each cache host in the server farm is 16GB,  We cannot mention this value more than 40% of the system RAM. Ensure that the memory allocation assigned to the Distributed Cache service is the same on all servers that are running the Distributed Cache service. If you are running a small farm with <10k users in Collocated mode, 1 GB of RAM should be enough. For dedicated mode, use the formula given in the technet article below.

Step 3: Start the Distributed Cache service

Start the Distributed Cache service on each host using:
  • Central Administration >> System Settings >> Manage services on server.
  • Locate and Start Distributed cache service. 
Using PowerShell to Start Distributed Cache Service Instance:
$instanceName ="SPDistributedCacheService Name=AppFabricCachingService" 
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername} 
$serviceInstance.provision()
Technet Reference: Manage the Distributed Cache service in SharePoint Server 2013



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...