Lags on simple static file requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I grep my logs every day for slow queries. Sometimes I see a dynamic
request in there and I go and optimize the code. But more concerning
is when I see simple serving of very small static files on a very
underloaded machine. I am looking for hints about the source.

For example, here's an ordinary request at 22:22:57:

0 20903 - 70.49.41.94 [06/Jan/2009:22:22:57 -0500] "GET
/javascripts/jquery.scrollTo-min.js HTTP/1.1" 304 0

Less than 1 sec to process, returned 304 rather than the body. PID 20903.

A second later, another process does another ordinary response:

0 20892 - 72.204.24.191 [06/Jan/2009:22:22:58 -0500] "GET
/stylesheets/master.css?1231298577 HTTP/1.1" 200 3359

0 seconds to process, PID 20892, connection will be closed, etc,
status was 200, 3359 bytes returned.

But also at that same time we have the original process stalling for
119(!) seconds::

119 20903 X 72.204.24.191 [06/Jan/2009:22:22:58 -0500] "GET
/images/about_small.jpg HTTP/1.1" 200 53644

My question is what is Apache doing in those 129 seconds?

All of these files come from the same disk and should be in OS cache.

You might ask what was going on with the machine at that time? Was it
overloaded?

Time: 22:22:59
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          15.83    0.00    2.30    0.20    2.10   79.56

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
sdb               0.00         0.00         0.00          0          0
sdc               0.00         0.00         0.00          0          0
sda1             22.95         0.00       285.83          0       1432
sdi               0.00         0.00         0.00          0          0
sdk               2.40         0.00        30.34          0        152

Time: 22:23:04
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           7.02    0.00    0.70    5.72    1.30   85.26

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
sdb              13.25         0.00       183.13          0        912
sdc               0.00         0.00         0.00          0          0
sda1              3.41         0.00       128.51          0        640
sdi               0.00         0.00         0.00          0          0
sdk              10.64         0.00       179.92          0        896

Time: 22:23:09
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          10.15    0.00    0.80    0.40    0.70   87.96

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
sdb               5.40         0.00       104.00          0        520
sdc               0.00         0.00         0.00          0          0
sda1              3.40         0.00        76.80          0        384
sdi               0.00         0.00         0.00          0          0
sdk               0.00         0.00         0.00          0          0

$ /usr/sbin/httpd -v
Server version: Apache/2.2.3
Server built:   Jun 26 2007 19:24:58

The only exotic module we're using is Passenger Phusion.

I can send more configuration information through private email to
anyone interested.

 Paul Prescod

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux