Download presentation
Presentation is loading. Please wait.
Published byThomasina Todd Modified over 9 years ago
1
Lect3..ppt - 09/12/04 CIS 4100 Systems Performance and Evaluation Lecture 3 by Zornitza Genova Prodanoff
2
ZGP002 Lecture Outline Chapter 2: Types of networks Network protocols Client/Server Model Peer-to-Peer Model Web services protocols
3
ZGP003 Communication Protocols Communication is between two remote processes Protocol is a set of rules –Addressing –Routing –Error detection –Error recovery –Sequence control –Flow control
4
ZGP004 Communication Protocols (Continued) Connection oriented protocols (e.g. TCP) –Brake the message into fragments –Once connection is established no fragment routing occurs –Ensure that all fragments are processed in original order –Used for applications communicating through large messages Connectionless protocols (e.g. UDP) –Each message is routed independently –Used when messages are smaller than the max. fragment size –Order of arrival is not important - a single fragment is sent
5
ZGP005 Protocol specification Syntax: message format and fields (bits) designation Semantics: actions taken by each entity when events occur E.g. fragment loss, timeout, message arrival Complex design – Solution: use layered approach - Abstract from details (at each layer) and let the protocols at other layers handle them Communication Protocols (Continued)
6
ZGP006 Type of Networks (Continued)
7
ZGP007 Client/Server Performance (continued)
8
ZGP008 The two most important protocols in the Internet are the Internet Protocol (IP) and the Transmission Control Protocol (TCP) - Suite of protocols known as TCP/IP Figure 2.7 shows the layering of important TCP/IP-based protocols IP is a network layer protocol on top of which we find two transport layer protocols: TCP-a connection-oriented protocol- and User Datagram Protocol (UDP)-a connectionless protocol Simple Mail Transfer Protocol (used to send e-mail), and Telnet (an interactive login protocol) use TCP Network File System (NFS) [8], Domain Name Server (DNS), and Simple Network Management Protocol (SNMP) are built on top of UDP Communication Protocols: Internet Protocols
9
ZGP009 Client/Server Performance (continued)
10
ZGP0010 Internet Protocol: Specifies formats of packets sent across the Internet Connectionless protocol Source to destination forwarding of packets (called datagrams) Every host connected to the Internet has a unique address, called IP Address Address representation is dotted decimal notation, e.g. 129.2.0.37 Prefix (identifies a network) and suffix (identifies a host) address bits Communication Protocols: IP
11
ZGP0011
12
ZGP0012 Client/Server Performance (continued)
13
ZGP0013 Transport Control Protocol: Connection oriented protocol TCP guarantees that all the packets of a message are received in their original sequence TCP guarantees that data is delivered without loss or modification of bits Packets are called segments Connection establishment through three-way-handshake Full-duplex communication Communication Protocols: TCP
14
ZGP0014 Client/Server Performance (continued)
15
ZGP0015 TCP uses ACKs (acknowledgement messages), timeouts, and retransmissions for error control ACK are cumulative Flow control is implemented by TCP through a sliding window mechanism -The window size is the maximum number of bytes that can be sent before an acknowledgement is received -Window size is limited by the buffer size at the receiver by network congestion as estimated by the sender Communication Protocols: TCP
16
ZGP0016 B is limiting bandwidth RTT is round trip time MSS is maximum segment size W c is the current window size W m is the maximum window size (prevents buffer overflow) W c doubles every RTT but cannot exceed the receivers window W m Communication Protocols: TCP
17
ZGP0017 “Sliding window” flow control The rate with which sender can send data is determined by the rate of incoming ACKs for previous segments The rate of incoming ACKs is determined by the bottleneck in the round trip path (destination or the network) W m is advertised by the receiver If network congestion is detected, the sender will reduce its window size W c to reduce its transmission rate Communication Protocols: TCP
18
ZGP0018 Client/Server Performance (continued)
19
ZGP0019 Slow start phase and Congestion avoidance phase Consider Figure 2.10 During slow start Wc is initialized to one segment and is increased by one for every ACK received Once segments are sent an ACK is received after one RTT unit Wc doubles every RTT unit Communication Protocols: TCP (continued)
20
ZGP0020 Network congestion can be detected by TCP through −the receipt of a duplicate ACK, which indicates that the receiver received an out-of-sequence segment −or by a timeout at the sender The current value of the window size is saved in a variable called slow start threshold window size, W ssthr, and W c, is reduced TCP Reno: If a duplicate ACK is received, W, is divided by two and TCP enters congestion avoidance phase (described in Figure 2.11) TCP Reno: If a timeout occurs, Wc is set to one and TCO goes back to slow start Communication Protocols: TCP (continued)
21
ZGP0021 When Wc reaches Wssthr, TCP enters congestion avoidance During congestion avoidance the window size Wc is incremented by one every RTT unit Communication Protocols: TCP (continued)
22
ZGP0022 In the example of Fig. 2.11, a duplicate ACK is received at time 5. Then, half of the current value of Wc, i.e., 8, is stored in Wssthr and the TCP connection enters a congestion avoidance phase. Another duplicate ACK is received at time 20. The value of Wssthr is set to 7 (14 / 2). If a timeout occurs, then Wc, is set to one and TCP goes back to slow start Communication Protocols: TCP (continued)
23
ZGP0023 In Fig. 2.11, a timeout occurred at time 10 and the TCP connection enters a slow start phase When Wc, reaches Wsethr during slow start, TCP switches to congestion avoidance. For example, at time 13 in Fig. 2.11, Wc, reaches the current value of Wssthr, which is 8, and the connection enters a congestion avoidance phase. Communication Protocols: TCP (continued)
25
ZGP0025 TCP and congestion control The throughput X TCP of a TCP connection, measured in segments per second −decreases with RTT, −decreases with the probability p that packets are dropped −increases with the receiver advertised window size Wr measured in segments −decreases with the value of the TCP timeout To ( Based on Padhye’s expression for X TCP for a TCP Reno connection) A Model is implemented in the TCPModel. XLS Communication Protocols: TCP (continued)
26
ZGP0026 Communication Protocols: TCP (Continued) Fig. 2.12 shows variation of the TCP throughput in KB/sec as a function of p and for four values of W m : 10, 20, 30, and 40 segments TCP timeout (To) = 2 seconds Maximum segment size of 1,460 bytes Limiting bandwidth of the connection between sender and receiver equal to 12,500 KB/sec RTT = 0.04 seconds
27
ZGP0027 Client/Server Performance (continued)
28
ZGP0028 Communication Protocols: TCP (Continued) As W m increases, the throughput increases The benefits of a larger window decrease as the packet loss probability increases because more data has to be retransmitted in case of packet losses
29
ZGP0029 The best-case throughput of a TCP connection is obtained when the window size W c, reaches the receiver maximum window size W m and no congestion occurs The throughput is given by segments per second or bytes/sec where MSS is the maximum segment size The throughput of a TCP connection cannot exceed the limiting bandwidth B, in bytes/sec, of the network connecting the sender and receiver => Communication Protocols: TCP (Continued)
30
ZGP0030 Then, the maximum throughput is achieved when the windows size given in segments, is equal to The numerator is called the bandwidth-delay product. During slow start, TCP operates with windows that are below the window size that would be achieved during congestion avoidance. −problem for short-lived connections that may never achieve the maximum throughput under an optimal window size Communication Protocols: TCP (Continued)
31
ZGP0031 Table 2.1 shows the bandwidth-delay product, and the optimum receiver window size,, in segments, assuming a segment size of 1,460 bytes, for various types of networks. As shown by the table, high-bandwidth, low-latency networks require large window sizes for the throughput of the TCP connection to use as much of the network bandwidth as possible. Communication Protocols: TCP (Continued)
32
ZGP0032 Client/Server Communication
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.