RE: Experiencing odd, possibly JPEG-specific slowdowns

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

 



Enable the %D in the logs - it will tell you how long the server takes
to serve the query, in microseconds. It can be very long from client
side but fast from server side - and even if slow from server side, it
can be the client that hangs in the middle of the transaction (for very
large ressources - not really your case).

I had a similar problem -> up to 120 seconds to serve some static
resources,  for around 0.5% of the queries. I wrote a script to test
this (making thousands of requests and showing only the ones that are
slow to match in the logs), even in local it took the same time - if
interested let me know I'll send it to you.

I'm still not able to tell why it behave that way, it disappeared
(almost) when we moved from prefork to worker mode. All I saw was 2 or 3
occurences of 2sec for a small gif.



-----Original Message-----
From: Angus McIntyre [mailto:angus@xxxxxxxxx] 
Sent: Wednesday 1 February 2012 15:56
To: users@xxxxxxxxxxxxxxxx
Subject:  Experiencing odd, possibly JPEG-specific
slowdowns

I'm in the process of moving a domain from a virtual host on a physical
box (CentOS 5.5, Apache 2.0.6.3) to a virtual host on a VPS (CentOS 6.2,
Apache 2.2.21). The two machines (one physical, one virtual) should have
broadly similar performance and memory availability; the physical box is
more heavily-loaded, and hosts vastly more sites. The VPS is essentially
idling. 

The old domain is hosted by my ISP, so I don't have information about
the options used to build the Apache, or the httpd.conf that it uses.
The Apache on the new box was built with the prefork MPM, and the
httpd.conf is almost unchanged from the standard default conf. I've
turned on name-based virtual hosts and added some AddOutputFilterByType
rules to direct compressible content (HTML, CSS etc, but not images) to
mod_deflate, but that's about all.

When I fetch pages from the new server using a web browser, it's
noticeably slower than fetching the same content from the old server.
There are two particular problem cases that I have seen.

1. HTML page with thumbnails

When I fetch a simple static HTML page with a number of embedded
thumbnails in it, there is frequently a noticeable delay before some of
the thumbnails load from the new server. Looking at the graph in
Firebug, I see that the initial HTML and CSS loads, we reach the
DOMContentLoaded point, and then the browser goes into a long - almost
one second - wait for the first three thumbnails. From the graph it
seems that the browser is fetching six content items in parallel: 3 GIF
images (200 bytes to 2.5K) download almost instantly, while the 3 JPEG
images (1.7-2K) are held up for over a second.

On the older server, this doesn't happen, or happens much less:
everything seems to be delivered much more quickly, with only the last
JPEG forced to wait for any length of time.

2. Isolated JPEG

The second oddity occurs when I download a single unembedded JPEG image
(84K) in my browser. On the new server, the image can take up to 14
seconds to download; on the older server, it consistently arrives in
less then .5s. Firebug shows the bulk of the time being taken up by
'waiting'.

The obvious suspicion would be that the old server is on a faster
connection, but if I download the same image from the two servers using
curl, the image actually downloads about 10% faster from the new server
than the old one. As far as I can tell, the connection to my new server
is actually faster.

I'm testing using Firefox on a Mac simply because Firebug gives me
pretty graphs, but I've been able to reproduce the same problem with
other browsers, including Chrome, Raven, Internet Explorer on Windows 7,
and even Mobile Safari on iOS 5. Very occasionally, I can get very slow
transfers when testing with curl or libwww-Perl.

I tried enabling 'sendfile' and 'mmap' on the new server but didn't
notice any difference.

Can anyone suggest what's going on here, and if there are any
configuration settings that I could apply to try to make the new server
perform as well as the older one?

Thanks in advance for any help,

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

*****DISCLAIMER*****

This electronic transmission (and any attached document) is intended 
exclusively for the person or entity to whom it is addressed and may 
contain confidential and/or privileged material. 
Any disclosure, copying, distribution or other action  based upon 
the information by persons or entities other than the intended recipient
is prohibited. If you receive this message in error, please contact the 
sender and delete the material from any and all computers. 
Mobistar does not warrant a proper and complete transmission of this
information, nor does it accept liability for any delays.

*****END OF DISCLAIMER*****

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