RailPro > RailPro Specific Help & Discussion
Snooze: An analysis of RP download times
(1/1)
G8B4Life:
This probably won't interest anyone much (fair warning, I did say snooze) but I decided to post it anyway...
Separating this from the Heavy Steam Ultimate sound file discussion (https://rpug.pdc.ca/index.php/topic,1151.0.html), I did some analysis of the time taken to download the file. I don't have the tools to analyse the over the air download to the modules (which is what nodccforme was talking about in the Heavy Steam ULT sound discussion, which I misread) so this is purely the download from the internet and from RPA to HC Simulator.
The first misconception to clear up is that because RP files take so long to download they must be quite large. Nothing could be further from the truth, in the grand scheme of things they are quite small.
Using my favourite network analyser and a bit of Zen I calculated the file size and the speed of the download.
First, the Heavy Steam ULT sound file is only 2,609,123 bytes, or just under 2.7 Megabytes in size however this is just the data for the sound file and more data than that is transmitted back and forth in each packet between RPA and the server.
Doing the analysis it took 1848 seconds (30 minutes 48 seconds) to download the Heavy Steam ULT sound file.
The total bytes transmitted (sent and received): 3,576,321
The total bytes sent to the server: 353,134
The total bytes received from the server: 2,674,457
This gives an average speed of 15.48 kilobits per second. That is less than half the 33.6kbp/s speed of my dial up internet connection back in the mid '90s! If you take the upload (sent) part out of the equation and only count the download the speed is 11.6 kbp/s, or one third the speed of my '90s dial up internet.
You will notice that the figures given are more than the size of the sound file. This is because each packet contains headers (contains information such as where to send the packet to and other stuff) and some other information, like hopefully a checksum for the data being transmitted. If you were to take this extra information away the figures would match the size of the sound file.
One of the reasons these downloads are so slow is that data is sent from the server at only 400 bytes per packet. The packet could be at least three times that size.
At the speed that Rings server (or the speed of his internet connection, or both) operate at combined with such a small packet size gives us the snails pace downloads. In comparison a 30 megabyte ESU decoder file downloaded in 183 seconds, which I'd classify as slow.
Moving on to the even more disappointing, it took 662 seconds (11 minutes 2 seconds) to transfer that 2.7 MB sound file from one segment of memory to another segment of memory, ie, from RPA to HC Simulator. I could copy the thing onto 360k floppy disks faster than that!
As to why the upload to the modules is also so slow, I've no idea as I can't analyse that but I'm guessing that the same or similar method is used as the other transfers, which equals way slow!!!
- Tim
nodcc4me:
Thanks for the explanation, Tim, especially for those of us who barely understand this stuff. So what would Ring have to do to speed up the data transfer process, both from their server and from RPA to HC to the modules? I'm thinking it would not be an easy thing to do or TR would have done it.
Alan:
Tim, take an educated guess as to why the slowness in the RPA-->HC Sim transfer. Mostly just for entertainment value, but also genuinely curious because you would think it to be hyper fast given today's PCs. One would presume Ring doesn't do it on purpose. Is there some unique programming technical limitation?
On the wire end it sounds like Ring needs to pay $9.99 a month for a host.
G8B4Life:
Al,
My response to Alan below won't answer all your query because I don't know all the parts of the puzzle but it should let you understand why.
Alan,
My educated guess is that the data is being transferred from RPA to HC Sim using the same function that downloads files from his server, so 400 bytes at a time through a UDP connection. You are right it should be lightning fast. I have nothing much to do when I get up today so I might try writing a test based on what I think is happening and seeing if it's faster or just as slow.
I don't think there's any programming limitation, the only thing I can think of is the speed at which RPA can download to the physical HC-2 (speed of what the microcontroller and flash memory can be written to) and HC Sim simply follows the same speed, even though PC memory can be written to a lot faster.
As for the download speed from his file server, so far other information points to his file server being hosted on a residential internet connection in his office, so who knows what speed his connection is but it certainly wont be as fast as a connection to a hosted webserver (like his website is on).
PS, Your ping is terrible, I hope that was a far away speedtest server. Your download speed seems good though.
- Tim
Alan:
--- Quote from: G8B4Life on February 07, 2021, 09:10:24 AM ---
...PS, Your ping is terrible, I hope that was a far away speedtest server. Your download speed seems good though.
- Tim
--- End quote ---
29 doesn't seem like a slow ping. It is always somewhere between ~15 and ~40 for me. It is my understanding this is typical for residential services.
Thanks for the educated guess. HC Sim limited to RPA-->HC-2 speed makes sense.
Navigation
[0] Message Index
Go to full version