I need some advice on my situaton at my host, and possibly some frame of reference as to what can/should be expected from a VPS setup like mine and what I can expect it to manage.
I have a site that sees some traffic of about 150k pageviews per day. On any given day, it peaks for roughly a timespan of 4 hours per day where there may be about 5 req/s.
I use a standard setup (LAMP) running mod_php in Apache, not fast cgi. I have a VPS on Virtuozzos Power Panel that has 1,5 GB RAM and really an unkonwn amount of CPU. I haven't been able to ascertain that information but probably could if I asked my host.
The problem is that during these hours it gets a bit slow from time to time. Running TOP shows sometimes a staggering amount of waiting processes i.e. the load is quite high (15 - 25).
So, I'm now really at a fork in the road where I either start looking into going with a different setup, say Nginx + PHP-FPM (FCGI) and try to see if that makes a difference. I'm not really an admin so I would be kind of lost on that. I could also start looking into my code to see if I can cache more or do smarter stuff etc.
However, before doing any of the above, I'd like to ask this crowd here if you think that I've sort of hit the roof on what can be expected from a VPS of the size I just told you about. That my situation is quite normal and that the real solution is actually just to upgrade my VPS. Is it?
So, as I don't know what I can expect from a VPS - performance wise - I really need your experienced input here. Appreciate it a lot.
From my experience CPU ready time cab be a problem if there are many virtual machine instances on a physical host. With vmware at least reserving MHz isn't enough and you have to be very careful with consolidation ratios. Especially if you have a lot of busy vps on a physical host.
I am not saying thus is the cause but could be a possibility.
If the vm's are balanced correctly and running on good hardware I would expect very similar performance compared to dedicated servers for most applications.
I only have experience with vmware so this may not apply to your situation
ask your provider if they can investigate your concers or maybe trial a few other providers to see how things compare
There are plenty of options for you but I'll relate a similar experience with someone that had already optimized their code and installed nginx/lighttp/etc...) but was still having performance issues.
We had her sites migrated to a well respected host and then she asked her users to use the new site for a day (she disabled her primary site with a message to go to the new site). Just based on that day she decided to stay with the new host and just updated the DNS.
I'm not saying that is the best route for you but an option. That would let you at least see the differences in performance.
A web site running PHP programs can consume any amount of resources per page view; it just depends on what the proghrams do.
For example, if the site allows users to do text searches of 100 million bytes of forum or blog posts, that will take a second or so on a dedicated server. On a VPS it will likely take longer, depending on other activity on the disk.
So no-one can tell if your 5 pageviews a second is a heavy load or not.
If it were me, I would start by using Firebug in Firefox to examine the individual requests within a web page, to see what time they take.
Then I would look at the Apache access.log for the peak period, and seeing how many of the requests are for static files (.css .js .jpg .gif .bmp etc as well as HTML files), and how many of those are generating 200 or 304 response codes. *All* those requests are candidates for elimination through setting the correct Apache cache/expires headers. I'd also check that text files are compressed, reducing network transmission time.
Only when I'd take those initial steps would I try to analyze further:
1) How many server requests does each page view generate (typically the number may be 10 to 100). The number of requests can be reduced by exploiting browser caching, by setting the correct cache/expires headers in the web items.
2) How much disk activity is there for each server requests (often it is one disk read or more; so your five page views a second could be generating 50 disk reads per second.) Disk activity can be reduced by using web server caching.
3) What SQL activity is there - a major, open-ended question
4) What CPU load is generated per request
5) What network traffic is generated by the page views, and how does that stack up against the underlying server's network speed? Network traffic can be reduced by gzipping text files.