SharePoint Web front end server high CPU



  • I was working on a SharePoint farm that had some serious performance issues; even a new site collection creation does not work via central admin, using powershell it takes around 45 minutes! So i checked the servers and found that one of the web front end servers cpu usage was 99-100% most of the times. Checked task manager to see what service is taking up the CPU and found that there are several NodeRunner.exe processes consuming lots of Memory and CPU. The culprit processes are Microsoft SharePoint Search component. So when something was getting deployed and when it tries to work on the second web front end, since the CPU usage is high it takes forever to complete the process.

    After some digging, i finally found the fix.

    From Sharepoint shell, run as admin:

    Get-SPEnterpriseSearchService
    

    This will list down the current performance level of the SharePoint Server Search component. There are three possible values for this; maximum, partially reduced and reduced.

    The different levels mean:

    Reduced: Total number of threads = number of processors.

    Partly Reduced: Total number of threads = 4 times the number of processors.

    Maximum: Total number of threads = 16 times the number of processors.

    Mine was set to partially reduced and i set that to reduced mode using the below command

    Set-SPEnterpriseSearchService -PerformanceLevel Reduced
    

    Along with that, I also changed the memory limit settings from C:\Program Files\Microsoft Office Servers\15.0\Search\Runtime\1.0\noderunner.exe.config changed the value of <nodeRunnerSettings memoryLimitMegabytes=”0″ />

    The initial value is set to “0”, which means that there is no limit, and i set it to 1GB instead.

    <nodeRunnerSettings memoryLimitMegabytes="1024″ />
    

    And restarted the servers. Now the servers CPU usage is very low, the sites are faster and deployment via powershell is also faster. I just want to fix the new site collection creation issue via central admin as well. The fix for that was to make some changes on IIS.

    From IIS- Application Pools-SharePoint Central Administration V4- Right Click-Advance Settings and change the below values for 90 to 400

    Ping Maximum Response Time
    Shutdown Time Limit
    Startup Time Limit
    

    Restarted both servers one by one and tested a new web app creation, from failure to this time it got created in around 8 minutes!