Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have several websites on a VPS server. I'm using Ubuntu+Apache+PHP+Mysql.

How can I track the performances of each website, and somehow to know when I need to upgrade RAM (I'm progressively adding more and more websites).


share|improve this question
up vote 1 down vote accepted

With a web server, you need to add more RAM when disk swapping starts to negatively impact performance. With a database server, you need to add more RAM when your application profiling suggests that your disk cache isn't big enough to perform well. There's no way to tell from any single measurement taken out of context.

In terms of overall performance monitoring, there's a number of host-level tools that are popular -- Nagios is probably overkill, but Munin or PCP is probably a good fit for your needs. (Note what another poster said about time-based resource monitoring, like CPU usage or disk throughput, being inaccurate from within a VM, however.)

share|improve this answer
I'm now better configuring Apache to reduce swapping. But my question is: should I completely remove swapping.. or is it sometimes good ? How many MB of swapping are good ? – Patrick Nov 4 '10 at 20:44
One more thing: I've run free -m and I'm currently using 217M of memory and 28M are free. This is the state of my server in stand by (no requests, no traffic). is this too much? What are good values ? thnks – Patrick Nov 5 '10 at 9:09
The best metric for application performance is the performance of the application. Keep an eye on your response times before you start worrying about hardware resources. – jgoldschrafe Nov 5 '10 at 12:53

Well memory is fairly straightforward, just use the usual tools (free, vmstat, top or gnome-system-monitor if you fancy). CPU is a different thing as inherently no VM can ever truly self-report on true CPU usage, not without effectly being handed the externally gained stats via whatever vm integration tools your hypervisor of choice provides anyway. If you ask you VPS provider they may well have some form of web or API based mechanism for you to query your VPS stats directly from their own management tools, again depending on what code they're using themselves and whether they choose to offer this.

share|improve this answer
Ok thanks. Should I get rid of swapping by limiting number of processes ? or should I keep a minimum amount of swapping ? – Patrick Nov 4 '10 at 20:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.