Saturday, March 12, 2016

------- Crashed my Game!

Yesterday I was playing Minecraft with one of my friends, and he kept getting disconnected. I have a server running on my dysfunctional desktop but, since it was only at a few percent CPU usage, that could not have been the cause. Further investigation found none of our electronics were responsible for our inability to play; it was our internet provider that was interfering with our game. Their high error rate was clogging the connection. This made me wonder about why advertisements do not compare error rates, along with their comparison of speed. We have a plan with, supposedly, 150 Mbps of download speed and 12 Mbps of upload speed. However, those speeds seem only to be achieved by network testing software. I have run speed tests many times and have yet to see them reach the advertised level.

This is especially frustrating when the high error rates interfere with using my server to play online games - to the point where TCP (the connection to another computer on the internet) cannot deal with the congestion. I wonder whether they purposefully throw error rates so that the bandwidth is distributed across households, thereby decreasing the internet provider's expense. Yesterday the error rate was so high that my friend's computer couldn't maintain a basic TCP connection to my server. Giving up on any hope of playing Minecraft, we switched to Robocraft which has a much higher error tolerance. That still was not enough - the latency kept growing every battle, such that it failed before the end of each round. I decided that I will try to create a mechanism to get around this error rate boosting system. I also think that it would be interesting to have HiTech students collect error rate data at each of their homes for their respective internet providers. Having a prestigious technology high school present a research paper on this would call attention to the problem. If this research paper is picked up by the local news, as many of the achievements coming out of HiTech are, it might force the internet companies to make changes that will address it.

Bonus Tech Stuff: Using the dd Command

The dd command, AKA Copy and Convert Command, is like a disk-transfer Swiss-army knife. In its simplest form, it allows you to write over a file with data from another file. But what makes this command so useful is that it functions even when the source or destination file is some form of a drive - USB stick, hard drive, CD, tape drive, floppy, etc. For example, you could take your home partition and copy it onto a flash drive with dd if=/dev/sdXN of=/dev/sdXN, replacing X with the correct letters an N with the appropriate partition numbers. dd can also take other types of files as input, and convert them appropriately - hence the name Copy and Convert. (You may be asking why it is called dd instead of cc - it was changed to dd because cc was already taken by C Compiler.) For example, you can take a .iso file from a distro website and burn it onto a drive using dd.

dd will also read from stdin when there is no input file specified, and write to stdout when no output file is specified. This means that you can pipe through other commands, as well as to transfer a partition from one system to another. In this example, I will assume that we are copying our entire main drive from one computer to another identical computer because we do not feel like using the installer. One way we could do this is using an external drive. I will assume that we do not want to use a filesystem in order to provide a speed boost. We could use dd if=/dev/sda | gzip -f | dd of=/dev/sdb. On the other side, we would use dd if=/dev/sdb | gzip -d | dd of=/dev/sda. Or, we could use cryptcat in order to transfer it over network.
#slice2016

No comments:

Post a Comment