Thursday, March 24, 2016

Distributed Cache on SharePoint Server 2013



Originally developed as the AppFabric Cache for the “Cloud” (Microsoft Azure), this product has been developed for the On=Premise systems of Microsoft SharePoint 2013 and called the distributed cache.

The distributed cache can be deployed in 2 different ways:

  • Dedicated Mode
  • Co-located Mode
Dedicated Mode: This involves running only this service on a SharePoint Application server and disabling all other services. If this mode is used, it is advisable to have at least two servers for distributed cache for redundancy purposes.
Co-located Mode: The distributed cache runs along with all other service applications on the application server(s). This is the recommended mode for deploying Distributed Cache.

Notes on Memory used by Distributed Cache:

  • By default 10% of the total physical memory is allocated to Distributed Cache.
  • The memory size for the distributed cache on every server that has distributed cache enabled has to be the same size. [Be very aware of this because if the application servers have different sized RAM, this will require adjustment based on the default SharePoint 2013 installation behavior noted in the previous point).
  • 50% of the memory for storage and the other 50% to manage the memory.
  • Adding more memory to the server does not increase the memory that was initially allocated to the server on install and will require adjusting if more memory is required. Remember to do any adjustments on all servers running the distributed cache service.
  • The memory allocated to distributed cache cannot exceed 16GB. Exceeding this size causes issues in the entire farm and is a known Microsoft issue. So if more memory is required, the only option is to add another server and run distributed cache on it. Also remember that if the server has 16GB of total memory to leave at least 2GB for other services in the dedicated mode and a judicious amount for the co-located mode.

Operations on Distributed Cache

Changing memory Allocation:

  1. Stop the service from Central Administration
  2. Using Power shell with the SP add-on : Update-SPDistributedCacheSize –CacheSizeInMB CacheSize
  3. Start the service via Central Admin

Change the service account

There are times when the distributed cache service account needs to be changed. This is easily accomplished in 2 steps.
  1. Create the new account in SharePoint in Central Administration
  2. Using PowerShell, run the following script:
$farm = Get-SPFarm
$cacheService = $farm.Services | where {$_.Name -eq "AppFabricCachingService"}
$accnt = Get-SPManagedAccount -Identity domain_name\user_name
$cacheService.ProcessIdentity.CurrentIdentityType = "SpecificUser"
$cacheService.ProcessIdentity.ManagedAccount = $accnt
$cacheService.ProcessIdentity.Update()
$cacheService.ProcessIdentity.Deploy()

 

Graceful shutdown of the Distributed Cache Service

There are times when a server running in the distributed cache cluster requires maintenance. If the service is shutdown, all the data in the cache is lost. Gracefully shutting the service down ensures that any data in the cache is moved to another cache host in the farm. (A stopped service can be started at any time and has no pre-requisites other than the amount of memory being allocated to the service is the same as other servers in the distributed cache cluster)
At the Powershell prompt: Stop-SPDistributedCacheServiceInstance -Graceful

 

Repair a cache host

The Distributed Cache Service sometimes malfunctions. [Evidence of a malfunctioning distributed cache will appear in the Health Rules or users will notice when Newsfeeds start reporting errors].
Start Powershell with the SharePoint addons.

Get-SPServiceInstance [Note the GUID in the ID property of the server being repaired]
$s = Get-SPServiceInstance GUID
$s.delete()
Add-SPDistributedCacheServiceInstance (to reinstall and start the distributed cache service)


Monitoring Distributed Cache

The distributed cache can be monitored using PerfMon. The SharePoint Distributed Cache Counters are:

Cache Data Transferred Per Sec
Cache Hit Count
Cache Hit Ratio
Cache Miss Count
Cache Read Requests per sec
Cache Write Requests per sec
Total Cache Read Requests
Total Cache Write Requests


If you know of anymore must haves for Distributed Cache please let me know or put them in the comments.

This blog was originally posted in July 2014 on  http://www.bigapplesharepoint.com/pages/View-An-Insight.aspx?BlogID=44

Friday, February 5, 2016

SharePoint 2016 Preview – Installation Overview


Abstract

Microsoft makes installation of application servers as easy as possible and the SharePoint 2016 Preview is no exception. This blog shows the step by step installation of the product.

 

Prerequisites

