Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question

closed as off-topic by Alvar, Eric Carvalho, guntbert, Braiam, Seth Dec 1 '13 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
If this question can be reworded to fit the rules in the help center, please edit the question.

You need to tell about circumstances/load ... –  guntbert Nov 30 '13 at 21:22
add comment

1 Answer 1

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.


share|improve this answer
add comment

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