EC2 Instance is running very slow
Solution 1:
I would start with checking with memory/CPU/network availability to check if it is not bottleneck.
Try following commands:
-
To check memory availability:
free -m
-
To check CPU usage:
top
-
To check network usage:
ntop
-
To check disk usage:
df -h
-
To check disk io operations:
iotop
Please also check if when you disable your application you are able to quickly log in to that machine. If login is still slow, then you should contact your EC2 support complaining about poor performance and asking for assigning more resources for that machine.
Solution 2:
You can use WAIT Tool to diagnose what is wrong with your server or your application. The tool will gather all information about CPU and memoru utilization, running threads etc.