Transcript Lecture 2

CS 164: Slide Set 2: Chapter 1 -Introduction (continued).
Roadmap
• Performance metrics
–
–
–
–
bandwidth
latency
bandwidth delay product
throughput
• What are sockets ? APIs.
Bandwidth
Bandwidth: Number of bits that can
be transmitted over a certain tiem
-- typically per unit time.
Some people also refer it to the
spectrum -- example 10 Ghz.
This typically translates to a
maximum data rate.
Transmission Time
• A function of bandwidth
• If bandwidth is B, transmission
time is 1/B.
• If bandwidth is 10 Mbps, the
transmission time is 1/(10 x 106) =
1 ms.
Propagation Delay
• Once a bit is put on a link, the time it
takes to go across the link.
• Depends on the speed with which the
electromagnetic signal (light) travels in
the medium -- 2 x 108 m/s in fiber.
• Propagation delay = distance/speed of
signal.
Queuing Delay
• At each intermediate node or router, a
packet is queued.
• Thus, it has to wait prior to
transmission.
• How long does it have to wait ?
Dependent on the load on the network -how many packets are traversing that
router ?
Latency
• How long does a packet take to go
from one host to another.
• Also called “Delay”.
Latency = Propagation Delay +
Queueing Delay +
Transmission Delay
Round Trip Time
• Packet is sent from sender to receiver.
• Receiver sends ACK (assume immediately)
to sender.
• Total time delay incurred between the
instance the packet is set to the time
the ACK is received.
• Note if forward delay = backward
delay, RTT = 2 * Latency (typically
assumed -- although not always
accurate).
Bandwidth Delay Product
Delay
Bandwidth
• Think of this as a pipe.
• How much does the pipe
hold in bits ?
• In essence, if I send a
stream of bits, the first
bit traverses the bit in
“Delay” seconds.
• In the meantime, how
many more bits can I
send ?
Example
• For a transcontinental channel -- latency
= 50 milliseconds.
• Bandwidth = 45 Mbps.
• Bandwidth delay product =
50 x 10-3 x 45 x 106
= 2.25 Mbits
• We can transmit 2.25 M bits before the
first bit reaches the other end of the
channel !
What if ACK is expected ?
• Note if ACK is expected, how many
bits can the user transmit before
he expects to have an ACK ?
• RTT X Bandwidth
• For symmetric channels 2 X Delay
X Bandwidth.
Throughput
• Defines how efficiently channel is
being used.
Throughput = Transfer size/
Transfer time.
What is the transfer time ?
RTT + (Transfer size/Bandwidth)
(ignoring queuing delays).
Example
• 1 MB file over a 1 Gbps network
with RTT 100 milliseconds.
• Transfer time = 100 ms + (1
MB/1Gbps) = 100 ms + 8 ms = 108
ms.
• Effective throughput = 1 MB/108
ms = 74.1 Mbps.
Impact of data size
• If data size increases,
(Transfer size/Bandwidth) increases.
• Could become much larger than RTT.
• In that case, Throughput ~ (Transfer
size /(Transfer size/Bandwidth) ~
Bandwidth!
• Bottomline : Throughput increases with
data transfer size.
APIs and Sockets
• Network protocols implemented as a
part of the OS.
• API -- Interface that OS provides
to the networking subsystem.
• This interface is exported to the
user or the application process.
Socket Interface
Application
Presentation
Appl
User
Process
Application
Details
Session
Socket
Transport
TCP/UDP
Network
IP
Link
Physical
Device
Drivers/HW
Kernel
Process
Communication
Details
A note about sockets
• Data through sockets -- similar to
writing to a file.
• Sockets were originally in BSD
(Berkeley software development)
but now are popular in almost all
OS.
• Rest of sockets: Read book, Labs.