Current time: 12-16-2019, 02:25 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extreme loading time, sometimes ...
11-02-2010, 01:29 AM
Post: #1
Extreme loading time, sometimes ...
Hi there,

I have the problem, that some times one request takes around 10 seconds to the first byte. One of this tests could be found here: test.
Some times it is the .html-Page to request, some times it is one of the images or other files. There is no rule, which file take so long.

I do not know, where this extreme wait time come from. The server has a load of 0.00, around 100% idle time and a lot of free Memory. I enabled yesterday mod_mem_cache and mod_cache to keep the files in memory, but the bad responses are always there, as you see.

Could someone help me?

best wishes
jabubo

Serverdetails:
Virtual Server with Debian lenny
Dell PowerEdge™ or HP Proliant
1 GB of RAM; 2 GB dynamically
50 GB diskspace in a RAID 10
Apache 2.2 with mod_alias, mod_auth_basic, mod_autoindex, mod_cache, mod_cgi, mod_deflate, mod_dir, mod_env, mod_expires, mod_headers, mod_mem_cache, mod_mime, mod_negotation, mod_php5, mod_rewrite, mod_setenvif

test and execute PHP functions online free and easy => http://www.functions-online.com/home.html
Visit this user's website Find all posts by this user
Quote this message in a reply
11-02-2010, 01:39 AM
Post: #2
RE: Extreme loading time, sometimes ...
Are you logging the response times in your access logs? That should give you an idea of how often it is happening outside of testing (assuming the time is coming from back-end processing).

Do you know if the storage is local on the box or if it is SAN or NAS (could be delays on the back-end filesystem)?

Are the images served directly from disk or do they go through some php/cgi/other code to process the request?
Visit this user's website Find all posts by this user
Quote this message in a reply
11-02-2010, 01:50 AM
Post: #3
RE: Extreme loading time, sometimes ...
There is only the normal logging of Apache enabled. I take a look and enabled this.

I do not know how the storage is bound to the box, possibly there is a SAN or NAS. Thats why i activated mod_cache and mod_mem_cache to get the disk out of the puzzle...

Images and all other files are serverd directly through Apache. Only the page behind the .html is generated through PHP and cached for 30 minutes as a file.

test and execute PHP functions online free and easy => http://www.functions-online.com/home.html
Visit this user's website Find all posts by this user
Quote this message in a reply
11-02-2010, 04:31 AM (This post was last modified: 11-02-2010 04:32 AM by jabubo.)
Post: #4
RE: Extreme loading time, sometimes ...
I enabled the response logging for now.

On this test, i have again such a long wait time: test

In my Logfile i get a response time (%D) of 40772µs, so i am confused where the delay is coming from.

test and execute PHP functions online free and easy => http://www.functions-online.com/home.html
Visit this user's website Find all posts by this user
Quote this message in a reply
11-02-2010, 11:11 PM
Post: #5
RE: Extreme loading time, sometimes ...
Assuming you got the right log file entry that would mean it has to be upstream of Apache. Do you know if the hosting provider uses load balancers or anything else in front of the server?
Visit this user's website Find all posts by this user
Quote this message in a reply
11-03-2010, 09:42 AM
Post: #6
RE: Extreme loading time, sometimes ...
No, the Server has direct internet access.
But the network is possibly a bottle neck. In the data-sheet of my hosting i found, that i have 50 mbit guaranteed and 100mbit at peaks. I think it is a problem of the VM where the "Server" runs in... I try to contact the hoster, to get rid of this.

One other thing:
I enabled mod_cache and mod_mem_cache on Apache, do you know how i can test it? I tried with 2 browser (IE and FF) but got two diffrent timestamps on the same ressource. Now i do not know exactly if this is working right. I would be happy, if there is a way to test it or look at the hit ratio.

Thanks for your help so far!

test and execute PHP functions online free and easy => http://www.functions-online.com/home.html
Visit this user's website Find all posts by this user
Quote this message in a reply
11-03-2010, 09:59 PM
Post: #7
RE: Extreme loading time, sometimes ...
Honestly, if you are seeing fast response times in the access log then mod_mem_cache is just over complicating things and probably a waste of time. I couldn't find anywhere where mod_mem_cache exposes stats so it's pretty much a black box when it IS working.

You could use an inexpensive CDN to serve your static files which will offload them from your server and you should get really fast responses from them but that's still working around the core problem and not fixing it.

-Pat
Visit this user's website Find all posts by this user
Quote this message in a reply
11-03-2010, 10:24 PM
Post: #8
RE: Extreme loading time, sometimes ...
Thanks for your help!

I got the bug. :-)
The number of process was set to a to low value in the VM. The hoster changed it and so i can now increase the number of Apache processes. The problem was through enabled keep-alive and MaxClients was reached. So the response was queued...

test and execute PHP functions online free and easy => http://www.functions-online.com/home.html
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)