Today in current article will try to explain & correct the issue encountered with Distributed Cache Service. Sometime it happen that Distributed Cache service stuck in starting/Stopping mode in services on server page on SharePoint. If you open Manage Services on farm page in SharePoint 2016 , DS service can show Provisioning.

"It can be due to the issue of DS service on any of the server it is configured"

I will not go in detail of configuration as it is same for 2013 & 2016 and can be seen in previous article. So the question of day is "How to bring it back to Healthy state?"

So if the service is showing starting/stopping on any of configured server in CA page you can get status here:

So if the the service is showing stopped on any of the running server, then it need to be corrected:"But before trying remove command" understand that there would surely be a job associated which need to be cleared first. else you will get the below error:

So get the details of job: name of the job instance you can get from above error or you can get id from the server id status

Once it is cleared you need to add the service back on same server again as the same when in healthy state, use the below command without mentioning server name as it will start on the server as per cache cluster itself.On SP Management shell execute the command: Add-SPDistributedCacheServiceInstance

Run the services instance command again and you will see the services is added back with status "Online" and the new "32 bit id will be associated":

In this current article will try to see with the planning and configuration of the DCS.

Planning & Capacity analysis of Distributed Cache Service:

At the time of SharePoint Installation , Distributed Cache service is by default assigned 10% of the total physical memory on the server. Distributed Cache service uses half (5% of total physical memory) of that memory allocation for data storage i.e. Cache Size, and the other half of that memory allocation is used for memory management overhead. When the cached data grows, Distributed Cache service uses the entire 10% of the allocated memory.

Cases in which Distributed Cache service memory allocation should be increased:

When physical memory is added to the server. Distributed Cache service will not recalculate the 10% memory allocation automatically, so Distributed Cache Services memory allocation have to be increased manually in case of increase in total physical memory on the server.

Example to calculate memory assigned to Distributed Cache service when Server has a collocated Distributed Cache server.

1. Determine the total physical memory on the server. For this example, we have 160 GB as the total physical memory available on the server.

2. 10% of the total physical memory is 16 GB .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.

3. Take half of the remaining memory, and convert it to MB. For example, 14 GB/2 = 7 GB or 7168 MB. This is the cache size of the Distributed Cache service.

4. Use the following procedure to update the memory allocation accordingly.

For dedicated Distributed Cache service below method can be used to determine the cache size:

Configuring Distributed Cache

Collocated Mode: In normal or default circumstances distributed cache runs in a collocated mode and it require no extra configuration.

1) Installation of all pre-requisites of SharePoint 2013 are complete.

Dedicated mode or hybrid mode: If you need a separate cache cluster, or a set up in which some computer act as a Cache host i.e Hybrid , distributed cache can be set up using powershell command , or you can run PSConfig.exe with the /skipRegisterAsDistributedCachehost flag on all servers that are not cache hosts.

1) Installation of all pre-requisites of SharePoint 2013 are complete.
2) Install SharePoint Server 2013
3) Distributed Cache is not required on all servers in the farm
4) Use psconfig.exe or PowerShell cmdlets to configure SharePoint and use command with the /skipRegisterAsDistributedCachehost parameter on all servers that are not cache hosts.
and
5) Use psconfig.exe or PowerShell cmdlets to configure SharePoint and use command without the /skipRegisterAsDistributedCachehost parameter on all servers that are cache hosts.

Changing a Non-Cache Host To a Cache-Host

At a later point of time in a farm if you need to change non cache host to cache host use the below command:

During installation, configuration, or maintenance activities, the Distributed Cache service may enter a non-functioning state. Report of issue in Distributed Cache service will appear in Health Rules in Central Administration or when users use features in SharePoint Server 2013 that rely on the Distributed Cache. Use the below command to restore to functioning state :

1)Run Get-SPServiceInstance to list all services for all servers in the server farm
Note the GUID from the ID property of the Distributed Cache service on the server you are repairing
2) Run the PowerShell code below$service = get-spserviceinstance GUID$service.delete()
where GUID is the GUID of the Distributed Cache service running on the server which has to be repaired.
3) Run Add-SPDistributedCacheServiceInstance to reinstall and start the Distributed Cache service on the cache host you are repairing.

Update a Cache Host Size

Whenever you want to increase the memory allocation of the Cache Host above the default requirement :

1) Stop the Distributed Cache service on all cache hosts on Central administration in Services on Server page.
2) Run the Update-SPDistributedCacheSize -CacheSizeInMB <CacheSize> cmdlet on any cache host
3) Restart the Distributed Cache service on all cache hosts on Central administration in Services on Server page.

Graceful Shutdown a Cache Server

There is only one copy of any item in the cache, So it is very important to carefully add and remove servers from the Distributed Cache cluster. The “graceful shut down” of a Cache Server in a Cache Cluster transfers any cache data to another Cache Server in the Cache Cluster from the server being removed.

To modify , repair or remove stop the distributed cache service gracefully.Stop-SPDistributedCacheServiceInstance –Graceful

Major expectation raised by user for SharePoint other then Search ,is to have Good User Experience and Faster in it operation.

In Order to improve SharePoint User experience, Microsoft added a new feature called Distributed Cache service, it cache frequently requested information and made it available quickly to all the servers(Web Front end) in the farm. Distributed Cache can be used for quick data retrieval. It stores data in memory and does not have a dependency on databases in SharePoint Server 2013.

It is mainly used to facilitate Search and the new social features in SharePoint 2013, as both of these require fast access to vast amounts of information.

