Finetune

Hyperparameters are the variables which determines the network structure(Eg: Number of Hidden Units) and the variables which determine how the network is trained(Eg: Learning Rate).

-->

APPLIES TO: 2013 2016 2019 SharePoint in Microsoft 365

To perform management and operational tasks on the Distributed Cache service in SharePoint Server, an administrator must perform specific, ordered procedures. This article describes how to conduct several management and operational tasks on the Distributed Cache service.

  • Read our customer case studies and discover how Adobe Experience Cloud, Creative Cloud, and Document Cloud help the world's leading brands.
  • You can also display it by right-clicking on the icon and selecting Format options. Click and drag to place it where you want and finetune the precise position with the arrow keys. The options are self-explanatory and will depend on the kind of audio you are using on the slides. Select Automatically to make the audio play with the slide.
  • Simply pick the type of content to finetune the Yoast SEO structured data output. Now, you can tell that your Contact page is a Contact page! Yoast SEO comes with structured data content blocks. Users of the WordPress block editor are lucky as Yoast SEO uses the block functionality to offer our very own blocks.

Important

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. Adding security for AppFabric with SharePoint distributed cache is not supported.

Important

Do not use service account names that contain the symbol $.

Start and stop the Distributed Cache service

An administrator that performs maintenance and operational tasks might need to start and stop the Distributed Cache service. Some of these tasks include the following:

  • Changing the default configuration of the server farm at installation time. The Distributed Cache service is started on all SharePoint servers at installation time. An administrator might want to stop the Distributed Cache service on some servers in the farm.

  • Updating the server and there is only one Distributed Cache server in the SharePoint Server farm.

Stopping the cache results in partial data loss. The Feed Cache depends on the Distributed Cache service. Tags and document activities are saved only to the Feed Cache. Tags and document activities are not persisted to content databases. When the Distributed Cache service is stopped, tags and document activities are lost. When the Distributed Cache service is started, repopulation occurs when the feed cache repopulation timer job runs. One way to maintain the tags and document activities is to use the method described in Perform a graceful shutdown of the Distributed Cache service by using a PowerShell script later in this article. When the graceful shutdown of the Distributed Cache service method is used, all cache data is moved from one server to another server before the Distributed Cache service is stopped.

Note

If your cache hosts are part of a cache cluster, do not start or stop the Distributed Cache service as described here. Instead, see Add or remove a server in a Distributed Cache cluster later in this article.

To start and stop the Distributed Cache service by using Central Administration

  1. In Central Administration, click Application Management.

  2. In Service Applications, click Manage Services on Server.

  3. On the Services on Server page, locate the Distributed Cache service.

  4. If the Distributed Cache service is started and you want to stop the service, under Action, click Stop. If the Distributed Cache service is stopped and you want to start the service, under Action, click Start.

To start the Distributed Cache service by using SharePoint Management Shell

At the SharePoint Management Shell command prompt, run the following command:

To stop the Distributed Cache service by using SharePoint Management Shell

At the SharePoint Management Shell command prompt, run the following command:

Change the memory allocation of the Distributed Cache service

When SharePoint Server is installed, it assigns the Distributed Cache service 10 percent of the total physical memory on the server. The Distributed Cache service uses half of that memory allocation for data storage (also known as cache size), and the other half of that memory allocation is used for memory management overhead. When the cached data grows, the Distributed Cache service uses the entire 10 percent of the allocated memory.

You should increase the memory allocation of the Distributed Cache service in these scenarios:

Hype definition is - a narcotics addict. How to use hype in a sentence. Hyperbole. Hype definition, to stimulate, excite, or agitate (usually followed by up): She was hyped up at the thought of owning her own car. Synonyms of hype (Entry 3 of 5) information released to the media that is designed to gain public attention or support for a person, business, or cause the prelaunch hype for the new cell phone translated into phenomenal sales numbers on release day. A clever marketing strategywhich a product is advertized as the thingeveryone must have, to the point where people begin to feel they need to consume it. Millions of suckersfell for the hypeand bought a Playstation 2 by AYBFebruary 18, 2003.

  • When you add physical memory to the server. The Distributed Cache service does not automatically recalculate the 10% memory allocation, so when you increase the total physical memory on the server, you have to manually increase the Distributed Cache service's memory allocation.

  • 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:

  1. 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.

  2. 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.

