Exploring the Performance Impact of. QoS Support in TCP/IP Protocol Stacks. Robert Engely, Dilip Kandlury, Ashish Mehraz, and Debanjan Sahay.

Similar documents
On the Performance Impact of. Supporting QoS Communication in TCP/IP Protocol Stacks

Design and Implementation of an RSVP based Quality of Service. Architecture for Integrated Services Internet

Exploring the Performance Impact of QoS Support in TCP/IP Protocol Stacks

Frank Miller, George Apostolopoulos, and Satish Tripathi. University of Maryland. College Park, MD ffwmiller, georgeap,

\Classical" RSVP and IP over ATM. Steven Berson. April 10, Abstract

FB(9,3) Figure 1(a). A 4-by-4 Benes network. Figure 1(b). An FB(4, 2) network. Figure 2. An FB(27, 3) network

Utilizing Linux Kernel Components in K42 K42 Team modified October 2001

March 6, 2000 Applications that process and/or transfer Continuous Media (audio and video) streams become

Mohammad Hossein Manshaei 1393

Protocol Architecture for Multimedia Applications over ATM. Networks. IBM Thomas J. Watson Research Center. Yorktown Heights, NY 10598

Real-Time Protocol (RTP)

Quality of Service in the Internet

100 Mbps DEC FDDI Gigaswitch

Multimedia Applications Require Adaptive CPU Scheduling. Veronica Baiceanu, Crispin Cowan, Dylan McNamee, Calton Pu, and Jonathan Walpole

Module objectives. Integrated services. Support for real-time applications. Real-time flows and the current Internet protocols

Network-Adaptive Video Coding and Transmission

Configuring QoS. Understanding QoS CHAPTER

Networks. Wu-chang Fengy Dilip D. Kandlurz Debanjan Sahaz Kang G. Shiny. Ann Arbor, MI Yorktown Heights, NY 10598

Congestion Management Overview

Number of bits in the period of 100 ms. Number of bits in the period of 100 ms. Number of bits in the periods of 100 ms

Advanced Computer Networks

Chapter III. congestion situation in Highspeed Networks

G Robert Grimm New York University

CHAPTER 3 EFFECTIVE ADMISSION CONTROL MECHANISM IN WIRELESS MESH NETWORKS

Quality of Service in the Internet

RSVP 1. Resource Control and Reservation

QUALITY of SERVICE. Introduction

Resource Control and Reservation

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

Quality of Service Mechanism for MANET using Linux Semra Gulder, Mathieu Déziel

ip rsvp reservation-host

Eect of fan-out on the Performance of a. Single-message cancellation scheme. Atul Prakash (Contact Author) Gwo-baw Wu. Seema Jetli

Networking Quality of service

Multimedia Networking

Extensions to RTP to support Mobile Networking: Brown, Singh 2 within the cell. In our proposed architecture [3], we add a third level to this hierarc

T H. Runable. Request. Priority Inversion. Exit. Runable. Request. Reply. For T L. For T. Reply. Exit. Request. Runable. Exit. Runable. Reply.

On the Use of Multicast Delivery to Provide. a Scalable and Interactive Video-on-Demand Service. Kevin C. Almeroth. Mostafa H.

Configuring QoS. Finding Feature Information. Prerequisites for QoS

V 1. volume. time. t 1

Using Time Division Multiplexing to support Real-time Networking on Ethernet

Resource Reservation Protocol

Performance of HTTP and FTP Applications over Local Area Ethernet and ATM Networks Edwin Law A thesis submitted in conformity with the requirements fo

Institute of Computer Technology - Vienna University of Technology. L73 - IP QoS Integrated Services Model. Integrated Services Model

Design Intentions. IP QoS IntServ. Agenda. Design Intentions. L73 - IP QoS Integrated Services Model. L73 - IP QoS Integrated Services Model

Quality of Service (QoS)

Multimedia-Systems. Operating Systems. Prof. Dr.-Ing. Ralf Steinmetz Prof. Dr. rer. nat. Max Mühlhäuser Prof. Dr.-Ing. Wolfgang Effelsberg

cell rate bandwidth exploited by ABR and UBR CBR and VBR time

Performance Comparison Between AAL1, AAL2 and AAL5

Configuring QoS CHAPTER

Lixia Zhang M. I. T. Laboratory for Computer Science December 1985

Provisioning: Configuring QoS for IP Telephony

A Predictable RTOS. Mantis Cheng Department of Computer Science University of Victoria

Chapter 9: Virtual Memory

Congestion in Data Networks. Congestion in Data Networks

QoS Configuration. Overview. Introduction to QoS. QoS Policy. Class. Traffic behavior

UNIT 2 TRANSPORT LAYER

Java Virtual Machine

Dynamic Multi-Path Communication for Video Trac. Hao-hua Chu, Klara Nahrstedt. Department of Computer Science. University of Illinois

Bridging and Switching Basics

Chapter 8: Virtual Memory. Operating System Concepts

What Is Congestion? Computer Networks. Ideal Network Utilization. Interaction of Queues

Quality of Service in the Internet. QoS Parameters. Keeping the QoS. Leaky Bucket Algorithm

The latency of user-to-user, kernel-to-kernel and interrupt-to-interrupt level communication

Last Class: RPCs and RMI. Today: Communication Issues

IX: A Protected Dataplane Operating System for High Throughput and Low Latency

Submitted for TAU97 Abstract Many attempts have been made to combine some form of retiming with combinational

Dynamics of an Explicit Rate Allocation. Algorithm for Available Bit-Rate (ABR) Service in ATM Networks. Lampros Kalampoukas, Anujan Varma.

Priority Traffic CSCD 433/533. Advanced Networks Spring Lecture 21 Congestion Control and Queuing Strategies

Configuring QoS CHAPTER

Multimedia Communications

Chapter 9: Virtual Memory. Operating System Concepts 9 th Edition

Receive Livelock. Robert Grimm New York University

Week 7: Traffic Models and QoS

Lab Exercise UDP & TCP

What Is Congestion? Effects of Congestion. Interaction of Queues. Chapter 12 Congestion in Data Networks. Effect of Congestion Control

