Showing posts with label SharePoint 2013. Show all posts
Showing posts with label SharePoint 2013. Show all posts

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 15, 2013

SharePoint Server 2013 – User Profile Service Application - 2


This is the second (and last) article in this series. The previous article showed Step 1 of the three step process on how to set up the User Profile Service Application. This article will continue with Step 2 – Testing that the MySite Host has been setup correctly and Step 3 – Configure the User Profile Syndication Service to connect to Active Directory and synchronize  user account information into user profiles of the User Profile Service Application. This will complete the setting up of the User Profile Service Application.
Step 2: Testing MySites Host and creating a MySite for the Administrator.
1. Ensure that you are logged into your SharePoint farm with the administrator account, open and internet browser and navigate to the intranet site at http://intranet.ferris.local
2. Look on the top right hand corner and locate the links
  1. Newsfeed
  2. SkyDrive
  3. Sites
image
3. Click on the Sites link. This link is designed to navigate a user to their MySites page. If the MySite for the user has not yet been created, SharePoint responds by creating a new MySite on demand. Since the MySite for the administrator has not yet been created. Click on the OK button to continue. After the MySite has been provisioned, the following screen pops up
image

4. This shows that the MySites Host is working. You could go ahead and edit the profile. Note the message that pops up letting you know that the information has been saved and it may take time to show up.
image
5. After a couple of minutes, refreshing the screen will show the profile.
image
 
Step 3: Configuring the User Profile Syndication Service
  1. Login to the server as the Administrator and press the F8 key to bring up the Start Menu. Click on the Active Directory Users and Groups tile.
image
2. Add the SP Farm Account to the Administrators Group. If you do not contain AD, request the Administrator to do this for you. You may have to assure the Administrator that you are doing a one way transfer of data only and will not modify AD in any way.
image 
3. Check and see that the account appears as a member of the Administrator’s group. Click OK.
image
4. Login to the SharePoint server as Administrator, open Central Admin. In the System Settings section, click on Manage Service on Server link to navigate to the Services on Server page. Locate the User Profile Synchronization Service. Note that it displays a Status of Stopped.
image
5. Click the Start link to start the User Profile Synchronization Service. SharePoint displays the following page with the farm account already populated. Add the password and click OK.
image
6. You will be returned to the Services on Server page and you will notice that the User Profile Synchronization Service shows a status of Starting.
image
It is very important to wait until the service starts before proceeding. This takes a very long time to start – about 10 minutes or more.
image
7. Go to the User Profile Service Application Management page. [Aplication Management –> Manage Service Applications –> User Profile Service Application. and click on the service.
Notice on the top right hand that the number of profiles is 1. This is the one created by the administrator when the Administrator MySite was created.
Click on Configure Synchronization Connections.
image
8.    A new connection has to be setup. Click in Create a new Connection.
image 















9. Give the connection a name, select the type as Active Directory, specify a domain controlled (this is quicker that using the default of auto discovering a domain controller), put in the forest name, account credentials and scroll further down the page
image
10.  Click on Populate Containers and after a short while the AD Forest will appear. Clicking on the + sign will expand the forest. Click on the tree that contains your users. (You need only the users).
image
11. Click on OK and the connection will be created as shown below.
image
12. Go back to the User Profile Service Application management page. [Application Management –> Manage Service Applications –> User Profile Service Application] and select Start Profile Synchronization
image
13. Select “Start Full Synchronization and click OK
image
14. The management page appears with the status changed to Synchronizing
image
15. When synchronization is complete, the status returns to idle and the number of profiles will reflect the number of users in Active Directory.
   image
This concludes the successful setup of the User Profile Service Application. Remember to have the Farm Administration account removed from the administrator’s group in AD.

-x-x-x-x



Thursday, February 7, 2013

SharePoint Server 2013 - User Profile Service Application - 1

 The User Profile Service Application (UPSA) in SharePoint Server 2013 carries on unchanged from SharePoint Server 2010. This has been one of the real pain points in SharePoint administration, specially the user synchronization setup.. The secret to implementing this application is proper sequencing of events. I will provide a 3 step walk through that will enable you to successfully set this up and get it working at the first attempt every time. (This will work for SharePoint Server 2010 as well).

After installing SharePoint server the administrator is given a choice of using a wizard to configure the service applications. If you use the wizard, uncheck the UPSA and also the Search before proceeding with the wizard. I will provide the methodology of setting up search in a future blog.  Even though more time is required, I personally configure all service applications manually because (a) the wizard puts all the service applications into the wrong application pool and (b) a long string of numbers is appended to all the databases in SQL server and I like to give short descriptive names which makes it easy when doing SQL server maintenance tasks.

An assumption is made that you have already created an intranet site.  

Step 1: Create the User Profile Service Application.  The first requirement is configuring SharePoint to create and host My Sites which will require a new Web Application that is configured for Self Service Site Creation and has a My Site Host site collection.

1. Ensure that you are logged onto a SharePoint server with an administrative account and open Central Administration.

2. Select Application Management -> Manage Web Applications image
3. Click on the New button in the ribbon to display the Create New Web Application dialog image
4. In the IIS Web Site section in the Create New Web Application Dialog, select the radio button option for Create a new IIS web site and fill in the Name, Port and Host Header. (Information shown is for illustrative purposes. Please your own/your company information) image   5. Scroll down to the Public URL section and edit the URL to remove the port number from the end so the URL reads http://mysites.ferris.local. Scroll further down to the Application Pool section, select the button to use an existing application pool and choose Sharepoint – 80, add the SQL server and database name, accept all other defaults and click OK. image
6. The process to create the new web application will take a few minutes and at the end a dialog box will pop up displaying Application Created and will ask to create a site collection. Click on the Create Site Collection link. image

 7. Create the My Site Host site collection. On the Create Site Collection page fill in the Title, URL, Template Selection and the Primary Site Collection Administrator   image
When the site has been created, the Top-Level Site Successfully Created dialog box pops up. There is a link to the new site collection which is inoperable at this time. Click OK to close image 
The new site My Sites – 80 is in the list of web applications. image

 8. Update the new web application to host My Sites.  a. Select the My Sites – 80 application, click on the Managed Paths button in the ribbon image


b. Remove the sites managed path and add the two new managed paths as shown below
image


c. With the My Sites – 80 highlighted click on the Self-Service Site Creation button
image


d. On the Self-Service Site Creation Management dialog box click on the On Radio button to enable the option to create Site Collections and then scroll to the bottom of the dialog box and click OK.

image

The next step is to create an instance of the User Profile Service Application and use the My Site Host to configure the service application.

9. From the home page of Central Administration click Manage Service Applications
image


10. In the Service Applications page select the New button and choose User Profile Service Application
image


11. In the dialog box that opens, type in the name of the application, use the existing application pool of SharePoint Web Services Default, scroll down and add a URL to the My Site Host URL box, accept the other default settings and click OK to create the new service application. Note that it will take several minutes to create the new service application.
image


12. When the application is successfully created, SharePoint will display the following dialog box.
image

Click OK to close the dialog box.

You have now created and properly configured the user profile service to manage user profiles and create mysites on demand.

Next Steps:
SharePoint Server 2013 - User Profile Service Application - 2
This article will complete setting up User Profile Services in SharePoint 2013