Change the memory allocation of the Distributed Cache

Use this procedure to reconfigure the memory allocation of the cache size of the Distributed Cache service.

  1. (Optional) To check the existing memory allocation for the Distributed Cache service on a server, run the following command at the SharePoint Management Shell command prompt:

Where:

  • ComputerName is the computer name of the server that you are running the SharePoint Management Shell cmdlet on.
  1. Stop the Distributed Cache service on all cache hosts. To stop the Distributed Cache service, go to Services on Server in Central Administration, and Stop the Distributed Cache service on all cache hosts in the farm.

  2. To reconfigure the cache size of the Distributed Cache service, run the following command one time only on any cache host at the SharePoint Management Shell command prompt:

Where:

  • CacheSize is the cache size's memory allocation assignment in MB. In the previous example, the cache size was calculated at 7168 MB for a server with 16 GB of total memory.
  1. Restart the Distributed Cache service on all cache hosts. To restart the Distributed Cache service, go to Services on Server in Central Administration, and Start the Distributed Cache service on all cache hosts in the farm.

Add or remove a server in a Distributed Cache cluster

An administrator can add or remove a server to a cache cluster, or might want to remove a server from the cache cluster, perform some operational or maintenance tasks on the server, and then rejoin or add the server to the cache cluster. When removing the server, the Distributed Cache service is stopped, then unregistered from the server. Unregistering the Distributed Cache service means that an administrator will not see the Distributed Cache service listed on the Services on Server page in Central Administration. Similarly, when a server is added, the Distributed Cache service is registered and then is started on the server. Registering the Distributed Cache service means that an administrator will see the Distributed Cache service listed on the Services on Server page in Central Administration.

Use the following procedures to add and remove a server from a cache cluster. These SharePoint Management Shell cmdlets are run on the server being added or removed.

Note

Before performing the following procedures, ensure the firewall allows Inbound ICMP (ICMPv4) traffic through it. For more information, see Firewall configuration considerations.

Add a server to the cache cluster and starting the Distributed Cache service by using SharePoint Management Shell

At the SharePoint Management Shell command prompt, run the following command:

Remove a server from the cache cluster by using SharePoint Management Shell

At the SharePoint Management Shell command prompt, run the following command:

Important

This procedure will stop the cache service and nonpersisted cached data will be lost. If you want to keep the cached data, use the graceful shutdown procedure that is described in the next section.

Perform a graceful shutdown of the Distributed Cache service by using a PowerShell script

In a SharePoint Server farm, a cache cluster exists when one or more cache hosts run the Distributed Cache service. In a SharePoint Server farm, one cache exists, and the cache spans the cache cluster. An administrator may need to move the cached contents to another cache host when applying updates to the server. To prevent data loss associated with moving the cached contents you need to perform a graceful shutdown of the server using the PowerShell script in the following procedure. The graceful shutdown procedure transfers all cached data from the cache host on which the graceful shutdown procedure is being run on to another cache host in the farm. The transfer process takes 15 minutes or more to run depending on how many items exist in the cache.

To perform a graceful shutdown of the Distributed Cache by using a PowerShell script

Use the following PowerShell script to perform a graceful shutdown of the Distributed Cache server in order to move the cached contents to another cache host. Ensure that you specify the correct node to shutdown and change the script as needed to name the correct parameters for your organization.

Note

There is no need to remove the cache host from a cache cluster if you use the PowerShell script in the following procedure to perform a graceful shutdown.

  1. Verify that you meet the following minimum requirements:
  • See Add-SPShellAdmin.

  • You must read about_Execution_Policies.

  1. Copy the following variable declarations, and paste them into a text editor such as Notepad. Set parameter values specific to your organization. Save the file, and name it GracefulShutdown.ps1.

    Note

    You can use a different file name, but you must save the file as an ANSI-encoded text file with the extension .ps1.

Where sp2016App.contoso.com is the computer domain name of Distributed Cache server you use.

  1. Open the SharePoint Management Shell

  2. Change to the directory to which you saved the file.

  3. At the PowerShell command prompt, type the following command:

For additional information about PowerShell scripts and .ps1 files, see Running Windows PowerShell Scripts.

