How fast is your internet connection?

You might wonder how fast your internet connection is.  A typical way to do this is to download a large data file from someplace on the Internet, and to see how long it takes.  You might wonder whether somewhere along the way, the data file is getting compressed.  The way to eliminate that possibility is to pick a data file that is incompressible.  To do this, you simply need to make sure the content of the data file is truly random.  With this in mind, I offer a couple of PNG image files that are truly random in content.  You can use them to test how fast your internet connection is.

Maybe the way to start is to click on this link.  The file is about three megabytes in size, or about 23 megabits in size.

So for example if the speed of your internet connection (to the server in Colorado that hosts this file) is 10 megabits per second, then we would expect it to take about 2.3 seconds for the file to load.

Many factors conspire to make such a download take longer than one might expect.  These include:

  • the overhead at our server, due to encrypting the data for “https” security,
  • the overhead at your device, due to your having to decrypt the received data,
  • the responsiveness (or lack thereof) at our web server, which is merely a $120 Synology file server that we purchased on Amazon maybe ten years ago,
  • the extent and severity of Internet data congestion at any of the dozen or so switching points between our web server and your device.

Maybe you would like to download a bigger file.  In that case, feel free to click on this link.  The file is about 26 megabytes in size, or about 211 megabits in size.  So again assuming a connection speed of 10 megabits per second, we would expect it to take about 21 seconds for the file to load.

What got me started on this was a suggestion many years ago from a college friend named Newton B. White Jr.  Newton and I were classmates in physics class in college, and later we were schoolmates in the same law school.  Later, after he and I had both graduated from law school, the Internet happened.  Some time shortly after that, Newton sent me a GIF image called “colornoise.gif”.  The file was enormous!  This was in the early days of the Internet when you might use the word “enormous” to describe a file of a hundred kilobytes.  In those days a data connection to the Internet might be a telephone modem running at 28 thousand bits per second.  In those days, Newton’s colornoise file might have taken thirty or sixty seconds to download.

Nowadays, of course, to make a meaningful test of the speed of an internet connection you need a much larger file.  Hence the two files linked above.

What exactly are these files?  These files are PNG files.  PNG is an image format.  The random numbers are arbitrarily grouped into groups of 24 bits, each group defining a 24-bit color of a pixel.  The first file, called “colornoise2”, is a square image 1000 pixels wide and 1000 pixels high.  It is thus one million pixels, at 24 bits per pixel.  That adds up to a file size of about 24 megabits, or about 3 megabytes, as mentioned above.  The most fun way to view such a file is with an image editor such as Irfanview.  Irfanview tells me that this file happens to contain exactly 970503 distinct colors.

The second file, called “colornoise”, is a square image 3000 pixels wide and 3000 pixels high.  It is thus nine million pixels, at 24 bits per pixel.  We would expect this file to take about nine times as long to download to your device.

You can zoom in to see the individual pixels, some of which are shown at right.

The reason for using a random content PNG file, instead of (for example) a word processor file, is that these random content files cannot be compressed (the fictional “Pied Piper” compression algorithm in the television series Silicon Valley not withstanding).  A word processor file of size comparable to the second file (“colornoise”) might be one thousand pages in length, but it would be compressible to some extent and the amount of compression would vary depending upon the particular algorithm employed.  The use of random content makes it irrelevant which, if any, compression algorithm might be employed along the way between our server and your device.

In the early days of the Internet it was commonplace to employ compression in the telephone data link.  Compression algorithms employed included V.42bis and MNP 5.  As far as I know, nowadays nobody bothers to use data compression on Internet data links.

How long did the files take for you to download?  Please post a comment below letting me know.

And a prize!  The first reader to post a comment below stating (correctly) how many distinct colors are in the bigger file (“colornoise”) will win a prize.

3 Replies to “How fast is your internet connection?”

Leave a Reply

Your email address will not be published. Required fields are marked *