Why You Should Consider a Hardware Based Protocol Analyzer?

Principles. IP QoS DiffServ. Agenda. Principles. L74 - IP QoS Differentiated Services Model. L74 - IP QoS Differentiated Services Model

Headend Station. Headend Station. ATM Network. Headend Station. Station. Fiber Node. Station. Station Trunk Splitter.

CSCI-GA Operating Systems. Networking. Hubertus Franke

Configuring Modular QoS Congestion Management on Cisco IOS XR Software

Unreliable NET. Application Layer. Transport Layer. packet flow. ack flow. Network Layer. Unreliable Net. Actual Loss Rate λ loss.

General comments on candidates' performance

Lecture 4 Wide Area Networks - Congestion in Data Networks

CSE398: Network Systems Design

of-service Support on the Internet

File Server Comparison: Executive Summary. Microsoft Windows NT Server 4.0 and Novell NetWare 5. Contents

RECOMMENDATION ITU-R BT.1720 *

Troubleshooting Transparent Bridging Environments

Chapter -6 IMPROVED CONGESTION CONTROL MECHANISM FOR REAL TIME DATA TRANSMISSION

Introduction to Real-Time Communications. Real-Time and Embedded Systems (M) Lecture 15

2 CHAPTER 2 LANs. Until the widespread deployment of ABR compatible products, most ATM LANs will probably rely on the UBR service category. To ll the

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

SMD149 - Operating Systems

In Proceedings of the 7th International Workshop on Network and Operating Systems Support for

Network Support for Multimedia

Optimizing Performance: Intel Network Adapters User Guide

Multimedia Applications over Packet Networks

Internet Architecture and Protocol

THE TRANSPORT LAYER UNIT IV

MQC Hierarchical Queuing with 3 Level Scheduler

Transcription:

Exploring the Performance Impact of QoS Support in TCP/IP Protocol Stacks Robert Engely, Dilip Kandlury, Ashish Mehraz, and Debanjan Sahay yibm T.J. Watson Research Center 30 Saw Mill River Rd Hawthorne, NY 10532 frengel,kandlur,debanjang@watson.ibm.com zreal-time Computing Lab Department of EECS The University of Michigan Ann Arbor, MI 48109 ashish@eecs.umich.edu Abstract Signicant eorts are being made by the Internet Engineering Task Force (IETF) to enhance the service model of the Internet to support integrated services for voice, video, and data transport. This is being done via a new resource reservation protocol (RSVP) and associated service classes for handling of trac at network routers and end hosts. Given that the new service model is expected to be widely deployed and utilized, it is important to understand the extent and nature of overheads imposed relative to the best-eort data path. This paper explores the performance impact of supporting QoS guarantees on communication in TCP/IP protocol stacks at end hosts, in the context of an RSVP-based QoS architecture for an integrated services Internet developed and implemented earlier by the authors. We rst demonstrate the ecacy of the architecture in providing the desired QoS to individual connections via application-level experiments on an ATM network. In these experiments we show the impact of our architecture on UDP sessions and TCP connections. We then identify and measure, via detailed kernel-based proling, the overheads imposed by all components comprising the QoS support provided, such as trac policing, trac shaping, and buer management. Our measurements reveal that trac policing overheads are largely oset by savings due to per-session buer pre-allocation, and, for ATM networks, a faster path through the network interface layer. In the latter case the data path latency for compliant packets can even be slightly smaller than the default best-eort data path latency. Trac shaping presents more challenges, primarily because of interaction with the operating system CPU scheduler. We discuss the performance implications of trac shaping and suggest techniques to reduce or mask some of the associated overheads. This work was performed while visiting the IBM T.J. Watson Research Center. 1

1 Introduction The rapid shift of the WWW (and the underlying Internet) from a text and graphics-oriented medium to one with live audio and video content, as evidenced by the emergence of applications such as InternetPhone and WebTV, has generated a signicant demand for \better than best-eort" Internet connectivity. Signicant eorts are being made by the Internet Engineering Task Force (IETF) to enhance the service model of the Internet to support integrated services for voice, video, and data transport [1]. This in turn implies that the existing communication subsystems running TCP/IP protocol stacks in Internet hosts be modied for QoS-sensitive trac handling according to integrated services standards. In this paper, we concentrate on the design and implementation of QoS support on Unix-like (i.e., those supporting a sockets based communication system) Internet servers, the typical sources of multimedia data on the Internet. In the IETF's vision, applications request and reserve resources in the network and at end hosts using an end-to-end receiver-initiated Resource ReSerVation Protocol (RSVP) [2, 3]. Resource management is performed via per-ow trac shaping and scheduling for various service classes [1], such as guaranteed service [4] that provides guaranteed delay, and controlled load service [5] that has more relaxed QoS requirements. The guaranteed service is intended for applications requiring rm guarantees on loss-less on-time datagram delivery. The controlled load service, on the other hand, is designed for the broad class of adaptive real-time applications (such as vic, vat, nevot, etc.), in active use on the Internet today, that are sensitive to network overload conditions. In earlier work we have designed and implemented architectural extensions to the sockets-based communication subsystem that enable RSVP-based integrated services infrastructure in the Internet [6]. One of the primary goals of our service architecture is to blend the QoS support with the existing TCP/IP stack and socket API, preserving the structure of the Unix networking subsystem. Applications not needing QoS support for communication should continue to run as is, and yet the QoS extensions should allow new applications to benet from QoS enhanced network services. Further, control overheads for QoS support should not have any detrimental impact on data path throughput. Our design is also inuenced by the observation that with the rapid penetration of the Web, potentially any Internet site can be a content provider, and hence a source of multimedia data. This implies a wide variation in the capabilities of the Internet hosts and their connections to the Internet (network interfaces and links). Thus, the design must scale from small to large number of connections and accommodate network interfaces with widely diering capabilities. One of the primary goals of the architecture is to provide better service for QoS trac, but not at the expense of best-eort trac. 1 We have developed a prototype implementation of our QoS architecture on RS/6000 based servers running AIX release 4.2 and equipped with ATM and IEEE 802.5 token ring adapters. Our prototype system supports rsvp-based QoS signaling and several ietf dened QoS classes, with appropriate enhancements to the communication subsystems at the hosts (clients and servers) in the control as well as data planes of the protocol stack. The hosts are connected via prototype routers based on atm switches enhanced for ip routing and ietf standards compliant QoS classes. Given that the new service model will be widely deployed and utilized, it is important to understand the extent and nature of overheads imposed by these enhancements relative to the best-eort data path. 1 We are primarily concerned with servers, and hence the data transmission path. 2

