Experiencing odd, possibly JPEG-specific slowdowns

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

 



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




[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