Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions introduction/performance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,10 @@ time) you can calculate how many bits fit in the pipe. For example, a
transcontinental channel with a one-way latency of 50 ms and a bandwidth
of 45 Mbps is able to hold

.. centered:: 50 × 10\ :sup:`-3` *sec* × 45 × 10\ :sup:`6` *bits/sec* = 2.25
× 10\ :sup:`6` *bits*
.. math::

50 \times 10^{-3}\ \mathsf{sec} \times 45 \times 10^{6}\ \mathsf{bits/sec}
= 2.25 \times 10^{6}\ \mathsf{bits}

or approximately 280 KB of data. In other words, this example channel
(pipe) holds as many bytes as the memory of a personal computer from the
Expand Down Expand Up @@ -262,14 +264,18 @@ Perhaps the best way to understand the relationship between throughput
and latency is to return to basics. The effective end-to-end throughput
that can be achieved over a network is given by the simple relationship

.. centered:: Throughput = TransferSize / TransferTime
.. math::

\mathsf{Throughput} = \frac{\mathsf{TransferSize}}{\mathsf{TransferTime}}

where TransferTime includes not only the elements of one-way latency
identified earlier in this section, but also any additional time spent
requesting or setting up the transfer. Generally, we represent this
relationship as

.. centered:: TransferTime = RTT + 1/Bandwidth x TransferSize
.. math::

\mathsf{TransferTime} = \mathsf{RTT} + \frac{\mathsf{TransferSize}}{\mathsf{Bandwidth}}

We use RTT in this calculation to account for a request message being sent
across the network and the data being sent back. For example, consider a
Expand All @@ -279,7 +285,9 @@ round-trip time of 100 ms. This includes both the transmit time for 1 MB
(1 / 1 Gbps × 1 MB = 8 ms) and the 100-ms RTT, for a total transfer time
of 108 ms. This means that the effective throughput will be

.. centered:: 1 MB / 108 ms = 74.1 Mbps
.. math::

\frac{1\ \mathsf{MB}}{108\ \mathsf{ms}} = 74.1\ \mathsf{Mbps}

not 1 Gbps. Clearly, transferring a larger amount of data will help
improve the effective throughput, where in the limit an infinitely
Expand Down
8 changes: 6 additions & 2 deletions overlay/cdn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,15 @@ Consistent hashing hashes a set of objects
visualizes a 128-bit ID space as a circle, where we use the algorithm to
place both objects

.. centered:: *hash(ObjectName) → ObjectID*
.. math::

\mathsf{hash}(\mathsf{ObjectName}) \rightarrow \mathsf{ObjectID}

and nodes

.. centered:: *hash(IPAddr) → NodeID*
.. math::

\mathsf{hash}(\mathsf{IPAddr}) \rightarrow \mathsf{NodeID}

onto this circle. Since a 128-bit ID space is enormous, it is unlikely
that an object will hash to exactly the same ID as a server’s IP
Expand Down
6 changes: 5 additions & 1 deletion reliable/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ or approximately 8 KB. Since the sender can send only one packet per
RTT, if we assume a packet size of 1 KB, this implies a maximum
sending rate of

.. centered:: Bits-Per-Packet / Time-Per-Packet = 1024 x 8 / 0.045 = 182 kbps

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed hyphenated writing to camel case. Look bad when using math directive beause need to escape - sign
Also camel case already used extensively

.. math::

\frac{\mathsf{BitsPerPacket}}{\mathsf{TimePerPacket}}
= \frac{1024 \times 8}{0.045}
= 182\ \mathsf{kbps}

or about one-eighth of the network’s capacity. We’d like the sender to
be able to transmit up to eight packets before having to wait for an
Expand Down
4 changes: 3 additions & 1 deletion stream/coding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ networked multimedia, consider the following example. A high-definition
TV screen has something like 1080 × 1920 pixels, each of which has 24
bits of color information, so each frame is

.. centered:: 1080 × 1920 × 24 = 50 *Mb*
.. math::

1080 \times 1920 \times 24 = 50\ \mathsf{Mb}

If you want to send 24 frames per second, that would be over
1 Gbps. That’s more than most Internet users have access to even
Expand Down
6 changes: 4 additions & 2 deletions stream/transport.rst
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,11 @@ timestamps are relevant. For example, if the sampling interval is
the first sample in packet n, then the number of sampling instants
between these two samples is

.. centered:: TimeBetweenPackets / TimePerSample
.. math::

.. centered:: = (10 × 10\ :sup:`-3`\ ) / (125 × 10\ :sup:`-6`\ ) = 80
\frac{\mathsf{TimeBetweenPackets}}{\mathsf{TimePerSample}}
&= \frac{10 \times 10^{-3}}{125 \times 10^{-6}} \\
&= 80

Assuming the clock granularity is the same as the sampling interval,
then the timestamp in packet n+1 would be greater than that in packet n
Expand Down
9 changes: 5 additions & 4 deletions technology/switch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,12 @@ to switch 40 million packets each second. This is sometimes called the
packets-per-second (pps) rate. If the average packet is 64 bytes, this
would imply

.. centered:: Throughput = pps x BitsPerPacket
.. math::

.. centered:: = 40 × 10\ :sup:`6` × 64 × 8

.. centered:: = 2048 × 10\ :sup:`7`
\mathsf{Throughput}
&= \mathsf{pps} \times \mathsf{BitsPerPacket} \\
&= 40 \times 10^{6} \times 64 \times 8 \\
&= 2048 \times 10^{7}

That is, a throughput of about 20 Gbps—fast, but substantially below
the range users are demanding from their switches today. Bear in mind
Expand Down
Loading