That is, we are interested in ascertaining the performance impact on connections using integrated services in TCP/IP protocol stacks at end hosts to obtain QoS. Our QoS architecture has been carefully designed to have minimal impact on the default best-eort data path, which must remain as ecient as possible to maximize application throughput. The complexity and the overhead of supporting QoS is a critical factor that will ultimately determine the future evolution of integrated services on the Internet. To the best of our knowledge, there has been no experimental study that analyzes and measures the overheads of oering such services. For this paper we focus on exacerbation of data path latency due to QoS overheads for a single connection relative to the best-eort data path. The examination of similar eects in the presence of multiple QoS connections is beyond the scope of this paper, and is being addressed in a forthcoming paper. The primary contributions of this paper are fourfold: we (i) present architectural mechanisms for trac policing, shaping, and buer management at end hosts, (ii) quantify the control and data path overheads introduced by various QoS components via detailed kernel proling, (iii) highlight the performance implications of these overheads, and (iv) look at the impact of policing and shaping on the transport layer protocols UDP and TCP. We demonstrate the ecacy of our architecture in providing QoS guarantees via application-level experiments. Our kernel-level measurements reveal that trac shaping presents the most challenges, if it needs to be performed in software. This is primarily because of reliance on OS timer mechanisms and possible interaction with the operating system CPU scheduler. We achieve very ecient trac classication on the outgoing path by carrying the necessary information with each packet as it traverses the protocol stack. A key observation is that trac policing and shaping overheads are largely oset by gains due to shorter data paths for QoS sessions relative to the best-eort sessions. These gains include (i) the savings due to pre-allocation of per-session buers, and (ii) for the ATM network, the savings due to a faster path through the network interface layer. In the latter case the data path latency for compliant packets can even be smaller than the latency of the default best-eort data path. In eect, our architecture transfers some of the trac classication and buer management overheads from the data path to the control path. To keep the overhead of packet queueing and scheduling low, we use a very simple queueing structure or utilize hardware support if available. Using the QoS component overheads as motivation, we identify the implications of providing QoS support in TCP/IP stacks and possible approaches to mask and/or reduce some of these overheads. We note that the overhead incurred due to trac shaping is a function of the frequency with which an application generates non-compliant trac, i.e., the extent of the mismatch between the stated trac specication and actual trac generation. It seems desirable that an application conforming to its stated trac specications receive better performance compared to one that frequently violates its trac specication. At the same time, due to the diculty associated with specifying meaningful trac characteristics, occasional violation of trac specications should be tolerated. However, overheads incurred in preventing persistently misbehaved applications from consuming excess resources may constitute a signicant loss of useful resource capacity. The scalability of the QoS architecture is, therefore, contingent in part upon the accuracy with which an application species its run-time communication behavior. Protocol stack performance and optimizations of existing implementations has been the subject of numerous research articles, including some very recent ones [7, 8, 9]. However, all these studies focus on the traditional best-eort data path. Our study assumes signicance in that it quanties the performance 3

penalty imposed by new data-handling components in the protocol stack, and their impact on the besteort data path. With the popularity of networked multimedia applications on the Internet, the overheads imposed by these components play an increasingly important role in communication subsystem and operating system design. To the best of our knowledge, ours is the rst study of its kind to identify the performance impact of QoS support in tcp/ip protocol stacks. While the results reported here are for host protocol stacks, some of our ndings are also applicable to routers and switches participating in an integrated services Internet. The rest of the paper is organized as follows. In Section 2 we present an overview of our QoS architecture and components. Section 3 presents results from application-level measurements, on our prototype implementation on rs/6000 based servers running aix, 2 that demonstrate the ecacy of this architecture and the need for the features provided. Using detailed kernel proling of our implementation, in Section 4 we quantify the data path overheads introduced by various QoS components Based on these results, we argue that trac shaping presents the most challenges. Section 5 identies the implications of, and suggest approaches to mask and/or reduce, the overheads involved in trac shaping. We compare and contrast our contributions with related work in Section 6. Finally, Section 7 concludes the paper. 2 Architectural Overview and QoS Components We now give an overview of the RSVP-based QoS architecture for end hosts, and the components that comprise this architecture. Additional details on the internals of the architecture can be found in [6]. Figure 2 shows the software architecture of an rsvp enabled host. In this example, a number of applications are using rsvp signaling for resource reservation. The applications use an rsvp api (rapi) library to communicate with the rsvp daemon running on the host. The rsvp daemon is responsible for translating the rapi calls into rsvp signaling messages and local resource management function calls. For local resource management, the rsvp daemon interacts with the QOSMGR over an enhanced socket interface. QoS extensions to the protocol stack are spread across both control and data planes. The QOSMGR is the key component in our architecture. It plays a critical role in the control plane, and also in the data plane, of the protocol stack. It is entrusted with managing network related resources, such as network interface buers and link bandwidth. It is also responsible for maintaining reservation states and the association between the network sessions and their reservations. Moreover, it performs trac policing and shaping for sessions directed to network interfaces that do not perform these functions in hardware, a category that covers an overwhelming majority of present-day lan interface adapters. Besides the introduction of QOSMGR, the enhancements to the protocol stack also include extensions to the socket layer, network interface drivers (ifnet), and (ndds) for classication of network bound datagrams to the sessions they belong to, and handling them in accordance with the reservation. 2.1 Control Functions The control plane is responsible for creating, managing, and removing reservations associated with dierent data ows. When a reservation is requested by an application, the QOSMGR computes and pre-allocates the 2 aix is a bsd variant operating system. 4

