11.07.2015 Views

A Data Streaming Algorithm for Estimating Entropies of OD Flows

A Data Streaming Algorithm for Estimating Entropies of OD Flows

A Data Streaming Algorithm for Estimating Entropies of OD Flows

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>for</strong>mula. However, computing Formula (9) requires thousands<strong>of</strong> CPU cycles, and it is not possible to per<strong>for</strong>m 40such computations <strong>for</strong> each incoming packet.Our solution <strong>for</strong> speeding up the computation <strong>of</strong> these stablehash functions (i.e., sh ′ js) is to per<strong>for</strong>m memory lookupsinto precomputed tables (also in RDRAM DIMM 6400) asfollows. Note that in the RHS <strong>of</strong> (9), the term in the firstbracket is a function <strong>of</strong> only θ and the term in the secondbracket is a function <strong>of</strong> only r. For implementing eachsh j we now fix two uni<strong>for</strong>m hash functions uh j1 and uh j2that map a flow identifier pkt.id to two index values uni<strong>for</strong>mlydistributed in [1..N 1] and [1..N 2] respectively. Weallocate two lookup tables T 1 and T 2 that contain N 1 andN 2 entries respectively, and each table entry (<strong>for</strong> both T 1and T 2) contains l = 20 blocks <strong>of</strong> 4 bytes each. Then weprecompute N 1 ∗ 20 i.i.d. random variables distributed asthe term in the first bracket and fill them into T 1, andprecompute N 2 ∗ 20 i.i.d. random variables distributed asthe term in the second bracket and fill them into T 2. Foreach incoming packet, we simply return l = 20 randomvalues T 1[uh j1(pkt.id)][j] ∗ T 2[uh j2(pkt.id)][j], j = 1, ..., 20,as the computation result <strong>for</strong> sh 1(pkt.id), sh 2(pkt.id), ...,sh l (pkt.id). Since each sub-sketch requires two tables, weneed a total <strong>of</strong> four tables. In our implementation, both N 1and N 2 are set to fairly large values like 1M. Our simulationshows that stable distribution values generated this way isindistinguishable from real stable distribution values. Notethat our implementation is very fast: two memory reads (4bytes each) and a floating point multiplication <strong>for</strong> computingeach sh j(pkt.id). Note also that index values uh j1(pkt.id)and uh j2(pkt.id) generated <strong>for</strong> estimating the L 1+α normcan be reused <strong>for</strong> the lookup operations per<strong>for</strong>med in estimatingthe L 1−α norm, since all entries in these four tablesare mutually independent.For our distributed algorithm in Section 5 to work, weneed all the nodes to use identical lookup tables, and identicaluni<strong>for</strong>m hash functions that are used to map into thelookup tables. One way to ensure the identical lookup tablesis to distribute a random value to every ingress and egressnode and to use it as the seed to each <strong>of</strong> their (identical)pseudorandom number generators.8. EVALUATIONIn this section, we evaluate the per<strong>for</strong>mance <strong>of</strong> our algorithmusing real packet traces obtained from a tier-1 ISP.8.1 <strong>Data</strong> GatheringWe deployed a packet monitor on a 1 Gbit/second ingresslink from a data center into a large tier-1 ISP backbone network.The data center hosts tens <strong>of</strong> thousands <strong>of</strong> Web sitesas well as servers providing a wide range <strong>of</strong> services such asmultimedia, mail, etc. The link monitored is one <strong>of</strong> multiplelinks connecting this data center to the Internet. All thetraffic carried by this link enters the ISP backbone networkat the same ingress router. For each observed packet, themonitor captured its IP header fields as well as UDP/TCPand ICMP in<strong>for</strong>mation required <strong>for</strong> the flow definition weconsidered.We collected a number <strong>of</strong> five-minute traces and a onehourtrace in April 2007. We use the routing table dumpedat the ingress router to determine the egress router <strong>for</strong> eachpacket, thus determining the <strong>OD</strong> flows to each possible egressrouter. Because we don’t have the packet monitoring capabilityat egress routers, we chose to generate synthetic traffictraces at egress routers so that they contain corresponding<strong>OD</strong> flows observed at the ingress router. We can furtherdictate the flow size distribution at egress routers. In mostcases, we make them match the flow size distribution <strong>of</strong> theingress trace.In the rest <strong>of</strong> the paper, we will mostly use the followingtwo traces to illustrate our results. 5• Trace 1: A one hour trace collected at 9:41pm on April25, 2007. It contains 0.4 billion packets which belongto 1.8 million flows. We chose one egress router sothat the traffic between the origin and destination comprised<strong>of</strong> 5% <strong>of</strong> the total traffic arriving at the ingressrouter.• Trace 2: A five minute trace collected at 10:06pm onApril 25, 2007. Similar to Trace 1, the traffic betweenthe origin and our chosen egress router comprised <strong>of</strong>5% <strong>of</strong> the total traffic arriving at the ingress router.The traffic in this trace is purposely chosen as beinga subset <strong>of</strong> the traffic <strong>for</strong> Trace 1 so that we can directlycompare the per<strong>for</strong>mance <strong>of</strong> our algorithm <strong>for</strong>five minutes and one hour intervals.8.2 Experimental SetupFor each trace, we repeat each experiment 1000 times withindependently generated sketch data structures and computethe cumulative density function <strong>of</strong> the relative error.Unless stated otherwise, the parameters we used <strong>for</strong> eachexperiment were: number <strong>of</strong> buckets k = 50, 000, number <strong>of</strong>registers in each bucket l = 20, sample and hold samplingrate P = 0.001, and one million entries in each lookup table.In our experiments, we also define an elephant flow (<strong>for</strong>which the contribution to the entropy are computed separately)to be any flow with at least N = 1000 packets. Weuse α = 0.05, which satisfies the constraint α < 1/ ln N.Hence, at every ingress and egress point we have a pair <strong>of</strong>sketches computing the L 1.05 and L 0.95 norms <strong>of</strong> the traffic.8.3 Experimental ResultsFormulae 1 and 2: Recall from Section 5 that we had two<strong>for</strong>mulae <strong>for</strong> estimating the L p norms, i.e.,• Formula 1:• Formula 2:“ ”L( O) ⃗ p +L( D) ⃗ p −L( O− ⃗ D) ⃗ p 1/p2“L( ⃗ O+ ⃗ D)p −L( ⃗ O− ⃗ D)p2 p ” 1/p.We first compare the experimental results <strong>for</strong> these two<strong>for</strong>mulae. The cumulative density plots <strong>for</strong> the error <strong>of</strong> ouralgorithm using these two <strong>for</strong>mulae <strong>for</strong> Trace 1 are given inFigure 2. We observe that both <strong>for</strong>mulae have reasonablysmall and comparable error values. This observation alsoholds on all five minute traces and hence we fix and useFormula 1 <strong>for</strong> the rest <strong>of</strong> our evaluation.Varying number <strong>of</strong> buckets: We study the effect <strong>of</strong> varyingthe number <strong>of</strong> buckets on the per<strong>for</strong>mance <strong>of</strong> our algorithm.Keeping all other parameters fixed at reasonablevalues, we varied the number <strong>of</strong> buckets between k = 5000and k = 80000, with increasing factors <strong>of</strong> two. Figure 3shows the results <strong>of</strong> Trace 2. We observe that increasing thenumber <strong>of</strong> buckets increases the accuracy (as expected), butwith diminishing returns.5 The results on other five minute traces are very similar.We omit them here <strong>for</strong> sake <strong>of</strong> brevity.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!