Forum Moderators: open
The problem is that it continually hits the maximum amount of traffic this server can handle. When traffic peaks, the site gets very slow.
I've been working on optimizing the database queries, but every time I do, the traffic level increases until the site starts to buckle under the load again.
I've been thinking about designing some sort of static-file caching system to store the main content of the pages as flat files and displaying them to most of the users, then updating them after they are a day or so old.
The problem is, of course, not everything is static and I'll still have to call the database for a few bits of info every time a page is viewed, regardless.
Then there's also the fact that the cached pages will consume disk writers and memory, so I'm not sure how much further ahead I'll be with this system.
I'm not ready to change the underlying programming language (I doubt that .Net could handle the traffic.) Hardware is cheap, but what I've got is farely beefy already.
Can anyone give me some direction?
First, determine if the main slowdown is on the ASP side or the database side. That will help you determine where to initially focus. If you're getting that much traffic, you may want to look into a new server and separate the web code onto its own box. (Or even boxes- one of my clients has over a dozen mirrored web servers with 1 database server.)
Are your tables properly indexed? (That's the first thing I'd look at.) How much of the RAM is actually being used at the peak times? Which queries are taking the longest to run? Are you grabbing more data than you actually need? (For example, doing a "SELECT * FROM TableName" that has 100K rows, but only displaying 20.)
You can also look at the following:
- Data Caching best practises [webgecko.com]
- Do you use HTTP Compression? if so, de-activating this should decrease processor load (although your bandwidth use will increase)
I don't know how to tell if the "ASP side of things" is a bottleneck. The site worker process usually peaks out at about 300,000 kb in size. I wish I could us multiple WP's but I need to maintain session variables for logged-in users.
Thanks for your help. Hopefully I won't need any more hardware for awhile.