Applications RSVP Daemon U S E R TCP SOCKET LAYER IP IFNET UDP QOSMGR K E R N E L NDD Data Path Control Path Figure 1: Protocol stack architecture and QoS extensions. buer space required by the application on a session-specic basis. Buers are maintained as a chain of xed-size mbufs, the traditional memory buers used by Unix networking software, with the buer size derived from the advertised trac specication in the application's reservation request. In cooperation with the network device drivers and the network interface layer, the QOSMGR also reserves network bandwidth commensurate with the reservation. The QOSMGR is also responsible for binding the data socket with a connection-specic QoS handle. This handle, which directly identies the associated reservation, reduces the task of packet classication to a single direct lookup, and is used subsequently and correctly handle trac originating on the data socket. The trac classication function is thus a statically compiled packet lter, as opposed to a dynamically generated one [10]. 2.2 Data Transfer During data transfer on a QoS connection, the socket layer interacts with QOSMGR to obtain a buer for each packet generated by the application. The QOSMGR performs trac enforcement (policing and/or shaping) relative to the reservation identied by the QoS handle, as explained below, and returns a buer to the socket layer. The socket layer copies the corresponding amount of application data into this buer before initiating further protocol processing. In general, policing determines whether a packet is compliant or not. To perform trac policing, QOSMGR maintains two auxiliary variables, t m and t p, for each reservation. Informally, t m is used to check whether the application is conforming to the long term average rate specied in the Tspec; t p is used to enforce the short term peak rate. A transmission request is non-compliant if current time t is less than max(t m ; t p ) (which represents the time to compliance); otherwise the request is compliant. For compliant requests, QOSMGR allocates a buer from the associated reservation's pre-allocated buer pool, and returns this buer to the socket layer. A non-compliant request, on other hand, is handled in one of several service specic 5

Application RAPI RSVP SOCKET LAYER best-effort data path QoS data path qos_alloc() control path TRANSPORT (TCP/UDP, IP) Policing/Shaping QOSMGR IFNET LAYER NETWORK DEVICE DRIVER (NDD) data flow control flow Figure 2: Best eort and QoS data paths. ways: marked and transmitted at a lower priority, or delayed until compliance (shaping). If transmitted at a lower priority, QOSMGR allocates a best-eort buer for the packet and marks it appropriately for correct handling by lower layers of the protocol stack. If the service specication so mandates, QOSMGR must shape (i.e., delay) non-compliant trac until compliance. Our architecture supports two mechanisms for trac shaping: session-level shaping and datalink-level shaping, the two being dierentiated by their respective position in the protocol stack. In session-level shaping (eectively performed at the session layer), QOSMGR blocks the corresponding application thread for = max(t m ; t p )? t time units. This is transparent to the socket layer, which essentially sees a delay in the allocation of a buer to that packet. Session-level shaping is not required if the network interface has the capability to perform datalink-level shaping, as in atm networks, or such capability is provided in the ndd, as is possible with other lan technologies. In datalink-level shaping, the ndd buers packets until compliance before transmitting them into the network. In this mode, QOSMGR simply manages the reserved buers and ow-controls the send thread based on the availability of buers for that connection. Hence, while session-level shaping controls execution of application threads, datalink-level shaping controls the transmission of packets. The support required for link bandwidth management depends greatly on the capabilities of the attached network interface controller (nic). For an atm nic no software support for trac shaping and scheduling is required since these functions are supported in hardware. If the attached nic does not support QoS functions, as in legacy Ethernet and Token Ring networks, ndd extensions are required to support per-connection QoS via packet queueing and scheduling [6]. Figure 2 shows best eort and QoS data paths, while Figure 3 illustrates the data path through QOSMGR. For a packet associated with a reservation, the socket layer obtains a buer by calling qos alloc(), which transfers control to the QOSMGR. It rst checks whether the application has enabled policing for that 6

qos_alloc() police flag set? 1 YES packet compliant? 7 NO NO YES NO buffer available? 2 YES buffer available? 8 NO shape flag set? 11 YES YES NO return buffer with priority set 3 return buffer with priority set 9 (exception condition) return ENOBUFS 10 return best-effort buffer 12 blocking enabled? 4 NO NO blocking enabled? 13 YES YES block for buffer 5 return EWOULDBLOCK 6 delay thread with shaping timer 14 Figure 3: Data path through qosmgr. reservation (by setting the police ag) (step 1). If the associated reservation does not have the police ag set, QOSMGR checks if a buer is available for the reservation (step 2), and, if one is available, returns it to the socket layer after setting the buer priority according to the type of reservation (step 3). Otherwise, if the application's send call is blocking (step 4), it blocks the calling thread until a buer is freed (step 5). Instead, if the application's send call is non-blocking, it returns EWOULDBLOCK to the socket layer (step 6). On the other hand, if the application has enabled policing on the associated reservation, QOSMGR applies the policing function to determine if the packet is compliant (step 7). For a compliant packet, QOSMGR checks if a buer is available (step 8) and returns a pre-allocated buer if one is available (step 9), with the appropriate priority set so that the interface layer can service the packet appropriately. Unavailability of buers for compliant packets is an exception condition since a compliant packet must always have buers available, assuming that the reservation and policing computation is correct; in this case QOSMGR returns ENOBUFS to the socket layer (step 10). If the packet is non-compliant, QOSMGR checks if the shape ag is set for the reservation (step 11). If not, it returns a best-eort buer allocated using the traditional mbuf allocation calls (step 12). If the shape ag is set, but the application's send call is non-blocking (step 13), QOSMGR returns EWOULDBLOCK to the socket layer (step 6). However, if the application's send call is blocking, QOSMGR shapes the non-compliant packet (and hence trac on the associated connection) by blocking the calling thread until its compliance time (step 14). After transmitting a packet, the ndd noties QOSMGR of a free buer. The QOSMGR returns the freed buer to the corresponding session-specic buer pool and wakes up one of the session threads blocked waiting for buers. Only one thread is woken up since only one buer has been made available for consumption; this keeps the data path ecient by avoiding unnecessary thread wakeups and subsequent context switches. The thread thus woken up returns to the socket layer after obtaining the newly-freed 7

