SCAP: Smart Caching in Wireless Access Points to Improve...

30
SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming Enhua Tan 1 , Lei Guo 1 , Songqing Chen 2 , Xiaodong Zhang 1 1 The Ohio State University 2 George Mason University ICDCS’07, Toronto, Canada 1

Transcript of SCAP: Smart Caching in Wireless Access Points to Improve...

Page 1: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

SCAP: Smart Caching in Wireless Access Points to Improve P2P

Streaming

Enhua Tan1, Lei Guo1, Songqing Chen2, Xiaodong Zhang1

1The Ohio State University2George Mason University

ICDCS’07, Toronto, Canada 1

Page 2: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Background

Wireless access to Internet is pervasive:On campus, in offices, at home, and public utilitiesMost are supported by Wireless LANs

Peer-to-Peer applications are widely used:Streaming: PPLive, Joost, etc …VoIP: Skype, etc …Large file distribution: BitTorrent, etc …

Our Focus: Interaction between wireless users and P2P streaming applications

2

Page 3: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Wired/wireless Communications

WLAN

Internet

Access Point (AP)

Wireless users

Wired users

3

Page 4: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

P2P Streaming for Wired/wireless Users:Workflow

WLAN

Internet

Wireless Peer

Viewing Peer

Access Point

Source Peer

4

Page 5: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

P2P Streaming for Wired/wireless Users: Problems

WLAN

InternetDownstream traffic for other wireless users AFFECTED

Generating upstream traffic

Source Peer

Streaming quality degradedWireless Peer

(Relay/Viewing)

Viewing PeerStreaming content

Other packets5

Page 6: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

6

Problem Summary

Peers in WLAN may relay streaming content by uploading a lot of traffic:

Congest the WLAN due to channel competitionsProvide low quality of service to the Internet peers

Downstreams have lower priority due to upstreamsExtra upstream traffic:

further increase the number of transmission errorsincrease the cost of contention window back-off

Major problem source: upstream relay trafficupstream relay trafficCan we minimize upstream traffic with low overhead?

to improve WLAN throughputto improve service quality for Internet peers

Page 7: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

7WLAN

Internet

Wireless Peer

Viewing Peer

Access Point

The same content is transferred twice in

the WLAN!Duplicated traffic

P2P Streaming for Wired/wireless Users:Workflow

Source Peer

Page 8: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Contributions

Our measurements show that > 75% upstream traffic is duplicated with the downstream traffic for three representative applicationsSCAP: Smart Caching in the Access Point for minimizing upstream traffic: design & prototype implementationEvaluation results show SCAP can improve the throughput of the WLAN by up to 88%:

SCAP also reduces the delay to Internet peers8

Page 9: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Outline

Problem Summary and ContributionsMeasurement & Analysis of P2P Streaming TrafficSCAP Design & ImplementationEvaluationSummary

9

Page 10: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Measurement & Analysis of P2P Streaming Traffic

Aim to answer two questions:How much duplicated traffic in practice?How much overhead in identifying such duplications?

Measurement:Collect traces of three representative P2P live streaming applications: PPLive, ESM, and TVAntsIn LAN (100Mbps) and WLAN (802.11b)

10

Page 11: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Workload Statistics

Downstream throughput is typically 300~400KbpsUpstream traffic to downstream traffic:

Can be as large as 10 times for PPLive due to its popularityBetween 2 to 4 times for TVAntsNot too much for ESM

PPLive and ESM: most in TCPTVAnts: 74% in UDP for WLAN

11

Page 12: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

12

Downstream packetDownstream packetFIFO bufferFIFO buffer

Duplication Detection Methods:Fixed Hashing

Offline workload analysis:Fixed Hashing (FH)

Compute only 1 fingerprint (hash value) for a downstream packet; store this fingerprint in a hash table, and cached the packet in FIFO bufferFor each upstream packet, also compute the fingerprint, and lookit up in the hash table to locate the duplicated downstream packet; If found the same fingerprint, do further byte-to-byte comparison

Downstreampacket

fingerprinthash table

Upstreampacket

Upstreampacket fingerprint

Lookup

Page 13: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Duplication Detection Methods:Rabin Fingerprinting

Rabin Fingerprinting (RF)A unique hash function: produce fingerprints for a continuous data stream quickly (NSDI’07 BitTyrant)We scan the whole packet and only store fingerprints ending with 8 zeros over 64 bytes content

averagely 5 fingerprints for a 1400 bytes packet (1/28)

FIFO Buffer: stores latest 50,000 downstream packets

Buffer + hash table: need about 75MB memory totally

13

Page 14: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

14PPL-LAN

PPL-WL

TVA-LAN

TVA-WL

ESM-LAN

ESM-WL

0

50

100

150

200

250

300

350

400

450

RF

FH

RF-BufAll

Thro

ughp

ut (M

bps)

PPL-LAN

PPL-WL

TVA-LAN

TVA-WL

ESM-LAN

ESM-WL

0

10

20

30

40

50

60

70

80

90

100

RF

FH

RF-BufAll

Dup

licat

ion

ratio

(%)

RF can detect more duplications than FHAll the duplication ratios are larger than 75%

Offline analysis processing throughput of RF is less than FH:

Still large enough (> 90Mbps) for process P2P streaming (400 Kbps)

Dup Ratio & Tput

Page 15: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

15

Duplication Beginning Offset

FH can only detect the duplication when the offsets for up/downstream packets are the same (no re-packetizing)ESM does not have any offset differences FH performs wellTVAnts has a lot of re-packetizing FH performs the worst

