I have a virtual machine host running Centos 6. It is serving an android application with apache/php/mysql. When online users gets high in number , the server responds very slowly. Even ssh connection to the server becomes slow.
So how can I find what is the bottleneck for this and how to fix it? Is it low RAM or a lot of hard disk write/read , high cpu usage , and which program is causing this?
This is the output of free -m in normal situations:
total used free shared buffers cached
Mem: 1877 1714 162 0 16 202
-/+ buffers/cache: 1495 381
Swap: 1023 231 792
Output of htop in normal situation: Output of htop