TAPTI TURBOWAYS100 reserved session best-effort session TISTA TURBOWAYS100 IBM 8260 ATM SWITCH Figure 4: Experimental testbed for prototype implementation. buer, and continues execution, i.e., processing the packet, through the protocol layers. Note that in our architecture, applications output packets to the socket layer. Thus, our architecture is naturally suited to techniques such as application-level framing [11] and can be used with protocols such as RTP [12]. For example, it supports user-level fragmentation and protocol processing performed in the application's address space. Accordingly, it is well-suited to multi-threaded multimedia applications that have distinct data generator and data exporter threads. While the data generator threads produce multimedia objects (e.g., video frames) for network output, the data exporter threads may fragment these large objects into packets and transport them via UDP on QoS connections established by the QOSMGR. 3 Ecacy of the Architecture In this section we demonstrate the ecacy of our QoS architecture in providing applications with the requested QoS. We have implemented the QoS architecture described in the previous section on RS/6000 based servers running AIX release 4.2 and equipped with ATM and IEEE 802.5 token ring adapters. For the rest of the paper we focus on the ATM network implementation, although much of the discussion is also applicable to the token ring implementation. Since our ATM adapters provide QoS support in the form of VC setup/teardown, trac policing and scheduling, trac shaping is performed by the QoS Manager, if needed, in addition to trac policing to guide buer allocation. Most of this supported is needed for the token ring adapters as well. For our experiments we have extended netperf [13] to interact with the QOSMGR and create QoS sessions. We have instrumented netperf to permit the creation of sessions with dierent options for local trac control collect user-level statistics for packet transmission time. The trac control options provided allow setting up reservations with or without policing and/or shaping. This allows us to incrementally assess the ecacy of each trac control function performed by QOSMGR. All our experiments are performed between two machines { (1) tapti { RS/6000 model 42T with 120MHz PowerPC 604 CPU, and (2) tista { an RS/6000 model 530 with a 33.4 MHz POWER CPU. Both 8

Machine ADDRESV DELRESV tapti 16.50ms 0.27ms tista 27.00ms 3.40ms Table 1: Control path latencies. machines run AIX version 4.2 and are equipped with 100Mb/s Turboways100 ATM adapters connected by an IBM 8260 ATM switch, as shown in Figure 4. The purpose of using the RS/6000 model 530 is to observe the impact of the new communication architecture on the vast existing base of older and slower servers. Although the POWER machine runs at a much lower clock speed, its overall performance is not proportionately worse than that of the PowerPC machine. The POWER and PowerPC CPUs are architecturally dierent and the dierences in their clock speed are not directly reective of their relative processing power. 3.1 Control Path Latency Table 1 shows the application level latencies in creating (ADDRESV) and removing (DELRESV) a reservation between tapti and tista. The latency involved in creating a reservation includes the time taken to create local reservation states as well as perform signaling across the ATM network to setup a VC for the RSVP ow. The removal of a reservation includes cleaning up the local reservation state and tearing down the VC associated with the RSVP ow. However, the latency seen by an application in DELRESV does not include the time taken to tear down the VC across the ATM network. This explains the large dierence between the latencies in ADDRESV and DELRESV. Note that the most signicant part of ADDRESV latency is contributed by ATM signaling overhead. 3.2 Data Path Latency In the following sections we examine the overall eciency of the three dierent mechanisms used in the QOSMGR, which consist in buer preallocation, buer preallocation and policing, and buer preallocation and shaping. Let us describe in more detail how the three mechanisms work over an ATM network and what the default behavior (best eort without reservation and preallocation) is. When the ATM interface is congured a maximum bandwidth for best eort trac has to be dened. Therefore, all packets that are not transmitted over a signaled VC (SVC) for which a reservation has been made share this best eort VC, which is peak rate policed at the congured level. In all our experiments the best eort bandwidth was set to 10 Mb/s. If a reservation is established all packets are sent over the SVC which is peak rate policed at the reserved rate except for one case. When policing is used compliant packets are sent over the SVC and non compliant packets are sent over the best eort VC. While the architectural changes we made to integrate the QOSMGR are not coupled with any transport protocol and the transport protocol code was not changed the dierent mechanisms we can use with the QOSMGR can have dierent impacts on the protocols that can not be measured by looking only at overhead 9

200000.0 180000.0 160000.0 without preallocation preallocation only preallocation + policing preallocation + shaping 140000.0 Source Output [kb/s] 120000.0 100000.0 80000.0 60000.0 40000.0 20000.0 0.0 0.0 10000.0 20000.0 30000.0 Reserved Rate [kb/s] Figure 5: Overall QOSMGR Performance occuring in the QOSMGR. Therefore we show the overall performance of the QOSMGR and discuss the impact of using UDP sessions and TCP connections. 3.2.1 Performance of the QOSMGR In this section, we examine the eciency of the dierent functions provided by the QOSMGR. For this purpose, we run an UDP stream through the QOSMGR and measure the trac load at the IP layer. Since UDP is a relatively light weight protocol, trac load at the IP layer provides a good measure of the eciency of the QOSMGR. Figure 5 shows a plot of the measured data rates at the IP layer for dierent reservation rates with dierent functions of the QOSMGR turned on. We see from the top curve that allocating buers out of a preallocated pool is much more ecient than calling the memory allocator for buer allocation (second curve from the top). Therefore, buer preallocation is an important means to increase the eciency and is used to compensate the overhead that occurs when policing or shaping are turned on. It seems counterintuitive to see that the measured data rate decreases slightly with the increase in the reservation rate. We can only explain this by considering the whole path a packet takes from when the user calls the send function until it is delivered to the ATM interface and the function call returns. Since the ATM interface card performs peak rate policing it can only send out packets at the reserved rate. If packets from the IP layer arrive faster than they can be transmitted they have to be discarded and the function call returns immediately. If a packet can be sent out it has to be processed rst which means that the corresponding function call takes longer to execute than if the packet had just been discarded. Therefore, the overall time spent in the send function that is called by the user depends on how many packets were discarded by the ATM interface card which is higher the lower the reservation is. As the 10

