Transport Protocols for Networked Games

Similar documents
Guide To TCP/IP, Second Edition UDP Header Source Port Number (16 bits) IP HEADER Protocol Field = 17 Destination Port Number (16 bit) 15 16

TCP over wireless links

Outline Computer Networking. TCP slow start. TCP modeling. TCP details AIMD. Congestion Avoidance. Lecture 18 TCP Performance Peter Steenkiste

8. TCP Congestion Control

Intro to LAN/WAN. Transport Layer

05 Transmission Control Protocol (TCP)

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 30, 2018

file:///c:/users/hpguo/dropbox/website/teaching/fall 2017/CS4470/H...

CS419: Computer Networks. Lecture 10, Part 3: Apr 13, 2005 Transport: TCP performance

ETSF10 Internet Protocols Transport Layer Protocols

UNIT IV -- TRANSPORT LAYER

TCP: Flow and Error Control

Networked Systems and Services, Fall 2017 Reliability with TCP

Chapter 24. Transport-Layer Protocols

Networked Systems and Services, Fall 2018 Chapter 3

TCP/IP Performance ITL

TCP/IP. Chapter 5: Transport Layer TCP/IP Protocols

ECE 435 Network Engineering Lecture 10

bitcoin allnet exam review: transport layer TCP basics congestion control project 2 Computer Networks ICS 651

Transport Protocols & TCP TCP

Internet Networking recitation #10 TCP New Reno Vs. Reno

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 25, 2018

CS321: Computer Networks Error and Flow Control in TCP

Outline. CS5984 Mobile Computing

Impact of transmission errors on TCP performance. Outline. Random Errors

CMPE150 Midterm Solutions

ETSF05/ETSF10 Internet Protocols Transport Layer Protocols

User Datagram Protocol (UDP):

Transport Protocols and TCP: Review

Mobile Transport Layer Lesson 10 Timeout Freezing, Selective Retransmission, Transaction Oriented TCP and Explicit Notification Methods

EE 122: Transport Protocols. Kevin Lai October 16, 2002

Lecture 3: The Transport Layer: UDP and TCP

Overview. TCP congestion control Computer Networking. TCP modern loss recovery. TCP modeling. TCP Congestion Control AIMD

Transport layer. UDP: User Datagram Protocol [RFC 768] Review principles: Instantiation in the Internet UDP TCP

Transport layer. Review principles: Instantiation in the Internet UDP TCP. Reliable data transfer Flow control Congestion control

Page 1. Review: Internet Protocol Stack. Transport Layer Services. Design Issue EEC173B/ECS152C. Review: TCP

IIP Wireless. Presentation Outline

TCP Enhancements in Linux. Pasi Sarolahti. Berkeley Summer School Outline

Transport Layer Congestion Control

TCP. CSU CS557, Spring 2018 Instructor: Lorenzo De Carli (Slides by Christos Papadopoulos, remixed by Lorenzo De Carli)

Introduction to Networking. Operating Systems In Depth XXVII 1 Copyright 2017 Thomas W. Doeppner. All rights reserved.

Page 1. Review: Internet Protocol Stack. Transport Layer Services EEC173B/ECS152C. Review: TCP. Transport Layer: Connectionless Service

An In-depth Study of LTE: Effect of Network Protocol and Application Behavior on Performance

Problem 7. Problem 8. Problem 9

Computer Networking Introduction

Basic Reliable Transport Protocols

TCP Congestion Control 65KB W

An Empirical Evaluation of TCP Performance in Online Games

Congestion control in TCP

6.033 Computer System Engineering

Lecture 4: Congestion Control

Transport Layer: Outline

Wireless TCP Performance Issues

Page 1. Goals for Today" Discussion" Example: Reliable File Transfer" CS162 Operating Systems and Systems Programming Lecture 11

Congestion Avoidance and Control. Rohan Tabish and Zane Ma

TCP Performance. EE 122: Intro to Communication Networks. Fall 2006 (MW 4-5:30 in Donner 155) Vern Paxson TAs: Dilip Antony Joseph and Sukun Kim

