8

I run a social community site for card players. I currently have 7,000+ members and getting 2,000 visitors/15k+ pageviews a day. Recently the site has started to really slow down during peak hours of the day and I am starting to think my site needs some serious performance optimizations in the code and settings. I really don't want to purchase a second server to run the site as I am pretty sure my current server should be able to handle this kind of load easily.

During peak hours, when the pages load, they still load very quickly. The problem is that a lot of times it will timeout and give a "website not available" error in the browser. Then you refresh it and it loads up quickly. Then a couple of pageviews later it will do it again. My CPU and RAM usage do not even get very high during these times, so I must believe it is in my IIS settings or something. I have done some searching and cannot find any good answers or ideas of what a fix could be.

Here are some stats of my setup:

  • ASP.NET MVC 2 w/ Output Caching and Partial View caching
  • IIS 7
  • Windows Web Server 2008 RC2 64-Bit
  • AMD Athlon II X2
  • 4GB of RAM

My heavier pages on the site have quite a bit of database reads and a lot of image requests. I am not sure if this is the problem, because when a page does load it is VERY fast.

I did purchase a new server I am building and was thinking about switching everything to this instead. The new server I just got is gonna run an Intel Xeon X3430 2.4GHz Quad-Core w/ HT and 8GB RAM.

I am looking for a few possible things I could look into for this problem and if there are any possible solutions or settings I could implement to stop the "website not available" messages and also help my server handle future traffic increases as the site grows. Would upgrading the server to this new one make the difference?

5
  • Maybe when it times out it's doing an uncached load and when you refresh it, it uses the output cache and that's why it's fast? Commented Jan 5, 2011 at 22:09
  • Let me give more info on that. Here is an example of how the site might act at peak hours: I go to the site and it loads up the main page fine. I view someones post and it times out with the "not available" error. I refresh, and it may or may not time out again. Eventually it loads the page normally. I go to another page and its fine. I try to post a comment and it times out once or twice before posting normally. I post another comment and it posts instantly. I go back to home and it times out. It seems to time out randomly. If it is the caching, any ideas of how to fix it? Commented Jan 5, 2011 at 22:22
  • Also, during other times of the day the site runs as smooth as can be. Everything is very fast and responsive. It's usually around noon and then later in the evenings I notice the slow down and time outs. I am also wondering if the settings are set to somehow only allow a certain number of connections or requests at a time. I don't have anything set in my Web.Config for this. Commented Jan 5, 2011 at 22:24
  • Could it be a paging issue oreilly.com/pub/a/windows/2004/04/27/pagefile.html support.microsoft.com/kb/889654 on a sdie note this sounds like what happenns to my PC when McAfee virus scanner runs. Commented Jan 5, 2011 at 22:39
  • @Daveo - Good tip there. That could be another thing to help get any extra performance I can out of my server. I built my new server earlier today. This weekend I am going to swap the PSU and HDDs to my new machine and use that as my new server as it is WAY WAY faster and has double the RAM. I also gonna throw in another new Hard Drive I have to move the pagefile over. On another note, would it also be better if I had my OS, Server and Databases on one hard drive, and all my Website files on another drive? That's how my development machine is set up. I may do that too. HDs are cheap. Commented Jan 6, 2011 at 5:00

1 Answer 1

3

It looks like this is more of an IIS issue than your code or hardware. There is a default setting for max concurrent connections per cpu and queue length that you may be reaching.

See Optimising IIS Performance and someone with a similar problem (and resolution).

Sign up to request clarification or add additional context in comments.

1 Comment

Sweet Thanks for the links. That first link is exactly the kind of thing I was looking for but did not have luck finding. I disabled Logging which was enabled. I think the big thing will be upping the MaxConcurrentReqeustsPerCPU setting in aspnet.config. This is what I was confused on previously, but that second link explained it a lot better. I will give it a few days and check up on it and report back. I am also working through some image and support file optimizations/mergings I found on another blog to reduce the amount of requests needed per page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.