SharePoint Web Front End Performance Issues
SharePoint utilization ranges from small scale to medium to high end. As the utilization increases, so the resource requirements. However, not in all the cases the only solution is to add more resources. At times it could be due to the application design itself that needs a thorough troubleshooting. Some of the techniques that I usually use and they seem to be very helpful as well will be discussed further.
The problem starts with user’s complaints that the requests are taking more time than expected. This will be the trigger point usually, however with experience you will realize that you should know even before the users do. The easiest way to get notified before users complaint is through Windows Performance Monitor. Performance counter can also be used for profiling purposes. However, in this article I will not be discussing the profiling using performance counters.
Performance Monitor Alert
First thing first, open Windows Performance Monitor and go to Data Collector Sets -> User Defined -> New -> Data Collector Set as shown below:
When the Data collector set window is opened, you can define its properties accordingly. In this example I have shown by adding the ‘% memory available’ option and setting it to 2000MB, an alert will be generated if the remaining memory is less than 2000MB. The alert will make you aware there is high utilization going on the server. This could be implemented on all the front end servers. The configuration example is below. However, more counters could be added to this as per your requirements.
Once the alert is in place, you will get notified on the correct time. In this case, the next step should be to monitor what is causing the problem. So lets look at the processes in task manager. Again this is based on my observations and yours could be different. But hopefully you will happen to see something like this, which clearly shows that the worker processes are using more memory and increasing as well:
You will surely wonder which worker process is the culprit, so lets go to IIS and click on Worker Processes as shown below:
You will see a list of processes that you can sort by memory or processor utilization:
So now you know which process is causing the biggest problem. Even when you click on a process, you can see which action is taking the most, so in this way you are somehow close to see what is causing the big problem. This is shown below:
By this point you should be able to know the area from where the problem is coming. However there could be many reasons for that. I have put some of my observations based on my experience.
There are many observations, however I have listed some of the recent ones I have:
- In one of the cases, I see that one of the WFE was utilization less resources and the other one was utilizing more resources. I tried many different scenarios but nothing work. Then I realized there is a difference in application pool configuration which was manually done by someone. I made the changes so that the app pool configuration is same across WFE servers and at least the utilization was same on all WFE servers. The most important part of configuration I found in application pool is:
- The above settings decides when shut down and start up within the app pool which in turn decides on the resource utilization. It is better to keep all these settings on default, unless you are very sure about these.
Some of the recommendations are:
- Do not place many web applications in one application pool. The advantages are many folds. The resource utilization is distributed in different app pools. You may have different configuration for app pool relevant to your application. Resetting an app pool will only disturb small number of applications only.
- Running web front end through a load balancer, do not reset services instead reset the server itself. In this way, the requests will be forwarded to other available front end and will not just be killed in between.
- Always keep the default settings for application pools and only change if you are very sure about something.
There are some tools which help to identify the performance related issues. One of those is DebugDiag that I have used once too. There will be many others too, however better is to stick to some of the techniques above or windows performance monitor as it provides enough details to resolve issues.