Calculating Download Speed

Started by
5 comments, last by jfclavette 18 years, 6 months ago
hey all, I'm tinkering around with some figures and am trying to determine if my Java applet is getting too big to download in a reasonable amount of time. I'm sure it's not rocket science, but I figured I'd ask you guys (and gals) for input just so I don't make any bonehead mistakes, like forgetting to convert between English and Metric systems (shame on you, NASA...). So far as I see it, it's just a matter of simple division: take the size of your program (and all its resources) in bytes, and divide it by the download byte rate of the connection a user would be using. So if your program is 80 bytes large (ha ha) and a user has a connection of 20 bytes/sec, it would take 4 seconds to download.... but that just seems too easy. Am I missing anything here? Is there any way to account for high traffic situations (maybe multiplying the quotient by some 'traffic factor')...i don't know. I'm up for any suggestions. -hisDudeness
Well I believe in God, and the only thing that scares me is Keyser Soze.
Advertisement
That's pretty much right. Though, as you probably know, your "connection speed" is not the same as the speed you download at. The only hard part might be determining how fast a person can download from the specific place where you host the app.
It seems too easy? Why should it be hard? And.. eh.. what's the English system for bytes? [wink]

You're calculation is right.
Some things to be careful with: most connection speeds are measured in kbps, which is kilobits per second, not kilobytes. Also, you download is as fast as the slowest link. So maybe the user has a brilliant glass fiber connection, if you are serving him and 9 other people from a 2048 kbps cable, he would download with only 25 kBytes/s.
Also, you get TCP/IP or HTTP headers adding a bit to the size of your data, although that probably won't make a major difference. :)
Okay now everyone's got me worried....

So if a program like Excel is, say, 9.61 MB (10 million-and-change bytes). And grandma has a dial-up connection at an astounding 128 kilobits/sec. Ten million divided by 16 (128 bits = 16 bytes) equals 625,000 seconds to download Excel. Or to put it another way, 7.2 days.

Obviously something is wrong here. I'm either missing some crucial information here or I'm off by a few decimal places (mundane details). I can't be this stupid; afterall, I did score a 96 on my SATs.

-hisDudeness
Well I believe in God, and the only thing that scares me is Keyser Soze.
Yeah, that is definatly wrong... I have a 56K (53.3 or less) and I can download 40Megs in a few hours ( about 8 I think, maybe a little less).

And how do you get a 128k dial-up connection? I though that the ENTITY that governs download speeds set the max over a phone line to 53.3k.
F-R-E-D F-R-E-D-B-U-R...G-E-R! - Yes!
Quote:Original post by hisDudeness
Okay now everyone's got me worried....

So if a program like Excel is, say, 9.61 MB (10 million-and-change bytes). And grandma has a dial-up connection at an astounding 128 kilobits/sec. Ten million divided by 16 (128 bits = 16 bytes) equals 625,000 seconds to download Excel. Or to put it another way, 7.2 days.

Obviously something is wrong here. I'm either missing some crucial information here or I'm off by a few decimal places (mundane details). I can't be this stupid; afterall, I did score a 96 on my SATs.

-hisDudeness


1 kilobit = 1024 bits.
128 kilobit per second = 1024*128/8 = 16384 bytes per second

Therefore, your grandma is dowloading at 16 kilobyte per second.*

9.61 MB = 9840.64 kilobytes.

9840.64 kilobyte / 16 (kylobyte/second) = roughly 10 minutes.

You apparently lost the "kilo" somewhere in your reasonning.

* This is the maximum theoretical speed, which is seldom reached.
I teleported home one night; With Ron and Sid and Meg; Ron stole Meggie's heart away; And I got Sydney's leg. <> I'm blogging, emo style

This topic is closed to new replies.

Advertisement