Forum Moderators: Robert Charlton & goodroi
Similarly, if you have loads of pages, importance and serve pages in under a second Google will happily eat 80,000+ pages a day ;o)
Shoudl i ask for my server upgrade, like more RAM or something like that?
BTW, 3-4 seconds is a lot different from the 20+ seconds mentioned in your original post; 3-4 seconds is not all that bad. Chances are you can always find more things to optimize. Are your tables indexed properly? Are all your tables fully normalized (if so, often you can optimize things by de-normalizing tables)? Does MYSQL have query caching?
I made a cache programme for my site, but then my server was storing too much cache files in the cache directories and file numbers crossed the limits and I ran out of Server Node.. then i deleted cache system.
Bytheway, my site has good hits.
Any other idea?
Regards
Looking into upgrading your server's memory and/or processing speed may also work- you'll need to do some investigation to see if either (or both) is causing a bottleneck currently. Splitting the DB server to its own server may also be needed- it all depends on how your server is handling the current load.
But I also made some other suggestions- look into further optimization before throwing money at hardware.
Are you sure that you have implimented indexes properly? It could also be that your joins are overly complicated. There are many reasons why MySQL is running slowly.
You may want to search for 'mysql performance blog' on Google, it'll give you a few pointers. It'll also give you inspiration to dig deeper into specific problems.
A lot can depend on how strictly you follow normalisation rules, sticking to them 100% is not always best. An example of this is a 170,000 page dynamic site that I've just completed DB optimisation on. I wrote a program to 'flatten' the data from a properly structured source DB every evening. The flattened DB is larger than the normalised DB but, because SELECTs are very common, it executes most commands at lightning speed (especially if you can fit it into memory). The 'De-normalisation' of this data sped up the SELECT queries 100 fold but only quadrupled the amount of memory that the DB required.
Sit down and analyse the types of queries that are common and then think about how you can make them work faster. There's plenty of help out there if you identify where the problem stems from.
I made a cache programme for my site, but then my server was storing too much cache files in the cache directories and file numbers crossed the limits and I ran out of Server Node.. then i deleted cache system.
Trust me Tabish, nothing beats file caching for performance :-)
[edited by: Frederic1 at 4:11 am (utc) on April 28, 2007]