progme towards programmable network measurement

Upload: shabeer-vpk

Post on 03-Apr-2018

249 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 ProgME Towards Programmable Network MEasurement

    1/12

    ProgME: Towards Programmable Network MEasurement

    Lihua [email protected]

    Chen-Nee [email protected]

    University of California, Davis

    Prasant [email protected]

    ABSTRACT

    Traffic measurements provide critical input for a wide rangeof network management applications, including traffic engi-neering, accounting, and security analysis. Existing mea-surement tools collect traffic statistics based on some pre-determined, inflexible concept of flows. They do not havesufficient built-in intelligence to understand the applicationrequirements or adapt to the traffic conditions. Consequently,they have limited scalability with respect to the number offlows and the heterogeneity of monitoring applications.

    We present ProgME, a Programmable MEasurement ar-chitecture based on a novel concept of flowset arbitraryset of flows defined according to application requirementsand/or traffic conditions. Through a simple flowset com-position language, ProgME can incorporate application re-quirements, adapt itself to circumvent the challenges on scal-ability posed by the large number of flows, and achieve abetter application-perceived accuracy. ProgME can analyzeand adapt to traffic statistics in real-time. Using sequentialhypothesis test, ProgME can achieve fast and scalable heavyhitter identification.

    Categories and Subject Descriptors

    C.2.3 [Network Operations]: Network monitoring; C.4[PERFORMANCE OF SYSTEMS]: Measurement tech-niques

    General Terms

    Algorithms, Design, Measurement

    Keywords

    Flowset, Flowset Composition Language, Traffic Measure-ment, Programmable Measurement, Multi-Resolution Tiling

    Permission to make digital or hard copies of all or part of this work forpersonal or classroom use is granted without fee provided that copies arenot made or distributed for profit or commercial advantage and that copiesbear this notice and the full citation on the first page. To copy otherwise, torepublish, to post on servers or to redistribute to lists, requires prior specificpermission and/or a fee.SIGCOMM07, August 2731, 2007, Kyoto, Japan.Copyright 2007 ACM 978-1-59593-713-1/07/0008 ...$5.00.

    1. INTRODUCTIONAccurate measurement of network traffic is a keystone of

    a wide range of network management tasks, e.g., traffic en-gineering, accounting, network monitoring, and anomaly de-tection. A measurement tool, be it a dedicated hardware orsoftware running on routers or firewalls, collects statistics ofnetwork traffic. Management applications use these statis-tics to make network control decisions, such as re-routing

    traffic, charging customer, or raising alarms to administra-tors. The insights gained from traffic measurement are in-valuable to administrators in making informed decisions onnetwork planning or operations.

    Figure 1: Traditional Measurement Architecture.

    Fundamentally, traffic measurement involves counting thenumber of packets (or bytes) that satisfies some criteria overa particular period of time. As depicted in Figure 1, tra-ditional measurement architecture1, e.g., NeTraMet [5, 6],FlowScan [28] and sFlow [27], finds a matching flow for ev-ery sampled packet and increases the corresponding counter.Such per-flow traffic statistics might be, upon a triggeringevent like the expiration of a timer or passing of a threshold,delivered to a centralized storage location. A managementapplication, be it a network manager or an anomaly detec-tion tool, can then perform post-processing on the per-flowstatistics to retrieve useful information. For example, to an-

    swer user queries like How much traffic goes to a particularnetwork?, one can perform selective aggregation to count allthe flows belonging to this query. For monitoring applica-tions like heavy hitter identification, one can search throughthe per-flow traffic statistics to find the elephant flows.

    Although the traditional measurement architecture hashad some success in offering insights about network traf-fic, the scalability of this architecture is limited in practice.First, the traditional architecture collects statistics based

    1This is an extremely simplified summary. One should notoverlook the tremendous amount of research that reduce thenumber of counters or produce traffic summaries.

    IEEE/ACM TRANSACTIONS ON NETWORKING, VOL. 19, NO. 1, FEB 2011

  • 7/29/2019 ProgME Towards Programmable Network MEasurement

    2/12

    on the inflexible definition of flow2. In todays high-speednetwork, especially the core of these networks, the numberof flows can be very large easily reaching millions. Keep-ing a per-flow traffic profile is challenging to the memoryand the processor [15]. Even if the per-flow traffic profilecan be managed locally, delivering it to the remote serverand storing it over a prolonged period of time incurs signif-icant amount of overhead. Second, the traditional architec-

    ture takes a post-processing approach. Measurement toolshave little knowledge about the actual requirement of themanagement applications and focus only on providing suffi-cient statistics. It is up to the management applications toprocess the per-flow traffic statistics and extract meaning-ful information. This disconnection between measurementtools and management applications forces the measurementtools to collect all the statistics that might be useful and atthe finest granularity to meet a certain level of accuracy re-quirement. Third, the traditional architecture cannot adaptitself to the changing network condition. It is difficult fora measurement tool engineered to monitor a few large flows(elephants) to quickly adapt itself to focus on large amountof small flows (mice), e.g., in the case of Distributed Denial-of-Service attack.

    Figure 2: Programmable Architecture.

    This paper calls for a departure from the traditional archi-tecture using per-flow traffic profile and the post-processing

    approach. We present a Programmable MEasurement ar-chitecture (ProgME) that can adapt to application require-ments and traffic conditions in real time. Figure 2 shows themajor components of ProgME. Our first proposal is to use aversatile definition offlowset arbitrary set of flows as thebase of traffic statistics collection. In other words, ProgMEkeeps one counter per flowset. Compared to per-flow trafficstatistics, per-flowset statistics enables one to achieve mul-tiple resolutions within a traffic profile. Since flowsets canbe defined arbitrarily, they do not necessarily map to thesame number of unique flows or traffic volume. Therefore,one can track higher resolution statistics to maintain the de-sired accuracy for a sub-population of network traffic, whilecollecting coarse-grained aggregate statistics for the remain-

    ing traffic (e.g., through a flowset that catches uninterestingtraffic) to reduce total number of counters required. Fur-thermore, since a flowset can contain arbitrary set of flows,one can construct flowsets that directly reflect the interest ofmanagement applications. For example, one can use a sin-gle counter to track packets from invalid source IP addressinstead of keeping a large number of per-flow counters andaggregate them later.

    The second key component of ProgME is a program enginethat can dynamically (re)-program the definitions of flowsets

    2There are several different definitions of flow. However, itis normally fixed once chosen for a measurement task.

    based on user queries. By enabling the management applica-tions to program the measurement tool, one can pre-processapplication requirements so that the tool only collects statis-tics that are directly useful to applications and at a desiredgranularity, thus significantly improving its scalability andperformance. Note that we do not claim that collectingstatistics according to user requirement is the right solutionfor all measurement tasks. ProgME can be most beneficial if

    users know their requirements b eforehand. However, if onefails to envision the usefulness of certain traffic metrics anddoes not measure them directly in the first place, a posteri-ori analysis on aggregate data might not generate accurateestimates of these metrics.

    ProgME is intended as an on-line measurement moduleand offers the flexibility to support adaptive measurementalgorithms. For example, the program engine can merge orpartition flowsets and re-allocate the counters dynamicallybased on past traffic statistics to increase tracking accuracyand measurement efficiency.

    The contributions of this paper are summarized as follow:

    We propose a versatile flowset definition as the baseunit of network measurement. We present a flowset

    composition language (FCL) for defining flowsets con-sisting arbitrary set of flows and a binary decision dia-gram (BDD)-based data structure for efficient set op-erations and matching packet to a flowset (Section 2).

    We show that the flexibility offered by our flowset def-inition is helpful in broad categories of network mea-surement, including answering user queries (Section 3)and identifying heavy hitters (Section 4).

    We propose a scalable Flowset-based Query Answer-ing Engine (FQAE) in (Section 3) to support arbi-trary user queries. Used in conjunction with sampling,FQAE can achieve the same accuracy for any given setof queries compared to an ideal flow-based measure-ment approach, while achieving orders of magnitudecost reduction in terms of memory requirements.

    We propose a multi-resolution tiling (MRT) algorithm,which dynamically re-program the flowset measure-ment to zoom in on heavy hitters (Section 4). It canidentify heavy hitters under tight memory budget byre-defining flowsets and re-allocating the associatedcounters. MRT analyzes the traffic and the statisticscollected sequentially and can be deployed on-line.

    After presenting design rationale and major componentsof ProgME, we evaluate its performance in Section 5. Therelated works are discussed in Section 6 and we conclude thepaper in Section 7.

    2. ARBITRARY FLOWSETTraditionally, network statistics are collected based on the

    concept of flows. A flow f refers to a set of packets thathave the same n-tuple value in their header fields. Let H :{H1, H2, , Hn} denote the header fields used in the flowdefinition. Typical definitions of flow include the 5-tuple ofH : {prt, sip, spt, dip, dpt} or the 2-tuple of H : {sip, dip} inwhich prt is the protocol field, sip and dip are the sourceand destination IP address and spt and dpt are the sourceand destination port, respectively. Other header fields, e.g.,Type-of-Service (TOS), could be used as well. A flow isoften used as the base unit for traffic measurement. With a

    IEEE/ACM TRANSACTIONS ON NETWORKING, VOL. 19, NO. 1, FEB 2011

  • 7/29/2019 ProgME Towards Programmable Network MEasurement

    3/12

    Symbol Explanation

    f A flowH Set of fields that defines flowF A flowset

    Fw The weight of a flowset FFc The counter associated with F

    PA packet enumerator,either a trace file or live traffic

    Q A list of user queriesU The universal set of flows

    Table 1: Notations.

    n-tuple definition, a flow can be regarded as a point in then-dimension space with each field as a dimension.

    In the context of packet classification (including routingand packet filtering), it is often necessary to designate an ac-tion (e.g., route to a certain interface, filtering the packet)to a set of flows. The status quo is the concept of super-

    flow, which takes a similar form of the definition of flowexcept each field is extended to a range of values. In thegeneral 5-tuple superflow H : {prtr,sipr,sptr,dipr,dptr}

    definition, sipr and dipr are CIDR address blocks and prtr,sptr and dptr could be value intervals. The semantics ofsuperflow is not flexible enough it is restricted by thewell-defined structure and can only describe a regular-cutset of flows, where each field contains a contiguous range ofvalues. Therefore, sipr and dipr should contain IP addressesthat form a valid CIDR block with contiguous IP addresses,while sptr and dptr should contain continuous interval ofinteger values. For example, if one is to visualize a 2-tuplesuperflow defined by sipr,sptr on a 2-dimension space, su-perflow can only carve out rectangles of various size [12], asshown by the solid and dotted boxes in Figure 3.

    We define a flowset to be a set of arbitrary flows. A flowsetis not limited by the structure of superflow and can take any

    shape, even being segmented in the space (as one shall seeshortly). A flow can be considered a special case of flowsetcontaining only one member. To the best of our knowledge,there are no existing languages for specifying such a versatileflowset other than an inefficient enumeration of superflows.

    Our definition of flowset should not be confused with thetemplate flowsets defined by Cisco NetFlow V9 [35], whichis a template-based flow record format used for exportingper-flow records. It is not semantically expressive enough todescribe all possible set of flows, nor it is designed to do so.

    In the following part of this section, we first present aflowset composition language (FCL), which enables user tospecify an arbitrary set of flows as a single entity (Sec-tion 2.1). Section 2.2 clarifies related definitions and Sec-tion 2.3 introduce a canonical representation of flowset usingbinary decision diagram (BDD). Coupled with the under-lying BDD representation of flowsets, FCL allows users tospecify their requirement on aggregated traffic statistics andenables measurement tools to pre-process user requirements.

    Table 1 summarizes the notations used in this paper.

    2.1 Flowset Composition Language (FCL)We present a simple Flowset Composition Language (FCL)

    using set algebra to enable specification of arbitrary flowset(Table 2). The primitive of FCL is the 5-tuple superflowdefinition, which by itself is a flowset that defines a set offlows. However, the grammar of the 5-tuple definition is

    e = e op e | (e) |e| prop ::= | | \pr ::= < prt,sip,spt,dip,dpt >

    Table 2: Grammar of Flowset Composition Language.

    very limited and can only specify a regular-cut set of flows.One can use other primitives as long as it specifies a set offlows. We choose the 5-tuple definition because of its wideusage in the context of firewall and policy routing.

    Since the primitives are flowset themselves, one can useset algebra to construct a flowset that constitutes arbitraryset of flows. The FCL grammar defined in Table 2 illus-trates several standard set operators like intersection (

    T),

    union (S

    ), absolute complement (), and relative comple-ment (\). These operations are sufficient to build a flowsetwith arbitrary set of flows. In addition, one can, using theoperators provided, build more complicated logical opera-tions, e.g., NAND or NOR. All the laws associated with setalgebra, including the commutative, associative, distributive,identity, and complement laws, apply to flowset as well.

    Table 3 presents two examples of such flowsets that mightbe of practical interest to the administrators. Flowset F1presents all flows originated from private address space. Inpractice, administrators are interested in tracking these flowsbecause packets with unroutable IP address are not legiti-mate and are often used by attackers and spammers. FlowsetF2 presents incoming FTP traffic (port 21/22) except thosefrom an internal network. F1 and F2 are depicted in Fig-ure 3 in dashed and solid line rectangles respectively. Noticethat a flowset, as a single entity, can cover disconnected andirregular parts in the universal set.

    2.2 DefinitionsSince flowset is a type of set, concepts and definitions in

    set theory apply here. In the following, we highlight thedefinitions that are useful for our discussions.

    The universal flowset U contains all the possible flows,and the empty flowset contains no flow. Two flowsetsA and B are said to be disjoint if their intersection isempty, i.e., A

    TB = .

    We denote the cardinality of flowset F as |F|, whichis a measure of the number of possible flows of theflowset. Note that |F| can be larger than the actualnumber of active flows one observes in a particulartraffic instance, which we denoted as |F|.

    We denote |Hi| as the total number of possible valuesof field Hi. Therefore, |Hsip| = |Hdip| = 2

    32, |Hspt| =|Hdpt| = 2

    16, |Hprt| = 28. The total number of possible

    flows, which is also the cardinality ofU, is Qn

    i=1|Hi|.

    A set of flowsets F : {F1, F2, , Fn} is said to be apartition of a flowset X iff (Eq. 1) none of the flowsetin F is empty , (Eq. 2) flowsets in F are pair-wisedisjoint, and (Eq. 3) the union of all flowsets in Fequals to X. In particular, F is complete if it is apartition ofU.

    Fi = 1 i n (1)

    Fi\

    Fj = 1 i = j n (2)

    n[i=1

    Fi = X (3)

    IEEE/ACM TRANSACTIONS ON NETWORKING, VOL. 19, NO. 1, FEB 2011

  • 7/29/2019 ProgME Towards Programmable Network MEasurement

    4/12

    F1: Traffic from private IPF1 = r1 r2 r3, wherer1 =< , 10./8, , , >r2 =< , 172.16./12, , , >r3 =< , 192.168./16, , , >

    F2: FTP not from 10.1./16F2 = (x1 x2) x3, wherex1 =< , , , , 20 >

    x2 =< , , , , 21 >x3 =< , 10.1./16, , , >

    Table 3: Sample Flowsets. Figure 3: Visualization of Table 3. Figure 4: Disjoint Flowsets of Figure 3.

    We denote Fc as the counter associated with a flowsetF. The counter is updated when a matching packet isobserved and can take any unit, e.g., packets or bytes.We also denote Fw the actual weight ofF, and F

    w themeasured weight of a flowset F. Measuring Fc and F

    w

    are equivalent if keeps a counter for all packets.

    2.3 Underlying Data Structure

    The string representation of flowset is not an ideal form forcomplicated set operations. Following the approach used toencode firewall rules and access lists in recent studies [21,37],we use binary decision diagram (BDD) [7] as the underly-ing data structure for flowset (referred to as flowset labelhereafter). BDD is an efficient data structure that is widelyused in formal verification and simplification of digital cir-cuits. A BDD is a directed acyclic graph that can com-pactly and canonically represent a set of boolean expres-sions. Every bit of IP header corresponds to a BDD variable.For example, we encode the source IP block 128.0.0.0/4 asSI P(x1x

    2x

    3x

    4), whose corresponding BDD is shown in Fig-ure 5a. Similarly, the BDD for source IP 192.0.0.0/4 is de-picted in Figure 5b. In a BDD graph, the non-terminal ver-

    tices represent the variables of the boolean function, and thetwo terminal vertices represent the boolean values 0 (True)and 1 (False). Note that only the first 4 bits are used andthe 24 masked bits are omitted in the BDD.

    (a) (b) (c)

    Figure 5: BDD Encoding.

    Performing set operations such as intersection, union, not,and implication using BDDs is straightforward. Figure 5cdepicts the union of Figure 5a and Figure 5b. Note thatbecause of canonical property of BDD, the union, actuallyuse less variables than either of them in this particular case.Due to space limitation, we refer readers to [3] for detailedinformation about BDD and only discuss those directly rel-evant to this paper in the following.

    The number of BDD variables used, V, is a constantdefined by the size of the defining variables. For the5-tuple superflow predicate, it is 104 (8 bits protocol,2x32 bits source and destination IP address and 2x16bits source and destination port).

    The number of BDD nodes used to describe a 5-tupleflow (Nf) is 104 as every bit variables is used.

    The number of BDD nodes used to describe a 5-tuplesuperflow (Ns) has an upper-bound of 104. This isbecause BDD ignores the unused bit variables, e.g.,the masked bits in CIDR IP address block.

    Since a flowset is formed by set operation among anumber of N superflows, the number of BDD nodesused to describe any flowset has an upper-bound thatis determined by the total number nodes used to defineeach flow. The actual number of nodes can be smallersince BDD keeps the canonical form.

    To determine if a packet matches a flowset, we extractthe relevant bits from the packet header and constructa corresponding BDD. Using the logical implicationoperation (), we can determine if the packet is partof the flowset.

    3. FLOWSET-BASED QUERY ANSWERING

    ENGINE (FQAE)

    Figure 6: Flowset-based Query Answering Engine.

    A major task of traffic measurement is to facilitate answer-ing user queries about the characteristics of certain trafficaggregates. These traffic aggregates can have very differ-ent granularities. For example, one might query for theFTP traffic to certain hosts (fine granularity) or a partic-ular ingress-egress pair of the network (coarse granularity).

    IEEE/ACM TRANSACTIONS ON NETWORKING, VOL. 19, NO. 1, FEB 2011

  • 7/29/2019 ProgME Towards Programmable Network MEasurement

    5/12

    As discussed in Section 1, current measurement systems col-lect fine-grained per-flow traffic statistics and leave it to in-dividual applications to perform post-processing to extractthe desired information. This approach is not scalable sincemodern networks could easily observe millions of flows.

    We make the observation that the total number of poten-tial user queries can be far smaller than the number of flowsit observes. If the measurement system has sufficient knowl-

    edge about the queries, it only needs to maintain aggre-gated state information that pertains to the queries, therebyavoiding the expensive per-flow states. In the following sec-tion, we present the Flowset-based Query Answering En-gine (FQAE) that is capable of answering any user querieson traffic aggregates while maintaining a minimum numberof counters. FQAE contains two fundamental blocks ameasurement engine that collects per-flowset traffic statis-tics and a program engine that takes a list of user queries(Q) as input and controls what to measure. The user queriesare written using FCL as illustrated in Table 3.

    Algorithm 1: D Disentangle(Q).

    input : A list of queries Q (|Q| = n > 0)

    output: A list of disjoint flowsets D

    D.append(U);1foreach x in Q do2

    for p in D do3if x p then // identical4

    break ;5else if x p then // subset6

    D.append(p \ x) ;7D.replace(p, x);8break ;9

    else if x p then // superset10x x \p ;11

    else if p

    Tx = then // overlap12

    D.append(p \ x) ;13D.replace(p, x

    Tp) ;14

    x x \p ;15else continue ; // disjoint16

    D.append(x) ;17

    To collect per-flowset traffic statistics, one needs to in-crease the counter associated with a flowset upon observ-ing a matching packet. This is similar to the classic packetclassification problem, but has the following distinct differ-ences. In packet classification, the goal is to find the bestmatching rule. Multiple rules can match a given packet, buta conflict resolution mechanism, e.g., longest-match-first inrouting or first-match-first in packet filtering, can be used todetermine the best matching rule. Once the best-matchingrule is found, other rules can be safely ignored. In our case,one packet might need to be counted for multiple matchingflowsets since queries might have non-empty intersections.

    One naive approach is to match a packet against all queriesone-by-one. This is inefficient when the number of queriesis large. As illustrated in Figure 6, our approach is to firstdisentangle the user queries to disjoint sub-queries such thateach packet matches exactly one sub-queries (details in Sec-tion 3.1). Consequently, we only need to find the onlymatching sub-query and increment its counter. We followthe similar approach as in EGT-PC [4] to achieve this goal

    (details in Section 3.2). One can certainly imagine usingother packet classification techniques to assist in identifyingthe matching sub-query. However, the tradeoffs in memoryand speed need to carefully explored. Please refer to [17] fora comparison of some packet classification algorithms.

    3.1 Disentangle User QueriesAlgorithm 1 generates disjoint sub-queries (D) from a list

    of user queries (Q). It works by adding the flowsets in Q toD in sequence. For every flowsets in Q, we compare it withflowsets in D in sequence. A pair of flowsets must satisfyone of the following relationship: identical (line 3), subset(line 6), superset (line 10), overlap (line 12), and disjoint(line 16). Therefore, one can use set operations to separatethe overlapped flowsets. Note that Algorithm 1 initiates Dwith one flowset the universe (U) (line 1). As user queriesmight not cover the universe, this step ensures the resultingD is complete (a partition ofU). Consequently, every packetis guaranteed to match exactly one flowsets in D.

    Figure 4 illustrates the effect of running Algorithm 1 onthe two queries in Table 3 (shown in Figure 3). The twoflowsets defining the original queries have nonempty inter-

    section. They divide the universe into four disjoint flowsets.Note that all operations in Algorithm 1 are performed usingthe underlying BDD-based data structure.

    3.2 Reduce Matching CandidatesSince the disjoint sub-queries D and is a partition of the

    universe U, every packet is guaranteed to match exactly oneflowset. However, the naive approach comparing a packetagainst each flowset until a match is found is still not anefficient solution when the number of flowsets in D is large.

    Figure 7: HashReduce Algorithm.

    FQAE introduces a hash table based mechanism calledHashReduce to reduce the number of comparisons requiredto find the matching flowset. We use a hash function thatsimply extracts several bits from the header fields. For ev-ery possible hash value H, we build a BDD Hbdd, whichdescribes a flowset containing all flows with this particu-lar value in the header. The table of matching candidates(TMC) can then be built by finding all flowsets in D thathas non-empty intersection with Hbdd. Consider Figure 7 asan example that uses the first bit from source IP and thefirst bit of destination IP field. The hash function, by ex-tracting two bits, divides the universe into four quadrants,each intersects with a few flowsets in D.

    The HashReduce mechanism follows the similar spirit asEGT-PC [4], which uses one or two header fields to find can-didate matching rules in n-tuple packet filter. Furthermore,it presents a tradeoff between memory and lookup speedthat can be fully customized. Using more bits in the hash

    IEEE/ACM TRANSACTIONS ON NETWORKING, VOL. 19, NO. 1, FEB 2011

  • 7/29/2019 ProgME Towards Programmable Network MEasurement

    6/12

    function incurs more memory overhead but can reduce thenumber of candidates in table entries.

    3.3 Collect and Report StatisticsCollecting traffic statistics is a simple two-step process.

    Upon receiving a packet, FQAE first uses the same hashfunction to extract the bits from the packet header andlookup the TMC for a list of candidate flowsets. Then,

    FQAE compares the packet to the flowset sequentially untila matching flowset is found.During the measurement process, FQAE performs traffic-

    aware optimization by sorting the order of candidates inthe TMC based on the number of packets observed earlier(TrafficSort). Note that this seemingly simple optimizationis possible only because FQAE make flowsets fully disjoint.If flowsets have non-empty intersections, finding the opti-mal order is NP-complete, and one will have to resolve toheuristics, as some have attempted in the context of packetfiltering [1, 18].

    Based on the statistics collected for each sub-queries, an-swering user queries requires a simple aggregation. Notethat the fundamental difference here, as compared to per-flow statistics, is that sub-queries are generated accordingto user queries and we expect the number to be significantlysmaller than the number of flows in traffic.

    Algorithm 2: Multi-Resolution Tiling.

    input : P: a packet enumeratorinput : R: a flowset defines the search rangeoutput: Eleph: A list of identified elephants

    Eleph {};1Mice {} ;2D Partition (R) ;3repeat4

    FQAE (D, P, S) ;5for F in D do6

    if Fw < then // no elephants7Mice.append (F);8

    else if |F| = 1 then // elephant9Eleph.append (F) ;10

    else if Fw >= then11D.replace (F, Partition (F)) ;12

    D.replace (Mice, union (Mice));13until ElephantsFound;14

    4. HEAVY HITTER IDENTIFICATIONHeavy hitters, or elephants, are the largest-n flows in

    terms of weight in network traffic. Alternatively, one candefine heavy hitters as flows with a weight larger than athreshold . These two notions are equivalent if the thresh-old equals the weight of the nth largest flow. In this paper,we use the latter definition unless mentioned otherwise. Wefurther assume the weight of a flow f, fw, is defined rela-tively as a percentage of total traffic. Identification of heavyhitters are of particular interest to network management.For example, traffic engineering often focus on re-routingthe few heavy hitters instead of worrying about the largenumber of mice [15].

    Identifying heavy hitter is trivial if one maintains a counterfor every single flow. However, this naive approach is notmemory-efficient and does not scale to large number of flows.

    We propose Multi-Resolution Tiling (MRT), which exploitsthe versatility of FQAE and offers scalable heavy hitter iden-tification. Our key idea is that one can, by observing aflowset, infer the characteristics of its subsets or objects (theflows). Therefore, one can selectively zoom into flowsets thatmight contain heavy hitters while ignoring others.

    4.1 Multi-Resolution Tiling

    Algorithm 2 presents the multi-resolution tiling (MRT) al-gorithm for identifying elephants. MRT starts from a rangeR, which is provided through user specification as a flowset.This enables one to only identify elephants belong to a cer-tain flowset, e.g., elephants that are TCP flows. If no userspecified R is given, MRT starts its sear set to U.

    At each iteration, MRT calls upon FQAE to match a listof S packets from P. For every flowset F (in D), MRT per-forms sequential hypothesis test (Section 4.2) to determineif Fw, the weight of F is larger than , the threshold defi-nition of elephant. MRT uses the following logical inferencerule (Eq. 4) to determine if a flowset can be ruled out thepossibility of having any elephants. The logical inferencerule states: if the weight of a flowset F, which is the sum of

    the weight of all flows in it, is smaller than , then none ofthe flow f in F can possibly be an elephant.

    Fw < fw < f F (4)

    If it is impossible for a flowset to contain any elephant, weexclude all flows in F from further consideration. Other-wise, we partition F into multiple disjoint flowsets and startanother iteration. The partition algorithm will b e discussedin great detail in Section 4.3. In essence, MRT keeps on fil-tering out flowsets that are impossible to contain elephantswhile zooming the focus on those that could. This itera-tion terminates when all the elephants are identified. Foridentifying threshold- elephants, this happens when all theflowsets with a weight larger than contain only one flow.

    For identifying largest-n elephants, this happens when thelargest n flowsets contain only one flow.

    4.2 Sequential Hypothesis TestingIn Algorithm 2, it is crucial to determine quickly if the

    weight of a flowset is larger than (Fw > ). We proposeto use sequential analysis, more specifically sequential prob-ability ratio test (SPRT) proposed by Wald [30], to achievethis. SPRT has been used successfully by Jung et al. [24] forport scan detection. Instead of using a fixed sample size todetermine the correctness of a hypothesis, sequential anal-ysis allows one to determine dynamically whether furtherobservation is required based on the current observation.

    Let H0 be the null hypothesis and H1 be the single alterna-

    tive. An ideal test procedure should satisfy user requirementon false positive rate () and false negative rate () whilerequiring the minimum number of observations. SPRT, forall practical purposes, can be regarded as such an optimumsequential test procedure.

    Let us denote the result of ith observation as Xi andthe result of a series of n observations as a vector X :. SPRT hinges on finding (X) theprobability ratio that this entire observation is producedwhen H1 is true as compared to the case when H0 is true.

    (X) =P{X|H1}

    P{X|H0}(5)

    IEEE/ACM TRANSACTIONS ON NETWORKING, VOL. 19, NO. 1, FEB 2011

  • 7/29/2019 ProgME Towards Programmable Network MEasurement

    7/12

    As described in Eq. 6, we compare (X) against two positivenumber A and B.3 . If (X) is greater than A (smallerthan B), we consider that there are strong enough statisticalevidence to accept (reject) the null hypothesis and the testterminates. Otherwise, we continue with more observations.

    Intuitively, (X) is an indicator of the likelihood whetherH0 or H1 is true.

    decision =

    8>:

    reject H0 (accept H1) if (X) > Aaccept H0 (reject H1) if (X) < B

    continue observation Otherwise

    (6)

    In order to determine if MRT should zoom into a partic-ular flowset F, we need to determine if the weight of F islarger than . Therefore, our null hypothesis H0 is Fw < and the alternative hypothesis H1 is Fw (Eq. 7). Sincethese two hypotheses are composite hypotheses, the actualhypothesis we used for testing is H0 and H

    1 in Eq. 8. Notethat ( < ) is chosen so that false positive rate issmaller or equal to . Similarly, + (+ > ) is selected sothat false negative rate is smaller or equal to

    H0 : Fw < and H1 : Fw (7)

    H0 : Fw = and H1 : Fw =

    + (8)

    For the ith packet (pi) observed, we use Xi to indicate ifit is a member of F(

    Xi = 1 if pi F

    Xi = 0 if pi / F(9)

    Therefore, Xi is a Bernoulli random variable with parameterFw.

    P{Xi = 1|H

    1} = + P{Xi = 1|H

    0} =

    P{Xi = 0|H

    1} = 1 + P{Xi = 0|H

    0} = 1 (10)

    With n packets, one observes a vector of random variable

    X :< X1, X2, , Xn >. If these n packets are randomlysampled, then Xi are all independently identically distributed(i.i.d). Therefore, (X) can be found as the product of theprobability ratio of every single observation (Eq. 11). Eq. 12defines (X) in log space, which is easier for computation,especially if (X) is incrementally updated.

    (X) =nYi=1

    (Xi) =nYi=1

    P{Xi|H1}

    P{Xi|H0}(11)

    log (X) =nXi=1

    log (Xi) (12)

    Let us denote the scenario that m among the n observed

    packets belongs to F as Xm

    n . The probability of observingXmn when H1 or H0 is true can be found as:

    P{Xmn |H

    1} = (+)m(1 +)nm (13)

    P{Xmn |H

    0} = ()m(1 )nm (14)

    Therefore, one can determine the probability ratio of Xmnas:

    log (Xmn ) = m log+

    + (n m)log

    1 +

    1 (15)

    3A > B. A and B are determined by the user prescribed

    strength (, ). A 1

    , B

    1

    Eq. 15 requires the knowledge ofn and m. Our FQAE rou-tine counts the number of packets matched by each partition(m). And n is simply the total number of packets observedso far. The value of log (X) can then be compared withlog A and log B as described in Eq. 6.

    4.3 Partition Strategies

    (a) C = 4 (b) C = 25 (c) C = 19

    (d) G = 2 (e) G = 25 (f) G = 64

    Figure 8: Partition Strategies.

    After determining that a flowset F might consist of oneor more elephants, we need to choose a partition of F sothat MRT can zoom into this flowset. Note that the num-ber of partitions ofF is huge4, even when the cardinality ofF (|F|) is only marginally large, say 10. Therefore, it is im-practical to explore every possible partition of F. Choosinga particular partition presents a tradeoff between memoryconsumption and speed in identifying elephants. We definethe memory cost factor C as the number of subsets gener-ated and the identification gain factor G as the cardinalityof original flowset over the total cardinality of remaining

    flowsets that might contain elephants.One natural strategy is to partition F into equal size sub-

    sets. Figure 8a and Figure 8b present two approaches withdifferent memory cost factor and Figure 8d and Figure 8epresent their respective results after one iteration. With alarge memory cost factor, one can partition the flowsets intomore smaller subsets. Consequently, it can exclude moreflowsets in a single iteration and achieves a larger gain fac-tor. Therefore, the optimal strategy is to use the largestmemory cost factor as long as it satisfies the memory con-straint. The number of iterations (N) required to identifythe elephants is:

    N = logC |U| (16)

    Without a priori knowledge about the elephants, equal-size partition is the optimal strategy. In reality, however,administrators do have knowledge to make educated guesses,which might further improve the speed of heavy hitter iden-tification. For example, one probably expect the protocolfield of elephants to be TCP or UDP in most networks. Fora particular network, certain IP addresses, e.g., Web/FTPserver and certain port numbers e.g., p ort 21 or 80, are morelikely to appear as elephants than others.

    4The exact number of possible partitions for a set with nelements can be found using Bell number recursively withBn+1 =

    Pnk=0

    `n

    k

    Bk and B0 = B1 = 1.

    IEEE/ACM TRANSACTIONS ON NETWORKING, VOL. 19, NO. 1, FEB 2011

  • 7/29/2019 ProgME Towards Programmable Network MEasurement

    8/12

    Using ProgME, it is easy to exploit user knowledge toimprove identification of elephants. Our approach is to usepreferential partitioning, which allow users to predefine flowsetswith an amplified memory cost factor C. This is illustratedin Figure 8c. The lower left quadrant is assigned a largermemory cost factor and is therefore partitioned into smallersubsets. Consequently, even though the memory consump-tion of the strategy in Figure 8c is lower than the strategy

    in Figure 8b, the identification gain is larger.The effectiveness of preferential partitioning relies heav-ily on the user to make correct guesses. We believe thisis an reasonable assumption for administrators monitoringnetwork behavior on a daily base.

    5. EVALUATION & DISCUSSIONIn this section, we evaluate the proposed ProgME frame-

    work, which has two major components the programmableengine (FQAE) and the adaptive controller (MRT). We firstlook at the scalability and accuracy of FQAE and use twoapplication scenarios to discuss the potential usage of FQAEin traffic engineering and security monitoring. We then dis-cuss the speed of MRT in identifying heavy hitters.

    5.1 Scalability of FQAEFQAE has unique advantage in its scalability, which is

    achieved by keeping per-flowset counters instead of per-flowcounters. We perform empirical evaluation on the scalabilityof FQAE by comparing the number of counters one has tokeep for flow-based and flowset-based measurement.

    {sip} {dip} {sip, dip}

    #1 53,191 214,411 336,463#2 52,762 127,543 293,519

    Table 4: Number of Flows in 5-minute Traces.

    Configs# flowsets

    Log-Only (Orig/Disj ) All (Orig/Disj)#1 19/22 40/55#2 0/0 35/38#3 0/0 800/845

    Table 5: Size of Queries.

    To understand the typical number of flows one should ex-pect on high speed links, we look at the packet traces col-lected at OC-48 links by CAIDA [33] on 04/24/2003. Wechoose to look at the 5-minute traces since 5-minute is atypical statistics report interval. As shown in Table 4, thesetrace files have a large number of flows (in the order of105106) even when using simple flow definitions like sourceor destination IP address. If we use the two-tuple {sip, dip}flow definition, the number of flows are even larger. Weonly present two traces but other traces have similarly largenumber of flows.

    Since we have yet to see production usage of FQAE, weemulate the scenario of network administrator querying livetraffic based on the production firewall configurations ob-tained from a tier-1 ISP and several campus networks. Weuse two approaches to emulate potential flowsets from thesefirewalls. In the first approach, we consider each LOG

    rule in the configuration file as a query for statistics. In thesecond approach, we consider every filtering rule as a query.Table 5 presents the number of user queries based on severalfirewall configurations. One can observe that the number ofqueries or disjoint sub-queries are significantly smaller thanthe number of flows one would observe from traffic traces.Note that such emulation does not fully utilize the capabil-ity of FQAE to reduce counters as we make a conservative

    assumption that every rule corresponds to a query.One might argue that the number of independent flowsetsgenerated by n user queries (denoted as m) can also be large.This is a legitimate concern since m = 2n in the worst casewhen every new flowset overlaps with all existing flowsets(Algorithm 1, line 12). However, we argue that the numberof flowsets cannot be larger than the number of active flows.One can ensure that every flowset contains at least one activeflow by aggregating flowsets with no active flows into onelarge flowset. Furthermore, our study on filter rules showthat only a small portion of the rules overlaps with otherrules. Consequently, the number of disjoint sub-queries (m)is only moderately larger than the number of queries (n)instead of being close to 2m. This is also consistent withearlier study on firewall and router configurations. For ascenario of 300 queries with every 3 rules overlapping witheach other, the number of disjoint flowsets one has to main-tain counter for is just 700, which is significantly smallerthan the number of flows on most high-speed links.

    The reduced number of counters has multiple implicationsto the measurement architecture. First, it makes it possi-ble to store the counters in the faster registers or SRAM.This is crucial for high-speed network devices. Second, itreduces the volume of data to b e exported. Currently, CiscoNetFlow imposes a minimum five minutes interval betweensubsequent exports so that the measurement data, probablycoming from multiple vantage points in the network, will notoverload the network. With the reduced number of counters,one can monitor the network at a higher temporal resolution

    and thus be more responsive to any anomalous events.

    5.2 Memory Cost of FlowsetsAlthough FQAE can reduce the number of counters, a le-

    gitimate concern is that how much memory one has to spendfor maintaining the underlying data structure of flowsets. Tounderstand the memory cost associated with a flowset, wefirst look at a practical scenario of building a flowset repre-senting all the bogon IP addresses in Figure 9a. We add eachCIDR block in the current bogon list [29] one-by-one usingthe union operation and plot the corresponding number ofBDD nodes required to represent this flowset (FQAE). Forcomparison, we plot the cardinality of the flowset and ob-serve that the cardinality of the flowset increase significantlyfaster than the number of BDD nodes used to describe it.Furthermore, we plot the total number of BDD nodes usedto describe each CIDR blocks. Without using FCL, a listrepresentation of all the CIDR blocks (BDD w/o FCL) willrequire more than five times memory. Note that the last bo-gon entry is 224.0.0.0/3 which could match 229 unique sourceIP address, thus the sharp increase in the cardinality of theflowset at the right end. However, its BDD representationrequires only three nodes. In the case of using FCL to con-struct the flowset, only one additional node is required.

    Figure 9b looks at the number of BDD nodes associatedwith randomly generated flowsets. On the X-axis, we vary

    IEEE/ACM TRANSACTIONS ON NETWORKING, VOL. 19, NO. 1, FEB 2011

  • 7/29/2019 ProgME Towards Programmable Network MEasurement

    9/12

    10 20 30 40 50 60 70

    # Total Bogon Entries

    0

    100

    200

    300

    400

    500

    600

    #

    BDD

    Nodes

    10 20 30 40 50 60 700.0

    0.2

    0.4

    0.6

    0.8

    1.0

    1.2

    1.4

    1.6

    1.8

    #

    Flows

    x1e+9

    FQAEBDD w/o FCL

    Cardinality of FlowSet

    (a) Bogons

    0 10 20 30 40 50 60

    # Primitives

    0

    200

    400

    600

    800

    1000

    1200

    1400

    1600

    1800

    #B

    DD

    Nodes

    (b) Random Flowsets

    Figure 9: Memory Cost of Flowsets.

    the number of primitives used to define a flowsets. Eachprimitive is defined by a two-tuple {sip, dip} with both masklengths varying between 7 and 26. We randomly choose setoperators (, , \) to join the primitives so that they col-lectively defines a non-empty flowset. One can observe that

    the maximum number of nodes used to describe a flowsetgrows linearly with the number of primitives. This is con-sistent with our discussion in Section 2.3 and happens whenthe BDD representations of the primitives do not share com-mon path. It is however quite possible for flowsets involvinglarger number of primitives to require less number of BDDnodes. The average number of BDD nodes for a flowsetgrows sub-linearly with the number of primitives. Note thatthe memory required to define a flowset depends only on theprimitives and the set operators and is independent of thetraffic pattern it measures.

    One might notice that we used the number of BDD nodesinstead of the more direct bytes to evaluate memory con-sumption. This is because there are many BDD packageswith node size varying between 8 and 36 bytes. Our cur-rent implementation is based on BuDDy [26], which uses 20bytes per node. We believe that porting ProgME to anotherBDD package is easy and will not require any change to itsalgorithms. Please refer to [23] for a comprehensive surveyon various BDD packages.

    5.3 Accuracy of FQAEThe accuracy of measurement results is of paramount con-

    cern for every management application. Existing flow-basedmeasurement tools use average per-flow error as the pri-mary measure of accuracy. Facing the challenge p osed bythe large number of flows, some recent research propose to

    keep counters preferentially for large or long-lived flows whileexcluding mice from occupying counters (more details inSection 6). Such techniques effectively produce biased flowstatistics that results in smaller average error than unbiasedrandom sampling. Note that unbiased random sampling hasa natural tendency to favor large flows because small flowshave a higher chance not being sampled. Ideal unbiasedper-flow statistics is only possible when every single flow is

    counted. Please refer to [15] for comparison on the averageerror using different techniques.

    (a) Flows (b) Unbiased (c) Biased

    Figure 10: Flow-based Estimation.

    For a management application, lower average error does

    not always translate to higher accuracy for the answers totheir queries, which directly affects their decisions and ismore important. Consider the scenario depicted in Fig-ure 10. The original traffic has some elephants and mice(Figure 10a). Figure 10b presents the ideal measurementresults for the four queries on each quadrant if every sin-gle flow is recorded. Ignoring mice cause limited errors onqueries dominated by elephants. However, for queries in-volving mostly mice (the top left quadrant in Figure 10c),the error can be very high.

    Queries dominated by mice do have practical importancein network planning and monitoring. Typical examples areICMP, DNS, and routing traffic. Although the absolute vol-ume of these traffic might be small, their relative volume

    variation could be a useful indicator for administrators. Bi-ased statistics that ignores these traffic is not suitable formonitoring mice-dominated traffic. More importantly, bi-ased statistics makes it possible for attackers to evade thedetection of volume-based monitoring tools. An attacker cangenerate a large number flows, each with a different spoofedsource IP address and small number of packets. Since theseindividually small flows are likely to be ignored by both bi-ased and unbiased per-flow measurement, monitoring toolsbased post-processing of these statistics might fail to detectthese kind of attacks.

    If there were no memory limitation and statistics could bemaintained for every flow, per-flow statistics could achievehigh per-query accuracy under any traffic condition. FQAEachieves the same effect by counting for each query directly.The analytical proof is skipped in this paper due to spacelimit. Intuitively, If every single flow is recorded, it doesmatter whether post-aggregation or pre-aggregation is used.

    5.4 Case Studies on FQAEIn this section, we present two case studies illustrating

    how administrators can use FQAE to accomplish their mea-surement goals. To use FQAE, one need to use FCL to spec-ify the measurement queries. These two case studies showthat it is not easy to produce the flowset definitions definingpractical measurement tasks. We also compare FQAE withthe following approaches:

    IEEE/ACM TRANSACTIONS ON NETWORKING, VOL. 19, NO. 1, FEB 2011

  • 7/29/2019 ProgME Towards Programmable Network MEasurement

    10/12

    1. Per-Flow: the ideal case that every flow is tracked.

    2. Elephant: methods that produce biased statistics thatfavors heavy hitters, as discussed in Section 5.3.

    3. Superflow: In many routers and firewalls, it is possi-ble to configure LOG rules to collect traffic statisticsof superflows. LOG rules are similar to accept/droprules except that its only operation is to increment the

    counter when a matching packet is observed. Thereis a large amount of research on packet classifiers, butfor comparison purposes, we consider the most widelydeployed variation, where a packet traverses throughthe rules sequentially until the first matching is found.

    5.4.1 Deriving Traffic Demand

    Our first task is to collect traffic statistics for derivingthe traffic matrix of an ISP backbone. In particular, weconsider the case that an administrator wants to measurethe traffic going through a particular ISP with a list of ASnumber Y1, Y2, , Yn

    5. Such measurement has importantapplication in traffic engineering and network planning.

    # Counters Accuracy

    Per-Flow 106 HighElephants 103 GoodSup erflow 1.7 105 High

    FQAE 1 High

    Table 6: Comparison on Deriving Traffic Demand.

    The classical approach proposed by Feldmann et al. [16]is to perform per-flow measurement on ingress router andthen, based the routing table at that moment, aggregatethe flow statistics to find traffic demands. They also ob-served that around 1,000 elephants account for about 80%of the traffic demands. Therefore, techniques that ignores

    mice should still return sufficiently good statistics in gen-eral. One could associate a counter with every routing ruleto collect statistics for each prefix (superflow) and then per-form aggregation. However, since current BGP table carriesaround 170,000 prefixes [34], such approach will generate alarge amount of data.

    10000 20000 30000 40000 50000 60000 70000 80000

    # Total Prefixes

    0

    10000

    20000

    30000

    40000

    50000

    60000

    70000

    80000

    90000

    #B

    DD

    No

    es

    Figure 11: Memory of Prefixes

    We propose a two-step process to pre-process the routingtable and compute the flowset that will go through AS Y.First, we process the routing table to find all prefixes thatcontains any of Yi, Y2, , Yn in its AS path. Then we use

    5The registration of AS number can be found at [31].

    FCL to compute the union of the selected prefixes to findthe flowset. We experiment this approach on the BGP rout-ing table dumped by the Route Views project [36] and findthis approach viable. We identified 84,312 prefixes (among atotal of 188,275 prefixes in the routing table) that might tra-verse through this tier-1 ISP (with 13 AS numbers) on its ASpath. Figure 11 presents the BDD nodes used throughoutour computation. The final flowset that represents the union

    of them requires a total of 70,291 BDD nodes (1.4MB usingBuDDy and can be reduced to 560KB using other packages).At the beginning, adding new prefixes causes the BDD torequire more nodes to enumerate more paths. However, thenumber of BDD nodes used to describe such flowset peakat about 80,000 nodes (56,000 prefixes) and decreases withmore prefixes. This is because the large number BDD pathsactually present more opportunity for BDD to summarizethe entire sub-tree into one node.

    5.4.2 Tracking Bogons

    The second task we consider is to track bogons, which arepackets with reserved or unallocated source IP addresses.Packets from these addresses have no legitimate reason toappear on the Internet but these addresses are often usedby spammers or attackers. Since these source IP addressesare spoofed, differentiating them is not meaningful. Ad-ministrators would normally want to track the aggregatedvolume of bogons as a single metric. Furthermore, adminis-trators have to be prepared for the worst case since this is asecurity-oriented application.

    # Counters Accuracy Computation/Pkt

    Per-Flow 109 High 1 HashSuperflow 71 High 35.5 match

    FQAE 1 High 1 bdd impElephants 103 Low

    Table 7: Comparison on Tracking Bogons.

    The current bogon list [29] has 71 non-aggregated CIDRblocks (about 109 unique IP addresses). Keeping per-flowcounter for these bogons is clearly unrealistic, even though ithas high accuracy and requires only a single hash operationto derive the flow ID. Techniques that focuses on elephantsare not suitable here as we discussed in Section 5.3. Forsuperflow-based measurement, a packet will be comparedwith 35 bogon IP blocks on average. Using FQAE, one canpre-compute the union all 71 CIDR blocks in bogon list asone flowset (as in Figure 9a). Consequently, one only needsto maintain one counter for all packets with bogon source.

    5.5 Speed of MRTIn network monitoring, especially if it is security-related,

    it is important to detect a heavy hitter in the shortest timepossible. In addition to the memory cost factor, the samplenumber required for the hypothesis to be conclusive (de-noted as N) is another key parameter. For a flowset withweight Fw, the expected value ofN (E[N]) is a joint functionof +, Fw, and , as in Eq. 17.

    E[N] =L(Fw)log B + (1 L(Fw))log A

    Fw log+

    + (1 Fw)log

    1 +

    1

    (17)

    In Eq. 17, L() is the operating characteristics (OC) function

    IEEE/ACM TRANSACTIONS ON NETWORKING, VOL. 19, NO. 1, FEB 2011

  • 7/29/2019 ProgME Towards Programmable Network MEasurement

    11/12

    of the test. Directly evaluating L(Fw) is difficult. Therefore,Wald [30] proposed a numerical method (pg. 51) to evaluateL(Fw), which we used here to calculate E[N].

    10-3

    10-2

    10-1

    100

    Actual Weight of Flowset %

    0

    500

    1000

    1500

    2000

    AverageSampleNum

    ber

    10:0=

    1:0=

    10:0==50:0==1:0==

    Figure 12: Average Sample Number E[N].

    Figure 12 presents E[N] under various scenarios. For a

    given and , Average sample number (ASN) is larger whenFw is close to the threshold and is small when the weightis either significantly larger or smaller than . This prop-erty presents a much desired feature for heavy hitter iden-tification heavier elephants will be identified faster thannot-so-significant elephants.

    One can use Figure 12 together with Eq. 16 to determinethe expected speed of MRT in identifying elephants. Con-sider the case that we want to find all flows with weightlarger than 0.01 and one flow f has a weight of 0.1. Theworst case scenario is that f is the sole flow in the flowsetthat covers it. In this case, it takes an average of 26 samplesfor the hypothesis test to conclude that MRT should zoominto this flowset. For a two-tuple {sip, dip} definition of flow

    and a memory cost factor of 256, it takes eight iterations,i.e., 208 packets to identify the ID of this flow. Note thisis the theoretical worst-case and the actual speed of MRTdepends on the traffic pattern and could be faster.

    6. RELATED WORKOnline aggregation [2, 22] has received considerable atten-

    tion in the database community. A typical example is to findthe sum or average of a large number of objects. Instead ofrunning through a large number of objects and return anaccurate result after a long latency, such systems use sta-tistical methods to provide running (online) estimation sothat users can decide in real time whether to continue. If adatabase of flow/packet records has been built, such a sys-tem can be adapted to query a database of flow records. Theproposed flowset composition language (FCL) can be usedfor efficient specification of user queries, and FQAE can beused for aggregation on the database side.

    There are several work on producing traffic summary oridentifying hierarchical heavy hitters. Aguri [8] is a trafficprofiler that aggregates small flow records (both temporaland spatial) until the aggregated weight is larger than a cer-tain threshold. Autofocus [14, 32] is an traffic analysis andvisualization tool that finds both uni-dimensional or multi-dimensional clusters from traffic trace or flow records. Thesetools requires per-flow statistics to make summary bottom-

    up. They are more engineered to work offline to find aneffective presentation of traffic statistics but cannot improvethe scalability of the measurement tools. There are someonline variants that identify hierarchical heavy hitters with-out maintaining per-flow counters. Zhang et al. [38] appliedpacket classification algorithms dynamically (upon reachinga fixed threshold) to identify hierarchical heavy hitters top-down. The MRT algorithm in this paper also zoom into

    the heavy hitters top-down, but use SPRT to update theflowsets with proved optimality. Both offline and online ag-gregation are along hierarchies and driven entirely by traffic.They do not consider the different preference administratorsmight have, e.g., to cluster traffic on port 80 with port 8000instead of port 81.

    In Section 5.3, we compared FQAE with techniques thatproduce biased flow records to reduce resource consump-tion. This is exemplified by the seminal work by Estan andVarghese [15] which calls to focus on the elephants and ig-nore the mice in flow statistics collection. They proposedtwo techniques, namely sample and hold and multistage fil-ter, to achieve this goal. Of similar spirit are the work usingsmart sampling techniques. Threshold sampling [9, 11] is astream-based method fits ideally for online monitoring. Pri-ority sampling [10] follows the similar spirit of online aggre-gation and is more suitable for querying a database of flowrecords. Another elegant formulation are the coincidence-based techniques [19, 20, 25] that exploit the fact that oneis more likely to observe n consecutive packets from thesame flow if the flow is large or long-lived. These techniquesfavors large flows without knowledge of user requirements,thus unsuitable when mice, e.g., DDoS traffic, are of inter-est. ProgME can complement these techniques by definingflowset that should receive preferential treatment, e.g., bysetting different thresholds for different flowsets. ProgMEcan also use some of those techniques to improve its adap-tive engine. For example, one could use coincidence-basedtechniques together with SPRT to improve the zooming pro-

    cess of the MRT algorithm.Adaptive NetFlow (ANF) [13] is a scheme that dynami-

    cally adapts the sampling rate and the size of time bin inorder to reduce the number of flow records while maintain-ing the accuracy. ProgME and ANF are complementary toeach other since ProgME offers spatial adaptability whileANF achieves temporal adaptability.

    7. CONCLUSIONIn this paper, we presented ProgME, a framework for pro-

    grammable network measurement. The core idea of ProgMEis to collect traffic statistics based on a novel and versatileconcept of flowset i.e., arbitrary set of flows, instead of thetraditional inflexible concept of flow. The core of ProgMEis a flowset-based query answer engine (FQAE), which canbe programmed by users and applications via the proposedflowset composition language. Knowledge about user re-quirements offers measurement tools a fresh perspective andenables them to adapt itself by collecting statistics accordingto the tasks at hand. We further extended ProgME with anadaptive multi-resolution tiling (MRT) algorithm that caniteratively re-program itself to identify heavy hitters. Weshow that ProgME, being a versatile tool, can adapt to dif-ferent measurement tasks. We believe ProgME is a usefuladdition to the arsenal of measurement tools.

    IEEE/ACM TRANSACTIONS ON NETWORKING, VOL. 19, NO. 1, FEB 2011

  • 7/29/2019 ProgME Towards Programmable Network MEasurement

    12/12

    8. REFERENCES[1] S. Acharya, J. Wang, Z. Ge, T. F. Znati, and

    A. Greenberg. Traffic-aware firewall optimizationstrategies. In Proc. International Conference onCommunications, 2006.

    [2] N. Alon, N. G. Duffield, C. Lund, and M. Thorup.Estimating sums of arbitrary selections with fewprobes. In PODS, 2005.

    [3] H. R. Andersen. An introduction to binary decisiondiagrams. http://www.it.dtu.dk/~hra, 1998.

    [4] F. Baboescu, S. Singh, and G. Varghese. Packetclassification for core routers: Is there an alternativeto CAMs? In Proc. IEEE INFOCOM, 2003.

    [5] N. Brownlee. Traffic Flow Measurement: Experienceswith NeTraMet. RFC 2123, 1997.

    [6] N. Brownlee, C. Mills, and G. Ruth. Traffic FlowMeasurement: Architecture. RFC 2722, 1999.

    [7] R. E. Bryant. Graph-based algorithms for booleanfunction manipulation. IEEE Trans. Computers,35(8), 1986.

    [8] K. Cho, R. Kaizaki, and A. Kato. Aguri: Anaggregation-based traffic profiler. In Proc. Quality ofFuture Internet Services, 2001.

    [9] N. Duffield and C. Lund. Predicting resource usageand estimation accuracy in an IP flow measurementcollection infrastructure. In Proc. InternetMeasurement Conference, 2003.

    [10] N. G. Duffield, C. Lund, and M. Thorup. Flowsampling under hard resource constraints. In Proc.ACM SIGMETRICS, 2004.

    [11] N. G. Duffield, C. Lund, and M. Thorup. Learn more,sample less: control of volume and variance in networkmeasurement. IEEE Trans. Information Theory, 51,2005.

    [12] D. Eppstein and S. Muthukrishnan. Internet packetfilter management and rectangle geometry. InSymposium on Discrete Algorithms, 2001.

    [13] C. Estan, K. Keys, D. Moore, and G. Varghese.Building a better NetFlow. In Proc. ACM SIGCOMM,2004.

    [14] C. Estan, S. Savage, and G. Varghese. Automaticallyinferring patterns of resource consumption in networktraffic. In Proc. ACM SIGCOMM, 2003.

    [15] C. Estan and G. Varghese. New directions in trafficmeasurement and accounting: Focusing on theelephants, ignoring the mice. ACM Trans. ComputerSystems, 2003.

    [16] A. Feldmann, A. Greenberg, C. Lund, N. Reingold,J. Rexford, and F. True. Deriving traffic demands for

    operational IP networks: Methodology andexperience. In Proc. ACM SIGCOMM, 2000.

    [17] A. Feldmann and S. Muthukrishnan. Tradeoffs forpacket classification. In Proc. IEEE INFOCOM, 2000.

    [18] H. Hamed and E. Al-Shaer. Dynamic rule-orderingoptimization for high-speed firewall filtering. In ACMSymposium on InformAtion, Computer and

    Communications Security, 2006.

    [19] F. Hao, M. S. Kodialam, and T. V. Lakshman.ACCEL-RATE: a faster mechanism for memoryefficient per-flow traffic estimation. In Proc. ACMSIGMETRICS, 2004.

    [20] F. Hao, M. S. Kodialam, T. V. Lakshman, andH. Zhang. Fast, memory-efficient traffic estimation bycoincidence counting. In Proc. IEEE INFOCOM, 2005.

    [21] S. Hazelhurst, A. Attar, and R. Sinnappan.

    Algorithms for improving the dependability of firewalland filter rule lists. In Proc. Dependable Systems andNetworks, 2000.

    [22] J. M. Hellerstein, P. Haas, and H. Wang. Onlineaggregation. In Proc. ACM SIGMOD, 1997.

    [23] G. Janssen. A consumer report on BDD packages. InProc. IEEE Symp. Integrated Circuits and Systems

    Design, 2003.

    [24] J. Jung, V. Paxson, A. W. Berger, andH. Balakrishnan. Fast portscan detection usingsequential hypothesis testing. In Proc. IEEE Symp.Security & Privacy, Oakland, CA, 2004.

    [25] M. Kodialam, T. Lakshman, and S. Mohanty. RunsbAsed Traffic Estimator (RATE): A simple, memory

    efficient scheme for per-flow rate estimation. In Proc.IEEE INFOCOM, 2004.

    [26] J. Lind-Nielsen. BuDDy version 2.4.http://sourceforge.net/projects/buddy, 2004.

    [27] P. Phaal, S. Panchen, and N. McKee. InMonCorporations sFlow: A Method for Monitoring Trafficin Switched and Routed Networks. RFC 3176, 2001.

    [28] D. Plonka. FlowScan: A network traffic flow reportingand visualization tool. In Proc. USENIX LISA, 2000.

    [29] Team Cymru. The Team Cymru Bogon List v3.4.http://www.cymru.com/Documents/bogon-list.html,Jan 2007.

    [30] A. Wald. Sequential Analysis. John Wiley & Sons,1947.

    [31] AS names.http://bgp.potaroo.net/cidr/autnums.html.

    [32] Autofocus. http://ial.ucsd.edu/AutoFocus/.

    [33] CAIDA: Cooperative Association for Internet DataAnalysis. http://www.caida.org/home/.

    [34] CIDR report. http://www.cidr-report.org/, Jan2007.

    [35] NetFlow v9 Export Format. http://www.cisco.com/univercd/cc/td/doc/product/

    software/ios123/123newft/123_1/nfv9expf.htm.

    [36] University of Oregon Route Views project.http://www.routeviews.org/.

    [37] L. Yuan, J. Mai, Z. Su, H. Chen, C.-N. Chuah, and

    P. Mohapatra. FIREMAN: A Toolkit for FIREwallModeling and ANalysis. In Proc. IEEE Symp. Security& Privacy, 2006.

    [38] Y. Zhang, S. Singh, S. Sen, N. Duffield, and C. Lund.Online identification of hierarchical heavy hitters:algorithms, evaluation, and applications. In Proc.Internet Measurement Conference, 2004.

    IEEE/ACM TRANSACTIONS ON NETWORKING, VOL. 19, NO. 1, FEB 2011