Optimizing SharePoint 2013 Server Performance - Development Server (single server)
There were couple of new services
introduced with SharePoint 2013 and raised the hardware resource requirements.
Let’s only talk about those process and steps to control the resource
consumption when it comes to a single server SharePoint 2013 installation.
- · NodeRunner service
- · Distributed Cache Service
- · Count of Web Application
NodeRunner
service
- Use Set-SPEnterpriseSearchService
-PerformanceLevel Reduced to reduce the CPU impact the search service has on
your test environment.
- Modify
the C:\Program Files\Microsoft Office
Servers\15.0\Search\Runtime\1.0\noderunner.exe.config so that it can only
consume X amount of RAM.
Change the value at <nodeRunnerSettings memoryLimitMegabytes="0" /> to any amount of RAM you like to contain the memory leak. May be 250 MB per instance of this service.
Even
with this 250 MB limit I experienced some NodeRunner crashes. The general advice
is to NOT change the NodeRunner memory limit configuration less than 250 MB. And
NEVER EVER do this in a production environment!
Some
of the pain points by the above modifications:
· Changing this
configuration file is not supported. For test/dev deployments it may have a
desired effect on memory usage if you are running with less memory than the
recommended minimum.
· This means it may
reduce the initial allocation of memory, but if the application requires more
memory than this limit, it will crash. Hence, do not make such a change on a
production deployment.
· You may see errors
like: Unable to connect to system client with derived management URIs.
Exception: Failed to connect to system manager.
Microsoft.Office.Server.Search.Administration.Topology.ApplicationAdminLayer.Reconnect()
c80fcf9b-cf6b-2083-a27f-5d57c7dc4ef3. Deeper analysis of the ULS logs shows
that the DBConnector created by the NodeRunner process threw an OutofMemory
exception. Removing the Noderunner.Exe.Config memory restriction and rebooting
the server allowed me to submit the topology change.
·
Distributed
Cache Service
A
new caching service is added in SharePoint 2013 called 'Distributed Cache
Service' which is built based on Windows Server AppFabric Distributed Cache.
Many features rely on this service to store data for fast retrieval when needed.
This is used by services/features like Authentication Token Cache, Micro
Blogging features, My Site Social Feeds etc.,
How
to stop this service
This
service can be managed from the 'Services on Server' page in the central admin.
It can be started/stopped from here.
Allocate
Less Memory
By
default when SharePoint 2013 preview is installed, Distributed Cache Service's
memory allocation is set to 10 percent of the total physical memory allocation.
Using the below PowerShell cmdlets we can change the memory allocation for this
service.
$instanceName
="SPDistributedCacheService Name=AppFabricCachingService"
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Unprovision()
Set-CacheHostConfig -Hostname <HostName> -cacheport 22233 -cachesize <Size in MB>
$serviceInstance.Provision()
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Unprovision()
Set-CacheHostConfig -Hostname <HostName> -cacheport 22233 -cachesize <Size in MB>
$serviceInstance.Provision()
The
above cmdlets stops the Caching Service, and sets the memory allocation to the
specified number of megabytes (MB), and then starts the Caching service.
Web
Applications
As
the number of web applications grow in these single server SharePoint
Development server, the number of Application Pools grow (this is
not true if we use the same application pool to create multiple web
applications), but however, if we donot pay attention while creating new web
application we end up creating new application pool as well. These application
pools runs in their own memory space, which in terms consuming more memory or
RAM. Each App Pool runs with a service called w3wp.exe. As these SharePoint
development servers also runs visual studio and sql server on the same box we
need to keep in mind on the amount of memory accessible to each application and
service.
It
was my attempt to throw some light on how we can restrict memory usage by these
services and still have a server running optimally even with 6-8 GB of RAM.
Comments
Post a Comment