Best Effort VC Rate = 10Mb/s 20000.0 without preallocation preallocation only preallocation + policing preallocation + shaping Goodput [kb/s] 10000.0 0.0 0.0 10000.0 20000.0 Reserved Rate [kb/s] Figure 6: Goodput for Policed/Shaped UDP netperf program basically performs greedy sending the less time is used in the send routine, the more packets can be generated and sent to the underlying layer. This causes the generated bandwidth to drop when the reservation increases. Observed data rates decrease as policing and shaping is turned on since it involves additional functions to be performed by the the QOSMGR. As shown in Figure 3, when policing is turned on, the QOSMGR returns a buer out of the preallocated pool if the request is compliant. Otherwise, it returns a best eort buer using the standard memory allocator. The third curve from the top shows the data rate for policing turned on. In this case the gain due to buer pre-allocation is oset by the overhead of compliance checking (policing). However, the data rate of the policed stream is only slightly lower than the data rate observed in the original stack. The curve at the bottom shows the data rate in presence of trac shaping. Notice that in this case, the observed rate is very close to the reserved rate. 3.3 Goodput of Policed/Shaped UDP Streams While the previous section discussed the QOSMGR performance within the end system we now examine the impact the dierent QOSMGR mechanisms have on a UDP stream. For this purpose we measure the bandwidth at the receiving application, the goodput, by dividing the received amount of byes by the time interval of the experiment. As mentioned, the bandwidth allocated to the best eort VC was 10Mb/s. Figure 6 shows the goodput for dierent reservation rates using various QOSMGR mechanisms. When no end to end reservation is established and no buers are pre- allocated the goodput of the UDP stream is about 9 Mb/s (horizontal curve). In this case all packets are sent over the best eort VC which is policed at 10 Mb/s. The dierence is due to the imprecision of the ATM card's peak rate policing. For the 11

other three curves buer preallocation has been done and an end to end reservation has been established. When policing is turned on, compliant packets are transmitted on a reserved VC created for the connection. Non-compliant packets are transmitted on the best-eort VC. Clearly, for a reservation of 0, all the packets are sent over the best eort VC. Increasing the reservation rate increases the goodput. Though we expect the goodput to be the sum of the best eort rate and the reserved rate, the observed goodput is smaller. This is due to the fact that the eciency of the receive path drops markedly when packets for the same application arrive on two dierent VCs. Since we measure the bandwidth received by the application we do not see the packets that are transmitted over the two VCs but dropped at the receiving interface. We see on the gure that the two curves representing preallocation-only and shaping are almost identical. We know from the previous gure that netperf generates UDP packets at a rate of close to 150 Mb/s. Since the actual throughput over the ATM network is limited to the reservation rate the goodput obtained is very close to the made reservation. In the case of shaping, netperf's rate with which it generates packets is limited to the reserved rate by the QOSMGR which yields a goodput that is equal to the made reservation. This makes shaping so valuable. Instead of using the CPU to generate packets most of which will be discarded immediately by the ATM interface card it is preferable to use shaping for two reasons. Shaping blocks non-compliant requests to send data packets until they are compliant and therefore allows other processes to use the CPU more eciently. In the case where the underlying link level protocol does not perform any policing as is the case for many common link layer protocols that are in use today (Token Ring, Ethernet, etc) shaping is actually the only way to make end systems compliant with a negotiated trac specication. 3.4 Goodput of Policed/Shaped TCP Connections While UDP is not reliable and does not implement any ow control mechanism TCP is inherently more complicated. Not only does TCP segment the byte stream it receives from an application into packets of a size that can be accepted by the network, it also implements ow control. It increases the ow when more bandwidth is available in the network and it can signicantly reduce the ow in case of congestion. Although our architecture is designed in a way that does not interfere with TCP's ow control (policing and shaping are done between the socket layer and the transport layer) we need to make sure the goodput is not aected by the combination of policing/shaping and ow control. Figure 7 shows the goodput we get for dierent reservation rates and various QOSMGR mechanism over a TCP connection. Again the allocated rate for the best eort VC is 10 Mb/s. The horizontal curve shows the case where no reservation is made (and therefore no buers are preallocated) and trac is sent over the best eort VC. One might expect that the peak rate policing done on the ATM level should interfere with the TCP ow control mechanism and cause a signicant drop in goodput. But actually the impact is very small and the goodput is only insignicantly smaller than for UDP. In the case the connection is policed we see that the goodput is much less predictable than with the UDP stream where it increased proportionally with the increase of the reserved rate. Since TCP does not transmit individual, non correlated datagrams over a network but instead guarantees a reliable delivery of a byte stream, splitting up the transmission on two VCs with dierent, policed peak rates causes the 12

Best effort VC Rate = 10Mb/s 20000.0 without preallocation preallocation only preallocation + policing preallocation + shaping Goodput [kb/s] 10000.0 0.0 0.0 10000.0 20000.0 Reserved Rate [kb/s] Figure 7: Goodput for Policed/Shaped TCP connections segments to arrive out of order at the receiving end. This means that at the receiving end temporary 'holes' appear in the byte stream when packets are sent more slowly on one of the VCs. Such a hole can trick the ow control mechanism into believing that there is congestion on the network and that the transmission rate needs to be throttled down. Therefore sending compliant packets over a reserved SVC and using any free bandwidth available in the best eort VC does not work well with TCP. Again, the curves representing goodput for preallocation-only and for shaping are almost identical and the goodput corresponds very precisely to the reservation rate. This proves that shaping is a very important way to achieve compliance to a trac specication and to save resources within the endsystem (delaying a non compliant packet means for a process to block and therefore to free the CPU for other processes). While policing can not really be applied to other link layer protocols like Ethernet and Token Ring (there is no notion of best eort VC there) shaping is an excellent option to make end systems compliant with the trac specication they reserved. 4 QoS Component Overheads The results of the previous section demonstrate the ecacy of the QoS architecture in providing QoS to applications. However, as mentioned earlier, due to the expected wide-scale deployment of such QoS support, it is essential to identify the overheads imposed by the QoS support provided relative to the best-eort data path. Clearly, excessive overhead would limit the scalability of the QoS architecture and discourage use of the new service model. In this section we identify the overheads associated with the QoS components and experimentally quantify them using our prototype implementation. The next section discusses techniques to reduce or mask some of these overheads. 13

