Running SharePoint 2013 search within a limited RAM footprint

Running SharePoint 2013 search with limited RAM

SharePoint 2013 search is very powerful, however if you have limited server resources, it can easily get the better of your environment.  I’ve seen a small SharePoint 2013 environment go unstable, with w3p processes crashing, ULS logs filling with low RAM errors, and search index going into “Degraded” mode during a crawl, and end-user search attempts returning correlation errors, and even sites and Central Admin returning 500 errors; all for wont of a few more GB of RAM.  An IIS Reset gets the server responsive again, and an index reset will get SharePoint crawling again, but outside of tossing in precious RAM chips, what’s a caring administrator to do?  Let’s first see how to determine whether your search index is degraded:

Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchStatus
Name State Description
---- ----- -----------
IndexComponent1 Degraded
Cell:IndexComponent1-SPb5b3474c2cdcI.0.0 Degraded
Partition:0 Degraded
AdminComponent1 Active
QueryProcessingComponent1 Active
ContentProcessingComponent1 Active
AnalyticsProcessingComponent1 Active
CrawlComponent0 Active

In the example above, note the Index component is degraded.  In Central Admin, simply do an Index Reset to get things back on foot, and restart the World Web Publishing to kick-start IIS and its app pools.  In the  command below, we’ll lower the priority of Search, so it doesn’t blow up our underresourced farm:

set-SPEnterpriseSearchService -PerformanceLevel Reduced

Next, let’s limit the RAM utilized by the NodeRunners; these are the processes that handle search crawling.  You can find this on C: or perhaps a different drive letter on your system:

C:Program FilesMicrosoft Office Servers15.0SearchRuntime1.0

Open text file (notepad is fine, especially if your farm is wheezing from being RAM challenged, here’ the XML file: file noderunner.exe.CONFIG
Change value from 0 to 180. Note I would not run with less than 180MB per nodeRunner, as I’ve seen search components fail to start as a result.

<nodeRunnerSettings memoryLimitMegabytes="180" />

Try another crawl, with a more RAM stable experience.

Here’s how to tell where your index is located on disk:

$ssi = Get-SPEnterpriseSearchServiceInstance

Here’s how to get the topology and the Index component:

$ssa = Get-SPEnterpriseSearchServiceApplication
$active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active
$iComponent = $active | Get-SPEnterpriseSearchComponent IndexComponent1
1 reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *