Where to start...
I have a number of websites. I'm a developer. I'm not a very good server admin nor the "performance tuning" guy. I'm quite convinced that I've written somewhat OK code, both PHP-wise and MySql query wise.
One website in particular is now having some problems with high load from time to time, during peak hours. The stats are about 3,000,000 pageviews / month and there are pages that are quite devoid of logic but do carry some extensive media to download. It sits on a VPS on the Virtuozzo technique with 1,5 G of RAM available (but never uses more than half of that, peak or no peak).
My problem is that I don't really know where to start in finding out what I can do to "help" my site. I don't know what stats I should be looking at to figure out what is reallyp causing the load. Is it mysql that starts using too much tmp-disk? I don't know. Is it some of my PHP-code that is expensive to execute? I don't know. Is it Apache that spawns too many threads? Couldn't tell.
I am totally in the dark here on how to attack this problem and need some guidance please.
Should I install Munin? What do I look for in Munin then, when I do get the stats.
Looking at TOP in peak hours I can see that the load sometimes hit as high as 20, when off peak hours it rarely goes above 1. I can see Apache thread count at about 100, tcp connections at about 300, mysql threads only 2 (mysld and mysqld-safe, whatever that is).
I have an op-cache installed already (eAccellerator) but I have no real stats to give you there other than it seems to work OK since the load of the pages goes quite fast.
Well, any help at all in where to start and how to attack this is greatly appreciated.
EDIT Peak stats: about 250 req / min, I'm on a ServInt VPS and they say all machines have 4 CPU's but I guess that's only for burst (if even) so I couldn't say for sure about the CPU I'm sorry to say.