Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a production web server that makes sites to be very slow when load for first time. After the first time all connections are normal and fast.

In the following screen you can see the first test I have run for a random site in my server:

enter image description here

and here you can see the result of the second time request:

enter image description here

As you can see there is a big change in the second load of the same page.

Here is the page load time graph:

enter image description here

My problem is that I don't really know anything about Red Had Linux server, and also I don't know where can I start.

Can somebody to help me ? I like to find out the solution for the long time "wait" in connection.

I know that my question is very minimal, but you can always ask me to give you information about the server.

share|improve this question
up vote 2 down vote accepted

Since you don't provide this information I will assume you are using mysql. There are many things to check, but you can start with :

  1. Download and execute this perl script. Read and understand the suggestions it outputs, it will help optimize your db.
  2. Find slow db queries. Unoptimized db queries can take much time to execute the first time and then are recovered from the cache, thus the difference. Check the slow query log and look for max execution time.
  3. Another one is name resolution on the db side, are you doing name resolution on db connect (check this to make sure) ?
share|improve this answer
Thanks a lot :) You are my herrow !!! :) – Merianos Nikos Nov 15 '12 at 10:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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