tc b h s w p sd c t t t t t t t t t 1 2 3 4 5 6 7 8 9 time (a) Timeline of events in QOSMGR data path Time Event Description t 1 packet arrival Symbol Overhead Component t 2 time to compliance computed p policing overhead t 3 shaping timer set s overhead to start shaping timer t 4 thread blocked b overhead to block thread t 5 shaping timer expires tc time-to-compliance of this packet t 6 shaping timer handler invoked h overhead to handle shaping timer t 7 blocked thread woken up w overhead to wake up blocked thread t 8 thread scheduled to run sd delay in scheduling thread t 9 shaping timer cancelled c overhead to stop shaping timer > t 9 thread continues processing packet (b) Time instants and corresponding events (c) Overheads associated with shaping Figure 8: Timeline of events during shaping and associated overheads. Figure 8(a) illustrates the timeline of events as a packet passes through the QOSMGR. An outgoing packet \arrives" at the QOSMGR at time t 1. The packet's time-to-compliance ( tc ) is computed as part of the policing function and by time t 2 it is known whether the packet is compliant or not; the overhead incurred due to the policing function is p. For a non-compliant packet (and hence one that needs to be shaped) a shaping timer is started at time t 2, incurring an overhead s. Subsequently, the calling thread is blocked on a semaphore, incurring an overhead b ; at time t 4 the cpu can be reallocated to another thread. At time t 5, after a delay of tc from time instant t 3, the shaping timer expires, and an overhead of h is incurred by the kernel in searching for the timer block and invoking the corresponding handler. The handler simply delivers a wake-up to the blocked thread and exits. Waking up a thread incurs an overhead of w, and at time t 7 the thread is residing in the cpu run queue, i.e., has been made runnable. The operating system's cpu scheduler allocates the cpu to this thread (i.e., schedules the thread for execution) at time t 8 after a scheduling delay of sd. The thread rst stops the shaping timer, which incurs an overhead c, and continues processing the now-compliant packet from time t 9 onwards. 4.1 Kernel Instrumentation and Measurement Methodology We have instrumented the network subsystem of the modied aix kernel for detailed proling of the data path of reserved sessions using the native tracing facility. Measurements reported here are from both tapti and tista. The trace facility captures a sequential ow of time stamped system events, providing a ne level of detailed system activity. A trace event can take several forms, and consists of a hookword, optional 14

data words, and an optional time stamp. The hookword is used to identify the specic event being traced. To minimize tracing overhead, our event records use only the hookword and timestamp. Timestamps are taken by reading a real-time clock. The real-time clock is an integral part of POWER and PowerPC CPUs used in RS/6000s, and can be read directly from the kernel as well as from the applications. We use a two-instruction assembly language routine to read two 32-bit clock registers with minimal overhead. The timestamps are of microsecond granularity. Refering to Figure 8, we measure p, s, w, and c by taking timestamps before and after the corresponding kernel calls, computing the dierence, and averaging over a large number of invocations. For this purpose, we utilized the functionality of the QOSMGR (which is realized as a protocol module, as mentioned earlier) to send it appropriate user-level commands and triggering our proling code in the kernel. Computation of h is slightly more involved. Suppose a timer is set for time units, where a time unit corresponds to the duration of the system timer tick. If t b is the timestamp taken before starting the timer, and t a is the timestamp taken immediately upon entry into the timer handler, then t a? t b = + h holds, and h can now be computed. Note, however, that for this computation to be correct, the system must correctly count timer ticks from the time the timer is set. Since the time instant when the timer is started can fall anywhere within one timer tick, the timer ticks counted would not be accurate unless the timer was synchronized with the beginning of a timer tick. To achieve this synchronization we set two timers instead of one. The rst timer is used to synchronize the setting of the second timer with the beginning of a timer tick; the second timer is started for timer ticks from within the handler for the rst timer. This works because the expiry of a timer is always synchronized with the end of a timer tick, and hence the beginning of the next timer tick. A nal concern is the computation of b, the overhead to block a thread in the kernel. As such, since the call to block a thread returns only when the thread is awakened in the future, it is not possible to determine the overhead incurred to block the thread via timestamps or the timer mechanisms discussed above; the overhead would completely overlap with an outstanding timer. Therefore, we approximate b in terms of w as follows. w equals the time to remove a thread from the wait queue and enter it into the CPU run queues. b equals the time to save the thread's context, enter it into the appropriate wait queue, remove a thread from the CPU run queues and restore its context. Assuming that enqueueing a thread costs the same as dequeueing a thread, and if cs is the overhead to switch contexts between two threads, we have b w + cs. 4.2 Component Overheads Table 2 lists the measured values of these component overheads on tapti and tista. The policing overhead ( p ) includes the cost of retrieving the appropriate session state variables, computing the timestamps, and checking whether a packet is compliant by comparing its expected arrival time with the current system time. The current implementation uses two 4-byte words to represent each timestamp, one for the seconds eld and the other for the nanoseconds eld. The policing computation can be further optimized by using only the nanoseconds eld for comparing and manipulating timestamps, and handling the (rare) rollover as a special case. The overheads of shaping non-compliant packets can be broken up into timer operations ( s : set timer, 15

Component Overheads tapti tista Policing p compute compliance time 16.0s 23.0s Buer r a allocate reserved buer 6s 18.5s management r f free reserved buer 15s 33s b a allocate best-eort buer 18s 35s Timer s set timer 7.4s 14.0s operations h handle timer 7.1s 30.1s c cancel timer 6.5s 9.6s Thread b block thread 37.4s 78.8s operations w wakeup thread 14.4s 23.8s ARP search arp search for ARP entry 10s 17s Table 2: Overheads of dierent QoS components. h : handle timer, c : cancel timer) and thread operations ( b : block thread, w : wakeup thread). For a modern machine such as tapti, timer operations are reasonably small relative to the base best-eort (udp) path latency. The timer overheads correspond to the case with only one shaping timer outstanding, with perhaps a few system (kernel) timers active concurrently. For good scalability with the number of active connections, the OS timer support must scale well with the number of active timers. It is observed that the overhead of blocking threads is signicant, notwithstanding faster processors, with context switching being the dominant component. Allocation of buers (for non-compliant packets) from the shared mbuf pool (overhead b a) is significantly more expensive than allocation of buers (for compliant packets) from the pre-allocated sessionspecic reserved pool (overhead r a). Thus, the savings in buer allocation serves to oset some of the overheads of trac policing and shaping. Likewise, the cost of freeing a best-eort buer is signicantly higher than the cost of freeing (i.e., returning to the session-specic buer pool) a pre-allocated buer. In eect, our architecture keeps the data path ecient while increasing the control path latency slightly. 4.3 Eective Overhead Both policing and shaping insert additional operations in the data paths for reserved connections relative to the best-eort data path. One would therefore expect to see higher data path latencies for reserved paths over that of the best-eort data path. However, the best-eort path diers from the reserved data path in that it uses the standard mbuf allocator for packets, as opposed to using a pre-allocated private pool of buers, and incurs a search for the arp (Address Resolution Protocol) entry in the arp cache ( arp ); in the reserved path, the session handle maps directly to the appropriate virtual connection identier, thereby eliminating this search. 16