Change the service account

When the server farm is first configured, the server farm account is set as the service account of the AppFabric Caching service. The Distributed Cache service depends on the AppFabric Caching service. To change the service account of the AppFabric Caching service to a managed account:

  1. Create a managed account.

  2. Set the Managed account as the service account on the AppFabric Caching service. At the SharePoint Management Shell command prompt, run the following command:

Where Domain_nameuser_name is the domain name and user name of the SharePoint managed account.

Fine-tune the Distributed Cache service by using a PowerShell script

Finetune

Monitoring

You can monitor performance counters on the Distributed Cache servers to get a better understanding of cache performance issues.Some of the counters that are typically useful to troubleshoot issues include:

  1. %cpu used up by cache service

  2. %time spent in GC by cache service

  3. Total cache misses/sec - A high value here can indicate your application performance might suffer because it is not able to fetch data from cache. Possible causes for this include eviction and/or expiryof items from cache.

  4. Total object count - Gives an idea of how many items are in the cache. A big drop in object count could mean eviction or expiry is taking place.

  5. Total client reqs/sec - This counter is useful in giving an idea of how much load is being generated on the cache servers from the application. A low value here usually means some sort of a bottleneckoutside of the cache server (perhaps in the application or network) and hence very little load is being placed on cache servers.

  6. Total Evicted Objects - If cache servers are constantly evicting items to make room for newer objects in cache, it is usually a good indication that you will need more memory on the cache servers to holdthe dataset for your application.

  7. Total failure exceptions/sec and Total Retry exceptions/sec

Www.finetunegolf.com

The Distributed Cache service setting for MaxConnectionsToServer is often tuned based on the number of CPUs that are used in the host computer. If, for instance you use multiple cores and then set the MaxConnectionsToServer setting to the same number of CPUs then the computer often uses too much memory and freezes. Similar issues happen when tuning the DistributedLogonTokenCache and DistributedViewStateCache settings. The default setting is 20ms but often exceptions are found when the token caching doesn't happen in the 20ms setting. Use the following PowerShell scripts to change the settings for max connections and timeouts in SharePoint Server 2016 and SharePoint Server 2013.

To fine-tune the Distributed Cache service by using a PowerShell script

  1. Verify that you meet the following minimum requirements:
  • See Add-SPShellAdmin.

  • You need to read about_Execution_Policies.

  1. Copy the following variable declarations, and paste them into a text editor such as Notepad. Set parameter values specific to your organization. Save the file, and name it MaxConnections.ps1.

    Note

    You can use a different file name, but you must save the file as an ANSI-encoded text file with the extension .ps1.

SharePoint Server 2019 PowerShell script

SharePoint Server 2016 PowerShell script

SharePoint Server 2013 PowerShell script

  1. Open the SharePoint Management Shell

  2. Change to the directory to which you saved the file.

  3. At the PowerShell command prompt, type the following command:

For more information, see Application Configuration Settings (Windows Server AppFabric Caching). For additional information about Windows PowerShell scripts and .ps1 files, see Running Windows PowerShell Scripts.

Repair a cache host

During installation, configuration, or maintenance activities, the Distributed Cache service might enter a non-functioning state. Evidence of a malfunctioning Distributed Cache service will appear in Health Rules in Central Administration, or when users use features in SharePoint Server that rely on the Distributed Cache. For example, the Newsfeed on a user's My Site will start reporting errors. Also, administrators might receive the error message 'cacheHostInfo is null ' when they run SharePoint Management Shell cmdlets to manage the Distributed Cache service.

There are two steps to repair a cache host.

Finetune Music

On the non-functioning Distributed Cache host, use the following procedures to restore the Distributed Cache host.

Wittner Finetune Pegs

  1. At the SharePoint Management Shell command prompt, run the Remove-SPDistributedCacheServiceInstance cmdlet.

  2. At the SharePoint Management Shell command prompt, run the Add-SPDistributedCacheServiceInstance cmdlet.

    Note

    If step 1 fails, manually remove the Distributed Cache service, use the following steps.

Finely Tuned Machine Meaning

  • At the SharePoint Management Shell command prompt, type the following syntax.

Finetune Gpt 2

  • After the Distributed Cache Service has been manually deleted, run step 2 again.

See also

Concepts