Fast retrieval from the in-memory caching of Distributed Cache Service will lowering the load on SQL Server. It is a feature that will be used mainly by large SharePoint farms. . If you plan to use activity feeds, Distributed Cache service must be enabled on the Sharepoint Farm. This cache temporarily stores the microblog entries to make it immediately available to others in the environment.

Distributed Cache Service in SharePoint is the extension of Windows App Fabric which is a pre requisite in SharePoint 2013.

Benefit: Distributed Cache service holds context- and application specific information in memory, it eliminates the need to set the “sticky session” (or server affinity) on the network load balancer for SharePoint farms that have many SharePoint web Servers.

Why the need of sticky session is required in SharePoint 2010?

Distributed Cache Service cache login tokens . It is a big improvement over SharePoint 2010, which stored the login token on each Web front end server in the farm. “In SharePoint 2010, users who are redirected to a different load-balanced WFE often need to re authenticate when using SAML or FBA authentication if load balancer affinity, also called sticky sessions, is not enabled. Therefore, sticky sessions are no longer required with SharePoint 2013.”

Some of the features that use the Distributed Cache service:
➤ All social features
➤ Collaboration features
➤ Authentication
➤ OneNote client access
➤ Security trimming
➤ Page load performance

Note: Distributed Cache does not replace other “caches” within SharePoint, such as BLOB cache and Output cache as they are required specific to their need.

Server that is running the Distributed Cache service is called cache hosts. When one or more servers of the SharePoint farm runs the Distributed Cache service it create a Cache Cluster . The total cache size for the server farm is the sum of the memory allocated to the Distributed Cache service on each cache host. There is only ever one copy of an item in the cache. Data is not duplicated or copied on other cache hosts in the cache cluster. Therefore cache cluster cannot be configured for High Availability.

Distributed Cache service can be deployed in two modes:
1) Dedicated mode
2) Collocated mode.

In dedicated mode, No other service runs on SharePoint Services on Server other than Distributed Cache service . In collocated mode, Distributed Cache service runs along with other services on SharePoint server. It is always recommended to deploy Distributed Cache service in Dedicated mode.

Distributed Cache service is a memory intensive service. It is not recommended to run following services on same server running Distributed Cache service.: Search Services, Project Server service, SQL Server, Excel Services.

If a server running Distributed Cache Service (cache host) & the server utilization reaches 95%, DCS will start throttle itself and will no longer accept new read or write requests until the utilization falls below 70%. It doesn’t mean that user will not get their data, it means SharePoint will then request the information from the SQL server.

I will try to explain planning and Configuration of Distributed Cache service in my next article..

What I received is “If we are using index partition and replica, then why we are not creating Search service application in Partitioned Mode” . and shared me with a link of some other blog.

So what is the in and out of that is:

There might that readers relate Index partition with Search Service application in Partitioned mode.

It also might be possible that some experts combined and created Search Application in partitioned mode and Index partition in single Blog.

None of the above possibilities is wrong nor the experts blogs. But to clear the things is the main aim of this post.

So what is this Partitioned mode, Let’s understand with 2 examples:

Suppose we have Search service application and metadata service application . If other division want separate metadata and search service, we create the same. But what to be done , If every other department want it separate service. In that case we will Create “Partitioned Service Application” . Which help us to create data separate in spite of using single service application and same database.

Secondly if we are using Hosted SharePoint or SharePoint Online and we want separate search for every Tenant based on Site Subscription. In that case also we will create a Partitioned Service application.

This is what referred as Multi Tenancy in SharePoint.

Example of Creating a search application in partitioned mode. It just needed to add a switch (Partitioned) using PowerShell

Note: Although Non-Partitioned service application can be created using CA or PowerShell. But Partitioned service application can be created only with PowerShell.

Now what is Index Partition and Replica

Index Architecture(component) is divided into Index Partition and Index Replica. Index can be divided into index partition or called as discrete portion which is stored in disk. It enable scaling in two ways:

Index partition are added to handle the Crawl load or Crawl Volume. It can be created based on your crawl volume of data.

Index Replica are added to handle the Query load or volume. So if you are getting large query load you can create replica accordingly.

Hope, I am able to explain the difference between Index Partition and creating service application in Partitioned mode.

As described earlier, Microsoft is focusing more and more on Power Shell and this is what is done with Search in SharePoint 2013. Graphical interface in SharePoint Search application is not available. We cannot create and edit topology from Central administration. Only option is to use Power Shell.

We already have Search service Application, Proxy and Search and index component created in earlier post. To configure in scale out mode:

We just need to modify existing topology by making a clone. Or

Create a new topology with all components again.

There is no need to create Search service application and proxy again. As earlier was standalone I would prefer to create new topology.

But in production or already scale out mode it is preferred to modify the existing topology by making a clone of it. As we have to take care of:

Index component addition and removal, keeping in mind of search.

Removal and addition of Replica accordingly.

For current scenario:

We are using 4 servers which are holding(Admin, Crawl, Content, Analytics, Query & Index) in Redundant basis.

As per Microsoft Guidelines:
Content Processing and Analytics processing should be together.
Administration and crawl should be together.
Index and query processing should be together.

The WordPress.com stats helper monkeys prepared a 2014 annual report for this blog.

Here’s an excerpt:

The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 19,000 times in 2014. If it were a concert at Sydney Opera House, it would take about 7 sold-out performances for that many people to see it.