Connection Type Message Size (in bytes) 64 128 256 512 1024 2048 4096 Best Eort 133 137 163 189 215 223 288 Reserved 159 162 172 186 217 231 298 Table 3: Data path latencies on tapti (in s). As revealed by the measurements listed in Table 2, these dierences taken together constitute a signicant reduction in the data path latency for the reserved path, and partially oset the overheads due to policing and shaping. For high-function nics that perform trac shaping, such as our ATM adapter, the only overheads incurred are those of trac policing and buer management, which are necessary to support the dierent service classes such as controlled load. If C base represents the base latency of the best-eort path, the latency seen by a compliant packet is C base + p? ( b a? r a)? arp ; and that seen by a non-compliant packet is C base + p : For tapti arp 10s (Table 2) for an entry that is resident in the cache. Thus, the eective increase in data path latency for a compliant packet is -6 s, i.e., the data path is slightly faster. Similarly, the reduction in data path latency on tista is 10 s. Table 3 shows application-level latency measurements for UDP trac on best-eort and reserved data paths for a range of message sizes. These results indicate that for 512-byte packets, compliant packets do experience a slight ( 5%) decrease in latency. The same experiments also reveal that for other packet sizes, compliant packets see an increase in latency. While additional experiments are needed to investigate this further, we suspect this is primarily due to cache and os related eects. A non-compliant packet experiences a latency increase of 12.5% since it incurs policing overhead and uses best-eort buers. Session-level trac shaping incurs signicant additional overheads in the form of timer and thread operations. Further, session-level shaping may also incur a variable (cpu load dependent) delay in scheduling a blocked thread on the cpu ( sd ). The next section discusses the performance implications of using session-level shaping, and also outlines techniques to reduce or mask some of the shaping overheads and delays. 5 Performance Implications In this section we discuss various performance implications of session-level trac shaping and alternatives such as datalink-level shaping. We note that, in order to realize application-level QoS, the mechanisms provided in the architecture need to be integrated with QoS-sensitive CPU scheduling policies within the operating system. However, the architectural mechanisms presented and evaluated in preceding sections are needed regardless of the particular CPU scheduling policy employed. 5.1 Accommodating variations in the shaping latency With session-level shaping, in the absence of other background activity a blocked thread would be allocated the CPU immediately after it is made runnable, i.e., sd 0 ignoring context switching overheads. 17

However, the presence of other CPU-intensive background activity can introduce additional, variable delays. Before the thread can get to run to consume the buers now available, there is the latency of making the thread runnable and dispatching the CPU scheduler to select a thread (the scheduler dispatch latency), and the latency due to competition with other runnable threads/processes for access to the CPU. The additional delays imply that the thread in question gets blocked longer than that required as per the time to compliance (the desired shaping latency). That is, sd is non-zero and a function of the background load. Before considering alternatives to \absorb" variations in the shaping latency, we note that shaping occurs only when an application generates non-compliant trac relative to the stated trac specication. Accordingly, the frequency of occurence of shaping by QOSMGR is largely a function of the likelihood of the application exceeding its trac specication. This in turn is related to the ability of the application to accurately \predict" its run-time communication behavior. While this is possible for relatively simple multimedia applications, such as video playback (via lookahead or on-line smoothing), it may be extremely dicult for more complicated mixed-media applications. Assuming that an application correctly estimates its run-time communication behavior, the performance degradation due to trac shaping would not be substantial. In other situations, the exacerbation in shaping latency may result in a QoS connection losing credits for access to the network, if it is unable to send compliant data even when buers are available. Further, since the shaping latency is partly determined by the background load on the CPU, unpredictable variations in shaping latency must also be accounted for. For provision of QoS, the scheduler dispatch latency dis must be bounded in the worst case. If so, one can account for the extra delay of max dis by only shaping for tc? max dis time units, assuming a worst-case scenario for scheduler dispatch; the average value of dis may be signicantly smaller than max dis. The second latency component, the delay waiting for CPU access, can be accounted for via measurement and adaptation. If the desired shaping delay is tc, and the thread actually gets delayed by act ( tc ), then it lost credits for ( act? tc ) time units. A lost credit implies that the thread could have utilized the available buers for outgoing packets and utilized its share of link bandwidth, if it had been able to run as per the desired shaping delay. Since guarantees are provided on the long-term rate as well, one can envision a scheme where the shaping delay applied adapts according to uctuations in the background load. Thus, if the thread got delayed by an extra delay ext (t) = act (t)? tc (t) at shaping instant t, it is only blocked for max( tc (t 0 )? ext (t); 0) time units at the next shaping instant t 0. Our policing computation keeps track of these lost credits and accounts for any extra shaping delay by subsequently treating more packets as compliant. However, adapting to shaping latency in this fashion has implications for the buer management performed by QOSMGR; a QoS connection may need to over-provision buers to allow longer bursts of packets through compared to the connection's trac specication. Coupled with an appropriate buer management policy, the variations in the scheduling delay can also be accommodated. As mentioned in Section 2, for legacy nics with appropriate queueing and scheduling supported by the ndd, datalink-level shaping serves as an alternative to session-level shaping [6]. With datalink-level 18