Transport Layer. -UDP (User Datagram Protocol) -TCP (Transport Control Protocol)

Transport Layer Chapter 6

ECE697AA Lecture 3. Today s lecture

Question 1 (6 points) Compare circuit-switching and packet-switching networks based on the following criteria:

Transport layer issues

EECS 122, Lecture 19. Reliable Delivery. An Example. Improving over Stop & Wait. Picture of Go-back-n/Sliding Window. Send Window Maintenance

Transport Layer: outline

End-to-End Protocols. Transport Protocols. User Datagram Protocol (UDP) Application Layer Expectations

CIS 632 / EEC 687 Mobile Computing

Placement of Function in a Best Effort World. Course Logistics Update

Lecture 7: Flow Control"

EE 122: Transport Protocols: UDP and TCP

Overview. TCP & router queuing Computer Networking. TCP details. Workloads. TCP Performance. TCP Performance. Lecture 10 TCP & Routers

Problem. Chapter Outline. Chapter Goal. End-to-end Protocols. End-to-end Protocols. Chapter 5. End-to-End Protocols

Transport Layer TCP / UDP

TCP Service Model. Today s Lecture. TCP Support for Reliable Delivery. EE 122:TCP, Connection Setup, Reliability

Fast Retransmit. Problem: coarsegrain. timeouts lead to idle periods Fast retransmit: use duplicate ACKs to trigger retransmission

TCP : Fundamentals of Computer Networks Bill Nace

Chapter 7. The Transport Layer

CS457 Transport Protocols. CS 457 Fall 2014

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

Lecture 15: TCP over wireless networks. Mythili Vutukuru CS 653 Spring 2014 March 13, Thursday

Reliable Transport II: TCP and Congestion Control

CS 344/444 Computer Network Fundamentals Final Exam Solutions Spring 2007

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

INF5071 Performance in Distributed Systems Protocols

CS4700/CS5700 Fundamentals of Computer Networks

TCP congestion control:

TCP Adaptive Retransmission Algorithm - Original TCP. TCP Adaptive Retransmission Algorithm Jacobson

Lecture 5: Flow Control. CSE 123: Computer Networks Alex C. Snoeren

Computer Networks. Wenzhong Li. Nanjing University

CCNA R&S: Introduction to Networks. Chapter 7: The Transport Layer

Computer Networks and Data Systems

Communication Networks

CS 640 Introduction to Computer Networks. Role of data link layer. Today s lecture. Lecture16

TCP so far Computer Networking Outline. How Was TCP Able to Evolve

Advanced Network Design

Chapter 3 Transport Layer

CSC 4900 Computer Networks: TCP

Mobile Transport Layer Lesson 02 TCP Data Stream and Data Delivery

Transport Protocols and TCP

Protocol Overview. TCP/IP Performance. Connection Types in TCP/IP. Resource Management. Router Queues. Control Mechanisms ITL

Chapter 24 Congestion Control and Quality of Service 24.1

TCP/IP Protocol Suite 1

Transcription:

Transport Protocols for Networked Games 1

TCP or UDP? 2

Why use TCP? TCP provides reliable, in-order delivery TCP goes through most firewalls, UDP does not TCP manages connection for us 3

Why not to use TCP? TCP incur higher latency Don t always need reliability and in-order delivery High header overhead 4

position = 10 position = 13 X position = 15 Updated position not delivered to application until (outdated) lost packet is received 5

Gesture from someone far away need not be received reliably. 6

A study on ShenZhou Online shows that 46% of the bandwidth is occupied by TCP header 7

enet.cubik.org A library that provides reliability, sequencing, connection managements over of 8

Delivery can be streamoriented (like TCP) or message-oriented (like UDP) 9

Supports partial reliability enet_packet_create ( abc, 4, ENET_PACKET_FLAG_RELIABLE) 10

Retransmission triggered by Timeout based on RTT 11

Data in queue are bundled into one packet if there is space 12

enet.cubik.org Portable, easy to use, but still, most firewalls block UDP traffic 13

