Current time: 12-09-2019, 06:50 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why do small file size images take long to download?
05-24-2011, 10:55 PM
Post: #1
Why do small file size images take long to download?
http://www.webpagetest.org/result/110524_Z8_P00Y/

I find it odd that a 16kb image takes 500 ms to download.

Is this normal?
Find all posts by this user
Quote this message in a reply
05-26-2011, 11:40 PM
Post: #2
RE: Why do small file size images take long to download?
It's not unusual (it looks like there are actually 3 different 16K images downloading at the same time). The actual download time on the wire is probably less than that but WebPagetest is measuring when the browser processes the actual data that came in on the wire - you can grab a tcpdump for much more accurate details on the actual data flow.

That said, TCP slow start is something that most web developers should learn about because it has a profound effect on HTTP in particular since the connections are usually short-lived. TCP slowly ramps up the transfer rate across a connection and doesn't just blast all 16KB. It differes by server but usually it will send 4KB and as each packet gets delivered it will increase the transfer size by the amount that was delivered.

In a simplistic model (assume all of the data is delivered at once) that means to deliver 16KB it actually sends:

4KB - initial congestion window
8KB - increased by the 4kB that was delivered
4KB - remaining image data (congestion window is 16KB)

And takes 3 round trips to deliver the data (with ~100ms RTT to the server that could take 300ms just in round trips).

That said, stack_logo.png is delivered on a connection that is already partially warmed up but it looks like the previous data was only 500 bytes or so so it didn't really help (connection view will show you what data was downloaded before).

John Rauser gave a great talk at last year's Velocity conference on the topic. Steve Souders has a write-up on it here: http://www.stevesouders.com/blog/2010/07...rformance/ with a link to a video of the presentation.
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)