![]() |
Slow PNGs and GIFs ? - Printable Version +- WebPagetest Forums (https://www.webpagetest.org/forums) +-- Forum: Web Performance (/forumdisplay.php?fid=3) +--- Forum: Discuss Test Results (/forumdisplay.php?fid=4) +--- Thread: Slow PNGs and GIFs ? (/showthread.php?tid=8933) |
Slow PNGs and GIFs ? - Letus - 11-22-2011 12:49 AM Hi, after migration to new machine, we did some optimalisation of the pages. The biggest issue seems to be with the image files, as it takes several seconds to download them (altho having only some 17Kb ...). Here is current waterfall http://www.webpagetest.org/result/111121_D9_28E8D/1/details/ Please the very long bars for GIFs and PNGs ![]() URL: http://img1.valka.cz/images10/homepage_icons/ico-01.png Host: img1.valka.cz IP: 89.185.250.36 Location: Czech Republic* Error/Status Code: 200 Start Offset: 2.952 s DNS Lookup: 225 ms Initial Connection: 160 ms Time to First Byte: 317 ms Content Download: 1819 ms Bytes In (downloaded): 17.8 KB Bytes Out (uploaded): 0.4 KB The webserver is Lighttpd, multiple 15k SAS disks in raid serving the files, no significant load (8 cores, load average: 0.21, 0.47, 0.41, iostat acting cool as well), 1Gbps network on backbone. When I do local (same country) test using Google Chrome and Page Speed extension, I get speed for ico-01.png like 10ms instead of those 1800ms. Im connected on shared 10Mbps wifi line. I wonder, what makes such a horrible difference ? Does it take like two seconds for 17Kb to travel from Europe to webpagetest server ? (please note that putting amazon CDN instead to serve those files didnt change a thing, please see this result http://www.webpagetest.org/result/111120_HF_27YR4/1/details/#request44 ) Or is there any problem with recieving PNG / GIF files ? I really cannot understand those results ![]() Thanks for any advice ! RE: Slow PNGs and GIFs ? - laboot - 11-22-2011 06:53 AM This happens due to TCP slow start. Wiki: http://en.wikipedia.org/wiki/Slow-start Try to download images (at least a few) from the main domain, where html comes from. Here is an example, on how to successfully exploit slow start: http://www.webpagetest.org/result/111121_6P_28JBV/ RE: Slow PNGs and GIFs ? - Letus - 11-23-2011 01:08 AM thank you for your answer, I didnt have any idea about that. But changing to main domain didnt help to serve the files any quicker ![]() http://www.webpagetest.org/result/111121_11_28KS6/ i still think that downloading the 17Kb file to the other side of the world still shouldnt take two seconds ![]() RE: Slow PNGs and GIFs ? - LeptienM - 11-23-2011 06:26 PM (11-23-2011 01:08 AM)Letus Wrote: thank you for your answer, I didnt have any idea about that. But changing to main domain didnt help to serve the files any quicker Here is a test result from the Paris node, which is much closer to the origin Servers': http://www.webpagetest.org/result/111122_QA_28TSC/1/details/ And I agree, even with TCP Slow Start it shouldn't take 1 second to download a 14.4 KByte image. And if you look at objects 5-17, establishing a TCP connection shouldn't take 1 second as well... RE: Slow PNGs and GIFs ? - Marvin - 11-23-2011 08:33 PM I've ran a test on the home page of your hosting provider. It seems their web site may be suffering from the same issue like yours. Not all, but a large number of their static files take unusually long time to download: http://www.webpagetest.org/result/111123_SG_29132ccb0183f6a306df4d0ea05184bd/1/details/ Perhaps you may consider moving to a different host. RE: Slow PNGs and GIFs ? - Letus - 11-25-2011 02:12 AM Thanks again for the tests ... I guess I must have done something wrong - Lighttpd webserver is fast especially with static files, so sending images should be easy for it (and my current average on the whole webserver is like 20 requests per second, 300 kbyte/s so I guess nothing terrible). When I run ab command with 30-50-100 concurrent users getting 1000 images, it serves like 4000 static images per second (but I admit, within the same 1gbps network, not from outside internet, havent measured that), so I do not see any harddrive or memory or configuration bottleneck ... Might it be keep-alive ON causing this ? I'd say no, but who knows, I've learned the hard way that in IT the things are really working the exact opposite you expect it to ![]() Can someone run the command ab -c 20 -n 1000 http://forum.valka.cz/images10/homepage_icons/ico-01.png againts my server from USA and let me know the result ? This is what I see when AB'ing the server from another quadcore machine within the same network : ab -c 20 -n 1000 http://forum.valka.cz/images10/homepage_icons/ico-01.png Code: This is ApacheBench, Version 2.3 <$Revision: 655654 $> Repeated runs, same command Code: This is ApacheBench, Version 2.3 <$Revision: 655654 $> Code: This is ApacheBench, Version 2.3 <$Revision: 655654 $> I do not see any reason the static files shoud have this problem ![]() Thanks alot for the help with this topic, I really appreciate it and Im happy to learn new stuff. RE: Slow PNGs and GIFs ? - Letus - 11-25-2011 07:27 PM it seems I may have found the problem, there might be disk speed issue. The gzipped files are being served from disk cache (once they are gzipped, they are stored in a separate directory and served direcly from there if requested again) on another disk, but the images are being served from disk, that seems to have slow response and transfer rate ... With repeated requests like AB test, this is not visible, as the file gets cached by the linux system I'd say, but with random access to various files this is not possible and it might cause the above visible problems. Let me investigate this and come back with results RE: Slow PNGs and GIFs ? - Letus - 12-10-2011 03:56 AM well, even after migration to another disk I didn't achieve any improvement with the PNG files ![]() http://www.webpagetest.org/result/111209_QP_2F53S/1/details/ seriously, what the heck is wrong with those PNG files ? ![]() |