Hardware requirements are similar to SharePoint 2013. Software requirements are Windows Server 2012 R2 (or Windows Server 2016 Preview) and SQL Server 2014 (or SQL Server 2016). I have used Windows Server 2012 R2 for the SharePoint installation and SharePoint 2012R2 for the database server which is running Microsoft SQL Server 2014. There is one other prerequisite that is required which is not automatically downloaded and that is the Microsoft ODBC Driver 11 for SQL Server which can be downloaded from http://www.microsoft. com/en-us/download/details.aspx?id=3643

 

Installation

Log into the SharePoint server using Setup user account. Mount the SharePoint 2016 Preview iso as a drive.



Choose Install software prerequistes.



Click on the box to accept the License Agreement(s) and click on Next

The Product Preparation tool dialog box opens up.

Click on Next. [Note the third item – Microsoft ODBC Driver 11 for SQL server. The Product preparation tool will fail on this item unless it is downloaded and installed in advance. This should be a non-issue by the RTM version]

Once the tool completes, click on Finish to restart the server.

Login to the server and bring up the installation screen again.

Since all the prerequisites have been installed, select Install SharePoint Server. After a brief wait while the necessary files are gathered,

Enter the product key and click Next. [Note the product key shown is valid for 180 days after installation].

 
Accept the agreement and click on Continue

 
An opportunity is provided to choose file locations. These are the defaults which I accepted. Click Install Now.

The installation starts and a progress bar gives the progress of the installation.

On completion, the following screen pops up

If you are installing multiple servers, uncheck the Run the SharePoint Configuration Wizard now and then click on Close. If not, click on Close.

Click Next on the Configuration Wizard welcome screen.

The default here is to Connect to an existing server farm. Since this is a new install, I have opted for creating a new server farm. Click Next.
Fill in the required Database server name, the Database name (I left the default), the Farm Account credentials go into the Username and Password. [Note: not the setup account]. After preparing the configuration file, here is where things get a little different than previous SharePoint installations. A screen like the one below pops up:
This is an interesting new development. From technet the descriptions:

Server role
Description
Front end
Service applications, services, and components that serve user requests belong on front-end web servers. These servers are optimized for fast performance.
Application
Service applications, services, and components that serve back-end requests, such as background jobs or search crawl requests, belong on Application servers. These servers are optimized for high throughput.
Distributed Cache
Service applications, services, and components that are required for a distributed cache belong on Distributed Cache servers. Optionally, you can configure these servers to also load balance farm traffic using the SharePoint Request Manager.
Search
Service applications, services, and components that are required for search belong on Search servers.
Custom
Custom service applications, services, and components that do not integrate with MinRole belong on Custom servers. The farm administrator has full control over which service instances can run on servers assigned to the Custom role. MinRole will not control which service instances are provisioned on this role.
Single-Server Farm
Service applications, services, and components required for a single-machine farm belong on a Single-Server Farm. A Single-Server Farm is meant for development, testing, and very limited production use. A SharePoint farm with the Single-Server Farm role cannot have more than one SharePoint server in the farm.
The Standalone Install mode is no longer available in SharePoint Server 2016 IT Preview. The Single-Server Farm role replaces the Standalone Install mode available in previous SharePoint Server releases. Unlike Standalone Install, the SharePoint administrator must separately install and prepare Microsoft SQL Server for SharePoint. The SharePoint administrator must also configure the SharePoint farm services and web applications, either manually or by running the Farm Configuration Wizard.

Since I only have one SharePoint Server and one Database server, I chose Single-Server Farm. Click Next.
The SharePoint Products Configuration pops up. I have changed the port for Central Admin to something easy to remember and kept the default NTLM settings. If you are using Negotiate Kerberos, check my blog on how to setup Kerberos and how to check if Kerberos is working.
After the Product configuration completes a success screen pops up. Note that this is a little more information in this screen as it gives the type of authentication used and the role of the server.
Click Finish. The SharePoint Services Configuration window opens.
I just clicked on cancel as I prefer doing the configuration manually and will show that in a subsequent blog. I opened Central Administration and clicked on Servers in the farm

The picture above shows the status of the database server as well as the SharePoint server. So the installation went successfully.
One really interesting new option is Office 365. Clicking on that option brings the following screen
This is interesting and more details will be given in the near future.
Until then….
Please give me feedback and comments.