We have 16 GB of RAM and trying to access our applications hosted through the server with Apache tomcat 7.0.29 in Ubuntu server 12.04 (GUI). All our applications are running very very slow... Please suggest a way to make the applications run faster...
closed as off-topic by Alvar, Eric Carvalho, guntbert, Braiam, Seth Dec 1 at 0:24
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This describes a problem that can't be reproduced that seemingly went away on its own or was only relevant to a very specific period of time. It's off-topic as it's unlikely to help future readers." – Alvar, Eric Carvalho
You first need to determine what is the root-cause of things running slowly.
I suggest to strace the apache process like this:
First, determine the process id of the parent apache process by running:
The first number in the output (2nd field) should list the process-id. Output example:
Now strace the process and its children processes like this:
(make sure to replace the process id 9446 by your actual process id as revealed by the 1st command.)
The output will list all system calls followed by the time it took them to complete. It should make it very clear where are you spending your time or getting stuck. Please note that system calls that are blocking by nature, like select or accept would normally block until an external event occurs, so they are expected to not return immediately and take longer to complete.
You can also add -o filename to strace in order to save the output in a file for later inspection.
Sometimes hardware issues cause things to run slowly. Inspect /var/log/syslog for any hint of a hardware problem, also running ifconfig -a or netstat -i should make it clear if you're having network errors, ethernet collisions, or retransmissions which are often caused by faulty cables or network equipment.