Author : N. Sertac Artan, Haowei Yuan, and H. Jonathan Chao Publisher/Conf : IEEE GLOBECOM 2008...

Post on 17-Jan-2016

219 views 0 download

Transcript of Author : N. Sertac Artan, Haowei Yuan, and H. Jonathan Chao Publisher/Conf : IEEE GLOBECOM 2008...

Author : N. Sertac Artan, Haowei Yuan, and H. Jonathan ChaoPublisher/Conf : IEEE GLOBECOM 2008Speaker : Chen DeyuData : 2009.10.14

Network applications such as IP traceback , route lookup, TCP flow state monitoring, and malware detection often require large data storage resources, fast queries, and frequent updates.

Hash tables are traditional data structures that allow large amounts of data to be stored, queried, and updated in a space- and time-efficient manner on average.

However, in the worst case, which is critical for network applications, hash tables perform poorly. This poor performanceis due to hash collisions.

To reduce the impact of hash collisions on worst-case performance, the hash table can be modified to store multiple keys, say up to key in a single hash bucket.

Unfortunately, even when multiple keys are allowed to be stored in one bucket, occasional overflows cannot be prevented.

maxG

(a) Co-processor architecture (b) The LB hash table reduces number of overflows compared to the naïve hash table

The hash co-processor consists of four parts:(1) Group Counts Table(GCT)(2) Bin-Table (BT)(3) Hash Function (4) CAMs.

The GCT consists of g entries, where each entry, GCTi shows the number of keys currently in the group i

Both GCT and BT are divided into equal-sized segments. Let the number of groups in a single segment of GCT be Gs and the number of bins in a single segment of BT be s.

Insertion (Include three algorithm) (1) Non-Search Algorithm (NSA)

(2) Single-Search Algorithm (SSA)

(3) Double-Search Algorithm (DSA) Query Deletion

K1

0

14

overflow

CAM

GCTi < Gmax ?

2

K2

17

4

16 11

3

gmin

15

5

4

13

K3

2

8

16

8

3

13

gmin

b39

15

4

9

15

If in the system, the queried key is either in the hash table or in the CAMs. If the key is found in the CAMs, it is returned immediately. Otherwise, the group of the bin where the key is hashed is read as a single burst from the hash table.

So, the query operation takes at most one burst access.

To delete a key, the key is first queried. If the key is in the CAMs, it is removed from the CAMs and deletionis completed. If this key is not in the CAMs, the group towhich this key belongs is read as a single burst from the off-chip structure.

The key is deleted and the remaining keys are written back to the off-chip structure in another burst. So, the delete operation takes at most two burst accesses.

)(log)1(log 2max2 sb GGM (1) One bin requires:

(2) Each entry in GCT requires:

(3) CAM storage:

(4) On-chip memory requirement per key:

)1(log max2 GM g

)(log2 gKnM sc

lC

MMgMm cgb

2

On-chip Memory Consumption

• n is the number of keys stored in CAMs and Ks denotes key size.• C is the hash table capacity.• l is the ratio between the keys stored in the system(i.e. in hash table and CAMs) at a given time and hash table capacity.

Time Complexity for On-chip SearchThe main contributor to on-chip time complexity is the search times for the

SSA and DSA. The group search used by both algorithms takes time

proportional to Gs, since the search is limited to a single segment and Gs −1

groups need to be searched. Note that for a hardware implementation, since

Gs is small, the group search can be done in parallel using a simple priority

encoder.

External Memory Access (Per key on average)

(1) NSA:

(2) SSA 、 DSA:

N

nNAavgA

N

NW

N

nWWNAavgB

321

3)(1)(

Where W is the number of overflows in a give time period. N is the total number of keys inserted into the system.

C=65,536 keys Gmax=8 l=0.8

Performance comparison for NSA, SSA, and DSA, where GSI and BSI stands for group and bin search per insertion, respectively. AI is external memory access for insert.