Skip to content
Snippets Groups Projects
Commit 32a61fc7 authored by Stephen C Phillips's avatar Stephen C Phillips
Browse files

Improves formatting

parent 25f73bb2
No related branches found
No related tags found
No related merge requests found
......@@ -22,12 +22,14 @@ latency = distance / speed
For optical fibre (or even an eletric wire), the speed naively would be the speed of light. In fact, the speed is slower than this (in optical fibre this is because of the internal refraction that occurs, which is different for different wavelengths). According to http://www.m2optics.com/blog/bid/70587/Calculating-Optical-Fiber-Latency the delay (1/speed) is approximately 5 microseconds / km
>>>
if
distance is in m
delay is in s/m
latency is in s
then
latency = distance * 5 / 1E9
>>>
(this matches MJB's "propogation_delay" formula)
......@@ -37,26 +39,32 @@ Normally we would just measure the latency of a link. Most real-life connections
The time difference from start of the data to the end of the data (or "data delay" for want of a better term) is dependent on the bandwidth of the network and the amount of data.
>>>
if
data_size is in Bytes
bandwidth is in Mb/s
data_delay is in s
then
data_delay = data_size * 8 / bandwidth * 1E6
>>>
The data_size naively is the size of the data you want to send over the network (call this the "file_size"). However, the data is split into packets and each packet has a header on it so the amount of data going over the network is actually more than the amount sent.
>>>
let
packet_size = packet_header_size + packet_payload_size
then
data_size = (packet_size / packet_payload_size) * file_size
or
data_size = (packet_size / packet_size - packet_header_size) * file_size
>>>
### Total delay
>>>
delay = latency + data_delay
= (distance * 5 / 1E9) + {[(packet_size / packet_size - packet_header_size) * file_size] * 8 / bandwidth * 1E6}
>>>
### Effect of Protocol
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment