计算机网络第六部分--网络性能问题(英文版本)

Issues on Network Performance

  • Bandwidth and throughput 带宽和吞吐量
  • Latency 延迟
    • propagation传播 delay
    • transmission delay
    • queuing delay
    • Experience from some question example
  • Delay Analysis
    • Circuit switching network 电路交换网络
    • Packet switching network
    • Some questions
      • store -and-forward switch
      • Cut-through switch
  • Flow Control
    • Stop and Wait Protocol
    • Stop and Wait with ARQ (automatic repeat request)
      • Link Parameter
      • Link utilization
      • Question
    • Sliding Window Protocol
      • Link utilization
      • error control scheme: go-back-N ARQ
      • error control scheme: selective reject ARQ

Bandwidth and throughput 带宽和吞吐量

  • bandwidth
    – the number of bits per unit time that can be transmitted over the channel 单位时间内传输的比特数 measures in bps (bits per second)
  • throughput
    – the rate of successful message delivery over a communication channel

the bandwidth is often used as a measure of the network performance because it is the maximum value of throughput.

factors that affect bandwidth:
– physical/electrical characteristics of the network
– software overhead开销 required for handling data
– load of the network 网络负载

Latency 延迟

  • the latency (delay) of a system is the length of time it takes to send a message from one end of the system to the other end 一个系统的终点到另一个系统的终点,一定要牢记end
    注意理解,这个延迟的意思其实就是传输的时间罢了。

  • the latency is defined as either:
    – the time the first bit is sent to the first bit is received
    – the time the first bit is sent to the last bit is received

  • Latency L=P+T+Q
    L: propagation delay
    T: transmission delay
    Q: queuing排队 delay
    by calculating each terms, can determine relative (相对的) importance of each factors, identify the dominant factors in latency 通过计算可以确定每个因素的重要性,确定延迟的主导因素。

  • the latency that is achieved in practice is called the throughput, which is measured **‘end to end’ **
    之所以可以说它在实际中就是吞吐量,其实就是因为吞吐量就是数据量除以延迟(transfer to destination)

  • 在后面的计算中,latency其实就是transmission time

propagation传播 delay

the time required for the fist bit of the message to arrive at the destination, while the transmission delay accounts for the length of the message

  • P = d/c
    d is the distance of medium over which the data travels
    c is the speed of light: 3.0 × 1 0 8 3.0 \times 10^8 3.0×108 m/s in vacuum; 2.0 × 1 0 8 2.0\times 10^8 2.0×108m/s — signal by wire
    (e.g.) RTT: round trip time::
    e.g.:quarter of a second for a single bit, earth to satellite in geostationary orbit (at 3.6 × 1 0 7 3.6 × 10^7 3.6×107 m) above the equator,赤道 then back to the earth

transmission delay

transmission delay accounts for the length of the message
if we want to calculate the time the first bit is sent to the last bit is received, then we use both the propagation delay and the transmission delay

the length of time required to transmit a unit of data (e.g., a packet, a number of packets)

  • T = s/b
    s is the data size
    b is the bandwidth at which the data is transmitted

queuing delay

  • switching delay: electrical devices in a network (网桥,交换机等)
  • an electrical device must wait until all the bits of a packet have arrived, and then requires some time to choose the next stage in transmission
  • access delay: most LANs use shared media共享媒体, a node must wait until the medium is available

Experience from some question example

  • RTT 其实就是2倍的传播延迟。
  • 计算一个“transfer to destination”时间应该是二分之一RTT加上transmission delay
  • transmission delay是data size除以带宽。注意单位转换
  • 有的时候会让你比较哪个因素主导了延迟,那么就比较RTT和transmission delay,悬殊比较大,大的那个就是主导因素
  • 吞吐量就等于(传输的数据量)/(time of transfer to destination)记得保留单位

Delay Analysis

Circuit switching network 电路交换网络

  • a dedicated circuit established between two hosts before communication starts
  • all communication between hosts only takes place over this circuit, ignore other possible routes
  • functions the same way no matter how many intermediate中间 switches are passed through
  • used as long as needed then terminated
  • send a message another time, establish a new circuit. new one may have a different route with different switches, depending on what is available at that time
    计算机网络第六部分--网络性能问题(英文版本)_第1张图片

Circuit switching
计算机网络第六部分--网络性能问题(英文版本)_第2张图片

Packet switching network

Message switching

  • each switch waits until it receives the entire message
  • once it receives the complete message it transmits the same over the next link

Packet switching

  • a special case of message switching where the message is broken into smaller pieces
  • each switch starts transmission as soon as the first packet of the message has been arrived
  • save the enormous巨大的 amount of time especially when there are many hops between source and destination

计算机网络第六部分--网络性能问题(英文版本)_第3张图片
Packet switching network

  • no circuit is set up prior
  • packet could be routed as combined or fragmented碎片化
  • packet may take any number of paths as it travels through from one switch to another
  • channel is available for many users, but may cause congestion
  • on the receiving end, data will be reassembled into the original message

计算机网络第六部分--网络性能问题(英文版本)_第4张图片

Packet Switching
计算机网络第六部分--网络性能问题(英文版本)_第5张图片

Some questions

store -and-forward switch

计算机网络第六部分--网络性能问题(英文版本)_第6张图片

  • 按照图来想可能会有些迷惑,不如按照直觉来考虑。传输一个包,首先要考虑这个东西有多长,也就是transmission delay,再考虑传过去需要多久也就是propagation delay,然后再加上处理速度也就是retransmission time。这就是从出发点到一个switch需要考虑的东西。到终点的时候就不需要retransmission了。
    计算机网络第六部分--网络性能问题(英文版本)_第7张图片
    计算机网络第六部分--网络性能问题(英文版本)_第8张图片

  • 把一个包分成多个包来传的时候,可以只考虑为第一个包的transmission time再加上后面几个包的transmission delays。因为只有第一个包是需要等到它完全到了才能retransmit,其他的包只是跟在后面的而已。只需要再加上因为他们的长度带来的transmission delay即可

  • 可以忽略packet headers所带来的overheads

Cut-through switch

able to start retransmission before the whole packet is received,这里说的并不是把大包分成小包传送的那种情况,而是每个小包它都可以立马传送而不必等着这个包必须收到。
计算机网络第六部分--网络性能问题(英文版本)_第9张图片
考虑第一个bit先传,剩下的那些bit所需要的时间也就是transmission delay500微秒是跟在第一个bit的后面。只需要算第一个bit的总的latency。可以画个图发现,propagation time需要四次,三个交换机处理三次20微妙的交换。最后加上它即可。
这个思想和之前的packet很像。都是只考虑第一个,剩下的由于信息长度带来的传输时延直接加上去就可以了。

Flow Control

a sender should not transmit data frames faster than the recipient can accept

Stop and Wait Protocol

  • transmit one frame, wait for ACK from the recipient before sending next frame
  • problem: ACK may be lost, or any error occurs during the transmission
    this simple flow control protocol may break down, thus requiring some error control scheme

Stop and Wait with ARQ (automatic repeat request)

  • if a recipient detects any transmission error, it discards丢弃 the frame and returns NAK (negative ACK), causing the sender to retransmit the frame
  • a sender uses a timer
    a sender retransmits the frame in case it does not reach the recipient (or ACK does not arrive at the sender’s side) before the timeout
  • problem: suppose that frame transmission was successful but ACK was failed
    timeout is causing the sender to retransmit the frame
    to avoid accepting multiple copies, frames and ACKs are alternatively labelled 0 or 1
    计算机网络第六部分--网络性能问题(英文版本)_第10张图片

Link Parameter

a = P / T a=P/T a=P/T
P: propagation delay P (sec)
T: transmission delay T (sec)

can be written as a = d b / c s a=db/cs a=db/cs
d: length of medium (m)
b: bandwidth (i.e., data rate, bps)
c: speed of propagation (m/sec)
s: data size (i.e., frame length, bits)

Link utilization

计算机网络第六部分--网络性能问题(英文版本)_第11张图片

  • assuming that queuing delay is sufficiently small
  • a frame requires P+T, while ACK transmits in P
  • measuring the efficiency of a network
  • stop and wait protocol is not efficient when a link parameter a is large
    计算机网络第六部分--网络性能问题(英文版本)_第12张图片
    按照图中来理解link utilization的公式含义。

Question

计算机网络第六部分--网络性能问题(英文版本)_第13张图片
注意单位更换!牢记公式

Sliding Window Protocol

Sliding window

  • frame and ACK are assigned with sequence numbers
  • transmit window : a list of frame numbers a sender is allowed to transmit
    when the transmit window size is N, a sender can transmit up to N frames without receiving an ACK
  • receive window : a list of frame numbers a recipient is prepared to accept
  • ‘ACK i’ (i < N) indicates that the recipient:
    has received frames 0, 1, . . . , i−1 correctly;
    is ready to receive frame i and the rest within the receive window size of N;
  • the recipient does not need to acknowledge every frame

计算机网络第六部分--网络性能问题(英文版本)_第14张图片

就我个人的理解,收到了ACK,sender才会将自己的窗口滑动,没收到的话不滑动。
而receiver也是在发送后滑动自己的窗口。并且只能在窗口里接收帧

Link utilization

计算机网络第六部分--网络性能问题(英文版本)_第15张图片

  • assuming no error
  • can achieve efficient transmission even for a large link parameter a by using a large window size N
    计算机网络第六部分--网络性能问题(英文版本)_第16张图片

error control scheme: go-back-N ARQ

  • a special case of sliding window protocol with the transmit window size of N and the receive window size of 1
  • the sender can transmit up to N frames before receiving ACK
  • if frame i is damaged, the recipient requests retransmission of all frames starting frame i
    计算机网络第六部分--网络性能问题(英文版本)_第17张图片

给我的感觉就是,任凭你发,我全都discard。两边有个时间延迟。左边不停发发发,直到收到了NAK才会重新发东西。但是因为自己也没有收到ACK,所以窗口不会滑动。

error control scheme: selective reject ARQ

  • both transmit and receive window sizes greater than 1
  • sender can transmit N frames before receiving ACK
  • a recipient
    selectively rejects corrupted损坏的 frames
    informs the sender by NAK
    accepts out-of-order frames and buffers them其实就是继续接收并缓存
  • the sender retransmits frames
    that are timed out
    for which NAK has been returned

计算机网络第六部分--网络性能问题(英文版本)_第18张图片
左边的窗口在收到NAK2之后就没有滑动了,直到收到了ACK1代表右边已经正确收到了那一帧1之前的所有帧,此时左边的窗口才继续滑动。
并且这个也是左边可以一直发N个before receiving ACK。其实ACK也只是代表了说左边的窗口可以继续滑动了。而不是说你该发哪个,因为右边已经接收到了。

就个人理解,滑动窗口进行差错控制的意义其实就是能保证错误不会继续。只要错误不被更正,窗口就不会滑动,而窗口不滑动的话新的数据就不能发送

你可能感兴趣的:(计算机网络第六部分--网络性能问题(英文版本))