Tips and Tricks from the Field on the new Distributed Cache Service in SharePoint 2013

Tips and Tricks from the Field on the new Distributed Cache Service in SharePoint 2013

  • Comments 4
  • Likes

Want the “real world” scoop on the new Distributed Cache Service in SharePoint 2013?  In this article, SharePoint PFE Vladimir Medina from Mexico City shares some tips from the field to help you keep your SharePoint 2013 Farm healthy.


If you, like me, are playing with SharePoint 2013 or if you have plans to migrate/deploy SharePoint 2013, you may have already heard about Distributed Cache (a.k.a. Velocity or AppFabric).  In this post, I’d like to make you aware of some tips from the field that may help you avoid some serious issues in your production Farm.

First things first, see the following articles to learn about planning and managing Distributed Cache on SharePoint 2013:

Plan for feeds and the Distributed Cache service in SharePoint Server 2013

Manage the Distributed Cache service in SharePoint Server 2013

As you know, real world scenarios are always different and more challenging than TechNet “ideal world” and some tips that we noted from Premier support cases are really valuable:

  • When you run Configuration Wizard on SharePoint 2013 (a.k.a. psconfig), Distributed Cache service is enabled by default on that server.  If you run the wizard on all SharePoint servers in the Farm, the service will be running on all those servers which is not the ideal configuration for your production environment.  To avoid this problem, configure your servers via PowerShell instead of the wizard.  After the first Farm server is configured, you can use connect-spconfigurationdatabase with –skipregisterasdistributedcachehost parameter.
  • Plan to have a dedicated server or servers run only the Distributed Cache service.  Avoid sharing that server(s) with any other service, even Central Administration, because Distributed Cache needs special considerations with respect to resources and maintenance activities.
  • Recommended resources for dedicated servers are:
  • 4 cores processor
  • 24 GB RAM (8-16 GB dedicated for Distributed Cache)
  • 1 Gbps network interface
  • Physical and Virtual environments are supported, however on virtual environments dynamic memory is not supported
  • Distributed Cache must be configured manually to use dedicated resources, so please run the following actions during the Farm Configuration process before starting the User Profile Service:
  1. Stop Distributed Cache service on all servers running it, wait on each one until the service stops
    Stop-SPDistributedCacheServiceInstance –Graceful
    (the graceful parameter helps to move cache on that server to another available server)
  2. Then run cmdlet: 
    Update-SPDistributedCacheSize –CacheSizeinMB <size in MB>
    Remember to use between 8 GB and 16 GB (16 GB used on real world scenarios with 24 GB RAM on server).
  3. Restart the service on all dedicated servers from Central Administration –> Services on the server
  • If you need to run a maintenance window or remove a server from the Cache Cluster (name used to identify all dedicated servers to Distributed Cache service) then you need stop and remove the service as follows:
  1. Stop the service using the following cmdlet
    Stop-SPDistributedCacheServiceInstance –Graceful 
    on the server to be removed or on all dedicated servers (a.k.a. Cache Hosts)
    TIP: If you need Distributed Cache to always be available then leave the service running on one server.
  2. Run the following cmdlet on all the servers except the one left running for availability:
    Remove-SPDistributedCacheServiceInstance
    If all servers have the service stopped then leave one without running this cmdlet, which will be your first server to restart.
  3. When your maintenance is over, go to Central Administration and start Distributed Cache service from Services on Server page, then wait until service is listed as “started.”
  4. Finally go to each Cache Host and run cmdlet:
    Add-SPDistributedCacheServiceInstance
  5. To verify everything is ok, run the following cmdlets from any Cache Host to see if all Cache Hosts are listed and service status is “UP”:
    Use-CacheCluster
    Get-CacheHost
  • Never stop the AppFabric service from the Services applet in Windows or restart servers running AppFabric without gracefully stopping the Distributed Cache service.
  • The Distributed Cache service is based on AppFabric, which is a prerequisite when you install SharePoint 2013.  AppFabric has its own administration via PowerShell and developers can use it to deploy new features, however direct management and development on AppFabric in a SharePoint Farm is not supported.  If you have issues with AppFabric or Distributed Cache then get support from Microsoft, do not use the AppFabric management directly.  If you want to develop new features, use a dedicated AppFabric environment outside the SharePoint Farm.
  • AppFabric has his own updates, so SharePoint Administrators must be aware of those updates and their interaction with SharePoint Farm.  Follow the AppFabric Team Blog to learn more about it.

If you’d like to sleep well before and after your new SharePoint 2013 deployment/migration process, I encourage you to bookmark this article Smile.  I’m also really interested in your experience and comments, so please share your stories with us and help us learn and share more tips about SharePoint – all will be welcomed!


Original content from Vladimir Medina.  Posted by MSPFE editor Pam Lahoud.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Thank you for this Blog!

    Kind regards!