MMORPG that uses TCP: WoW, Lineage I/II, Guild Wars, Ragnarok Online, Anarchy Online, Mabinogi MMORPG that uses UDP: EverQuest, SW Galaxies, City of Heroes, Ultima Online, Asherons Call, FFXI 14

Need to study the use of TCP for networked games 15

How to provide reliability over UDP? 16

How slow is TCP, really? Which part of TCP is the root of slowness? 17

A Quick Review of TCP 18

s=100 s=200 s=300 s=400 a=300 a=500 TCP Delayed ACK 19

TCP Spec: max 500ms delay Most implementation: 200ms 20

Why delay ACK? reduce num of ACKs in case receiver wants to send data within 200ms (in which case it can piggyback the ACK with data) give sender time to buffer more data for sending (avoid silly window syndrome) 21

s=100 s=200 s=300 s=400 s=500 X a=200 a=200 a=200 a=200 s=200 TCP Fast Retransmission 22

Definition of Dup ACKs in 4.4BSD and Al Stevens: pure ACK, cannot piggyback with data 23

TO X X 2x TO TCP Timeout + Exponential Back-off 24

TO Spurious Retransmission 25

RTO estimation Ei = 7Ei-1/8 + RTT/8 Vi = 3Vi-1/4 + RTT-Ei-1 /4 RTO = max(ei + 4Vi, 1s) 26

Linux s RTO estimation = 7Ei-1/8 + RTT/8 Ei Vi = 3Vi-1/4 + RTT-Ei-1 /4 RTO = max(200ms, Ei + min(vi, 50ms) 27

Note: Delayed ACK => increase RTT => increase RTO 28

Congestion Control 29

Window Size Packet Loss Time TCP Congestion Control 30

Congestion Window reset to 2 after an idle period (> RTO) 31

What does real game traffic look like? 32

33

Max Application Delay Max RTT 250ms Avg RTT 34

35

About 4 packets / sec 36

Average Payload: 100 Bytes 37

Loss Rate 1% 38

But some experience 6 retransmissions 39

ShenZhou Online 40

41

42

43

Similar stats for other games 44

45

46

Thin Streams 47

Findings 1: Fast retransmission rarely triggered 48

In ShenZhou Online traces, fail to trigger fast retransmission because insufficient dup ACK (50%) interrupted by data (50%) 49

Findings 2: Delay due mostly to timeout 50

51

Findings 3: Congestion Window reset is frequent 52

12% - 18% of packets faces window reset 53

think.. think.. think.. click (tank attack here) click (missle launch there) click (charge soldiers) The last command is delayed as congestion window = 2 54

How to make TCP (or, transport protocol) go faster in these games? 55

1. Remove exponential backoff 56

TO X X TO TCP Timeout 57

2. Make RTO Smaller 58

make sure minimum RTO is not 1s 59

spurious retransmission is not disastrous 60

3. Make Fast Retransmit Faster 61

s=100 s=200 s=300 s=400 s=500 X a=200 a=200 a=200 a=200 s=200 Retransmit after one duplicate ACK 62

4. Retransmission Bundling 63

X Retransmit all unacknowledge data in queue 64

5. Redundant Data Bundling 65

X a=300 a=500 Send any unacknowledged segment in queue as long as there is space. Lost data gets recovered in the next transmission before retransmission. 66

6. Turn off or reduce Delayed ACKs 67

Packet interarrival time on average > 200ms (can t combine two ACKs into one) 68

7. Combine Thin Streams into Thicker Stream 69

Server Proxy 70

Transport for Games 71

Transport for Games remove exponential backoff 71

Transport for Games remove exponential backoff reduce RTO 71

Transport for Games remove exponential backoff reduce RTO make fast retransmit faster 71

Transport for Games remove exponential backoff reduce RTO make fast retransmit faster retransmit agressively 71

Transport for Games remove exponential backoff reduce RTO make fast retransmit faster retransmit agressively don t delay ACK 71

Transport for Games remove exponential backoff reduce RTO make fast retransmit faster retransmit agressively don t delay ACK combine into thick streams 71