?
Solved

Long response time for the home page

Posted on 2009-12-27
14
Medium Priority
?
876 Views
Last Modified: 2012-05-08
I'm  junior QA engineer in my company, we have a solution for a client that is SharePoint 2007 web portal (internet). 3 web servers, 2 database (active-passive), and one indexing server. The problem that the response time (time for the first byte) for the home page is very long 5-12 seconds. The problem occur for custom CSS as well but in less extent.

We have testing environment (1 application server, 1 database, 1 indexing) and we have the same problem but limited to the main page ASPX file and for 5 seconds. I have made new subsite with default settings and default master page, the response time was great 0.04 second. I have tried to convert the new blank page to be same as the home page gradually by adding web parts and apply the master page, so I have noticed the response time is getting longer and longer.

The problem that during this process the server start to make 2-3 seconds response time for the same page that was making only 0.5 second!!! I have flushed the cache, restart IIS but with the same problem??? the server CPU utilization is less than %10 and the memory usage is normal. As final solution I have restarted the server....and amazingly the response time returned to normal response time about 0.04!!!!

I don't believe that it maybe a full queue because I'm the only one accessing the server, if its the database why its not making this long response for my new subsite? by the way the reset of the page element have very normal response time.
0
Comment
Question by:ebsgroup
  • 6
  • 2
  • 2
  • +2
14 Comments
 
LVL 7

Accepted Solution

by:
tnorcross earned 375 total points
ID: 26128129
It is an ASP.net concept, moreso than a SharePoint.  Depending on how your application pools in IIS are configured, they may reset from time to time.  The first time the site loads on each server after this occurs, the DLLs must compile again, and stay present in memory until the next app pool recycle (or iisreset).  Default app pool settings reset the app pools every X minutes.  I recommend doing two things:

1. Read Joel Oleson's recommendations on application pool settings (http://blogs.msdn.com/joelo/archive/2007/10/29/sharepoint-app-pool-settings.aspx) - to better understand the issue and how to configure your application pools.

2. After you change the config of your app pools in #1, they will only reset once, overnight.  Then you should run a warmup script (via Task Scheduler in Windows) on each front end server to run the first connection automatically.  (more info here: http://blogs.msdn.com/joelo/archive/2006/08/13/697044.aspx) - this should eliminate the need for any user to ever see the ASP.net compilation delay.
0
 

Author Comment

by:ebsgroup
ID: 26128289
So you are suggesting that the application pools in the IIS have some thing wrong in its configuration and it compile the DLLs in each call from the client, am I right? I'm reading the article you suggested and I'll let you know about any progress. But I haven't changed any thing in the configuration its all default.
0
 
LVL 7

Expert Comment

by:tnorcross
ID: 26129343
Correct that the config of IIS app pools, by default, are not optimized for SharePoint.  
0
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 
LVL 12

Expert Comment

by:mccarthybri
ID: 26129552
how long after a reboot does the speed slow down again?
0
 

Author Comment

by:ebsgroup
ID: 26129918
The response return back to 0.040 seconds (first byte), but that is only for my new sharepoint subsite, but the homepage still 5 seconds (first byte) unchanged even when the subsite was fast or when it became slow and even after it return back to be fast.
0
 
LVL 12

Expert Comment

by:mccarthybri
ID: 26129948
is there anything specifically trying to render on that page, that the site is what to open so it can open?  I have seen where one webpart or picture will do that.  we had a portal that did the same thing we ended up seeing the database as the cause, connection to the san seen to be the hangup
0
 
LVL 6

Expert Comment

by:Sushanta Sahu
ID: 26130569
If its the issue only with the home page then check the web part maintainance page and check what all webparts are added to the page. Try closing some webparts starting with complex/user defined ones or have a play arond the web part closings. Then check the response time.
To go to the web part maintainance page you can append ?contents=1 at the end of the default.aspx page.
Let me know how it goes.
Cheers!!!
0
 

Author Comment

by:ebsgroup
ID: 26133915
This problem appears in all the pages of the portal. As I have told you before I have made new subsite and made standared SP page with default template, today I have modified this page to be identical to the homepage (master page, webparts, flash),so it make slow response same as the homepage, I started to remove the web parts one by one (by the way all the web parts are developed from scratch) and as I remove them and test the performance I noticed decrease in the response time till I remove them all and I reach 0.5 second response time which is acceptable.

