SharePoint 2013: Performance Issues with Search Service Application on a Development VM
It sound perfect to have a SharePoint Server 2013 with FAST; but if you’re on a development environment with limited hardware resources, the chance exists that you’re Virtual Machine can become too slow or even worst it will not respond anymore and the only way is reboot your server when incurring a full workload of Search.
http://gokanx.files.wordpress.com/2013/10/search.png?w=600
I have a SharePoint Farm installed on my laptop and only 2 Service Applications has been configured:
- Search Service Application
- Managed Metadata Service Application
Nobody is using or connected to the SharePoint Farm but the RAM has almost reached the Maximum
http://gokanx.files.wordpress.com/2013/10/az.png?w=600
As you can see “Noderunner.exe” (Microsoft SharePoint Search Component) is itself consuming a lot of memory and the same Process is running multiple times (one per Search component). Noderunner.exe is the new executable of search service on SharePoint 2013. This process can’t turn it off because Search is one of essential service application in SharePoint 2013, and it is integrated in many features.
http://gokanx.files.wordpress.com/2013/10/vaaaaa.png?w=600
Test: Warrior Way
Let’s kill manually these services and see if my SharePoint site is still answering. Select your process and hit “End Process Tree”. This will kill the Process and all children that are attached to him.
http://gokanx.files.wordpress.com/2013/10/va2.png?w=600
As I’m on my Development machine I’m doing the same operation on all the Processes.
http://gokanx.files.wordpress.com/2013/10/va3.png?w=600
And Strike! Everything related to the Search (Content Search, Web Part …) is broken. I can browse to my Website but can’t execute anything related to the Search Service Application. As you can see this isn’t the best approach to gain performance.
PS: I’m using the Search Service to make a rollup of all my sites in a site collection; please check: http://gokanx.wordpress.com/2013/08/03/sharepoint-2013-cumulative-des-sites-grace-a-la-recherche-et-content-search/
http://gokanx.files.wordpress.com/2013/10/va4.png?w=1200&h=294
Test: Official way
On SharePoint 2010, an administrator could configure the Search Service Performance Level with PowerShell - in SharePoint 2013, this same cmdlet still exists, but it ONLY impacts the Crawl Component. Specifically, this sets the number of threads that the Crawl Component can allocate per host URL being crawled (in other words, this will have no impact on the Content Processing Component, Analytics Processing Component, or Index Component, the typically resource intensive components).
Powershell Cmdlet:
Get-SPEnterpriseSearchService | Set-SPEnterpriseSearchService –PerformanceLevel “PartlyReduced”
Performance Level Explained:
- Reduced: Total number of threads = number of processors, Max Threads/host = number of processors
- PartlyReduced: Total number of threads = 4 times the number of processors , Max Threads/host = 16 times the number of processors
- Maximum: Total number of threads = 4 times the number of processors , Max Threads/host = 16 times the number of processors (threads are created at HIGH priority)
And in fact on SharePoint 2013 it’s the same scenario. After searching a while I found on TechNet this article: http://technet.microsoft.com/en-us/library/ff608126.aspx who actually confirms my theory.
http://gokanx.files.wordpress.com/2013/10/va5.png?w=1200&h=346
Open Powershell with a Domain Account who has Farm Administrator Rights and hit Get-SPEnterpriseSearchService and as imagined the PerformanceLevel is set up to Maximum.
http://gokanx.files.wordpress.com/2013/10/va6.png?w=1200&h=596
To change this to reduced or partly reduced hit Set-SPEnterpriseSearchService -PerformanceLevel Reduced and restart the SharePoint Search if your Virtual machine is still answering. After this manipulation your SharePoint Server will be able to breathe and you can continue to work.
Test: Unsupported way
You can also say that you want to have the Maximum Performance Level and refuse to change it to reduced.
There is a Config file for NodeRunner.exe’s configuration file that can limit RAM usage of a single process to specific value in megabytes.You can find it under :
C:\Program Files\Microsoft Office Servers\15.0\Search\Runtime\1.0\noderunner.exe.config.
http://gokanx.files.wordpress.com/2013/10/va7.png?w=600
The configuration setting is called memoryLimitMegabytes and the default value is 0 (I guess unlimited). You can hit the value you want, save the file and restart your Search Service.
http://gokanx.files.wordpress.com/2013/10/va8.png?w=1200&h=526
Nb: If you use this method to control the NodeRunner process and then wish to change your topology it is likely to fail. If that occurs, remove the limit in the config file, restart the service and then modify your topology. For more info see this blog post regarding the issue.