0

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...

1
  • You need to tell about circumstances/load ...
    – guntbert
    Nov 30, 2013 at 21:22

1 Answer 1

3

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:

$ ps axu | grep apache | grep root

The first number in the output (2nd field) should list the process-id. Output example:

root  9446  0.0  0.0 255620 15124 ?  Ss  Aug02 0:06 /usr/sbin/apache2 -k start

Now strace the process and its children processes like this:

$ sudo strace -f -p 9446 -T

(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.

HTH.

Not the answer you're looking for? Browse other questions tagged .