I have 3 area of concern, 1st is that the web parts are poorly coded and are make a lot of calculation or make huge read/write to the data list or even not using basic features like multi-threading...etc, if this is the case the only solution is to rewrite the code for all the web parts which is impossible in my case, but still this is just a doubt based on nothing. 2nd is that the web parts objects isn't being cached as it must maybe SharePoint configuration, or maybe some code for caching haven't been added to the source code of the web parts. 3rd is that there is some thing wrong in the database, but I really don't know to start from where when trying to catch database problems.

Do you have any input regarding the 3 concerns I have?

Thanks
0
 
LVL 19

Assisted Solution

by:MsShadow
MsShadow earned 750 total points
ID: 26137318
If I read what you are saying then it is like this.

Clean Server reset, standard SharePoint page responds fast.
Clean Server reset, homepage takes 5 seconds or more.
After browsing to the homepage, the standard SharePoint page takes a lot longer to load.

Then there is only one possibility imho, the code on the homepage is starting some processes that keep on running in memory and are affecting the performance of the whole farm. Once you reset the application pool that code stops to run and everything is back to normal.

We had this happen one time, and that was caused by an infinite loop in an event handler that kept calling the update event of an item.
0
 

Author Comment

by:ebsgroup
ID: 26139143
Thanks  MsShadow, but I want to correct you in the 3rd point. The case happened only one time then after the restart it kept appearing but after some hours it went a way!!! but this was only one time, the situation now is the the default page is fast, and the home page is slow. I'm sure its the custom developed web parts, and I have added them to the default page and the response time started to add up as I add more web parts. Now I have only 3 way to go, 1st: check the code quality of the web parts. 2nd: Check the caching of the web parts. 3rd: Check the database connectivity, even I doubt its the database because the default SharePoint page is also access the database but it fine.

I need some help in the 2nd point, can any body suggest what the most important step to check if my web parts is being cached in a good way.
0
 
LVL 19

Assisted Solution

by:MsShadow
MsShadow earned 750 total points
ID: 26139186
You can only check the caching in the code.
This article is pretty good on how you should cach stuff in webparts:
http://www.helloitsliam.com/archive/2008/10/23/caching-data-in-web-parts.aspx

Checking the code quality of the webpart is a good thing as well, would be nice if you would run vstudio performance tooling on it to see how much time each line of code is taking to execute.
0
 
LVL 6

Assisted Solution

by:Sushanta Sahu
Sushanta Sahu earned 375 total points
ID: 26145637
The issue does not seems to be related to the Database performance as other pages & operations arenormal.
The issue could be poor code, which can be improved. But before doing this, I will suggest you to get confirmed.
To test the web parts response time deploy these web parts at your test environment and see if any deviations from the results as of now. Then you can take a call on rewriting/fine tuning the web part code.
You can also try closing the Flash web parts or the most complex web parts.
I don't see any significant improvements in caching tunings.
In general its the customisation on top of the basic sharepoint capabilities which used to cause the latency for specific pages. It can be eliminated by making a balanced combination of number of webparts & expected response time. More the number of web parts more is the loading time.
Let me know how it goes.
0
 

Author Comment

by:ebsgroup
ID: 26148782
Thanks every body, I'll start checking the caching of the web parts since its easier than checking the web parts code. But its really painful if the code was the cause, because we are already using high end server and 3 web fronts with load balancer, thus our client is expect high performance since he invested very well in the hardware and the internet connection, and its not an option to rewrite the code now. I think it a lesson to take the performance in consideration after each line of code.

Thanks every body, I can go on alone from here. every body have help and I don't know to whom I'm going to a ward the point of the question.
0
 

Author Closing Comment

by:ebsgroup
ID: 31670237
The problem is complex to some extent and there is no single true answer.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I used to be SharePoint evangelist in our company, so my Outlook always full of questions about how to do this, or where I can find that. One day I found such an email with the following question: "how to attach 3-State workflow (one of the workflow…
Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question