Page 16: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Forwarding Delay

16

PPLive and TVAnts: most upstream packets forwarded in 200 seconds

<20 seconds for 70%

ESM: within 10 msImplies the downstream buffer can be quite small

200seconds

200seconds

10 ms

10seconds

20seconds

Page 17: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Outline

Problem Summary and ContributionsMeasurement & Analysis of P2P Streaming TrafficSCAP Design & ImplementationEvaluationSummary

17

Page 18: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

18

SCAP (Smart Caching in Access Points) Overview

WLAN

Internet

Downstreamsbuffer

Metadata upstream packet

(If duplications found in downstream buffer)

Relay/Viewing Peer

Access Point

Original upstream packet

Downstream buffer

Page 19: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Design Issues

Buffer size:Need 7.5MB for storing recent 200 seconds traffic (in 300Kbps rate), which is affordable for a wireless stationBut AP will need to buffer for multiple stations:

AP should dynamically adjust the buffer space for each station according to its duplication ratios in order to achieve highest traffic reduction with limited buffer space

Buffer synchronization between AP and station:If a metadata upstream packet cannot be reassembled on AP due to a cache miss, TCP flow will be stalled

Wireless station caches several copies of recent sent upstream packets and resends the uncompressed packet when needed

19

Page 20: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Prototype Implementation

Modified HostAP driver in Linux kernel 2.6.16 for the AP and stations

Wireless card is based on Intersil Prism 2.5 chipset (802.11b)

Identification of the downstream packetFor AP to locate the packet in decompressing the upstream packetCannot use Sequence Control field (2 bytes) because it is filled by the firmwareHave to use the first fingerprint value (8 bytes)

20

Page 21: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Outline

Problem Summary and ContributionsMeasurement & Analysis of P2P Streaming TrafficSCAP OverviewDesign & ImplementationEvaluationSummary

21

Page 22: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Performance Evaluation: LAN Experiment

1MB 7MB 70MB 140MB0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

Orig

RF

FH

Transfer File Size

Dow

nstre

am T

hrou

ghpu

t(Mbp

s)

1MB 7MB 70MB 140MB0

1

2

3

4

5

6

7

8

9

Orig

RF

FH

Transfer File SizeU

pstre

am T

hrou

ghpu

t (M

bps)

4.504.43 Mbps

4.7

8.9 Mbps

22

Station first receives a file from a server, then sends it backRF: little overhead for the downstream throughput (1.5%decrease), and 88% improvement for the upstream throughputFH: cannot have any improvement due to constant TCP re-packetizing

Page 23: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Performance Evaluation:Internet Experiment

Evaluate PPLive, TVAnts, and ESMRun the applications in a VMWare-based Windows XP guest OS for HostAP driver to work

Measurement methods:Because P2P Streaming is a Constant Bit Rate stream:

Upstream throughput will not change even if we reduces its trafficRunning iperf on another wireless station to observe the impact to WLAN TCP throughput

Running Ping to observe the impact to response timeRun multiple trials to get comparable P2P downstream throughput for comparison

Each trial runs for 600 seconds

23

Page 24: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Internet Experiment:Evaluation Results

24

RF/FH performs best for TVAntssince it has the largest volume of upstream traffic:

Increases TCP throughput by 0.95 Mbps (54% of upstream traffic)Decrease Ping round-trip time by 83 ms (-26%)

Also performs well for PPLive/ESM

Page 25: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Summary

25

With the increasing popularity of P2P streaming applications and pervasive deployment of 802.11 WLANs, more peers will be connected by wirelessWe study the impact of wireless peers to the performance of wireless and Internet users

Without a proper control of P2P traffic, the performance of both parties can be significantly affected

We designed and implemented SCAP (Smart Caching in Access Points) in order to reduce the upstream traffic for P2P live streaming applicationsOur prototype based evaluation shows the effectiveness of SCAP:

SCAP improves the throughput of the WLAN by up to 88%SCAP reduces the response delay to Internet peers as well

Page 26: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Thank you!

Enhua Tan: [email protected]://www.cse.ohio-state.edu/hpcs/

26

Page 27: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

SCAP (Smart Caching in Access Points) – Basic Idea

AP stores downstream data in buffer (1)Station stores downstream data in buffer (2)Compare upstream packet (3) with (2), upload difference (4)AP will assemble upstream packet with data in (1) to the Internet 27

Page 28: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Workflow of SCAP

28

Page 29: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Rabin Fingerprinting

29

mmm atatatA +++= −− ...)( 2

21

1

Rabin Fingerprinting (RF) can produce fingerprints for a continuous data stream quickly:

Advance the fingerprint only requires an addition, a multiplication, and a maskLack of this property for other hash functions like MD5/SHA (and they are also more complex)

),...,,( 21 maaaA =

)(mod)()( tPtAARF =

Page 30: SCAP: Smart Caching in Wireless Access Points to Improve ...dragonstar.ict.ac.cn/course_09/XD_Zhang/(11)-scap.pdf · SCAP: Smart Caching in Wireless Access Points to Improve P2P Streaming

Some Related Work

XORs in the Air: Practical Wireless Network Coding(Sigcomm’06)

Utilizing the broadcasting nature of wireless networks to improve throughput of multi-hop network (instead of application characteristics)Our scheme is utilizing the traffic pattern of P2P applications

A Protocol-Independent Technique for Eliminating Redundant Network Traffic (Sigcomm’00)

reduces redundant traffic using Rabin FingerprintingA Low-bandwidth Network File System (SOSP’01)

Exploits similarities between different versions of a file to reduce update traffic

30