bio michel hanna m.s. in e.e., cairo university, egypt b.s. in e.e., cairo university at fayoum,...
TRANSCRIPT
![Page 1: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/1.jpg)
Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum,
Egypt Currently is a Ph.D. Student in Computer
Engineering Program, University of Pittsburgh
![Page 2: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/2.jpg)
CHAP: Enabling Efficient Hardware-based Multiple Hash Schemes for IP Lookup
Michel HannaSocrates Demetriades
Sangyeun ChoRami Melhem
![Page 3: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/3.jpg)
The Problemuser
you
user
YouTube Server
user
server
server
router
router
Internet
![Page 4: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/4.jpg)
Input Port
Inside a Router
Output Port
Output Port
Input Port
Input Port
Forwarding Table
Forwarding Decision
Link Link
.
.
.
.
.
.
.
.
.
.
.
. Switching Fabric
Prefix Port N#
0* 0
1* 1
100* 6
1000* 4
100000* 3
101* 2
110* 1
11001* 5
111* 3YouTube
Hotmail
CA
Aachen
.
.
.
.
.
.
.
.
.
.
.
.
Output Port
![Page 5: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/5.jpg)
Prefix Port N#
0* 0
1* 1
100* 6
1000* 4
100000* 3
101* 2
110* 1
11001* 5
111* 3
Current Solution
the TCAM (Ternary Content Addressable Memory): the most usable solution in real life as it
provide the answer in single memory access However:
very high power consumption very low bit density & not scalable run at lower speed than RAMs
TCAM
![Page 6: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/6.jpg)
Hash-based solutionN
= n# rows
RAM
Hash function
h(.)Prefixi
Prefix Port N#
0* 0
1* 1
100* 6
1000* 4
100000* 3
101* 2
110* 1
11001* 5
111* 3
L = bucket size
The Overflow
How to handle the OVERFLOW?!
![Page 7: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/7.jpg)
Use Linear Probing…
hash function
h(.)Prefixi
we might scan the entire table…
means that we can’t bound
memory access time …
![Page 8: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/8.jpg)
Content-based HAsh Probing
Probing Pointers
hash function
1[h()]0[h()]
h (.)Prefixi
Note that the probing pointers are set differently for each IP lookup table based on its content
![Page 9: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/9.jpg)
Evaluation
N# of Tables
Ave. Size (K)
rrc04 3 185
rrc05 4 179
rrc07 3 133
rrc11 4 198
we used simulation to validate our scheme on real life IP lookup tables14 tables from different systems
were used and all gave the same results
quality is measured in terms of “overflow”:
percentage of prefixes that did not fit in the hash table…
![Page 10: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/10.jpg)
CHAP v.s. Linear Probing
1 2 3 4 5 6 7 8 9 100
10
20
30
40
50
60
70C1: L = 200, N = 1024
Linear ProbingCHAP(1,m)
Number of Probing Steps/Pointers
Ove
rflo
w %
still some overflow?
LegendL: Bucket or row widthN: Number of rowsm: Number of probing pointers for
CHAP and the number of probing steps for the linear probing
Ci: Configuration number ‘i’
![Page 11: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/11.jpg)
Use Multiple Hashing…
Multiple hash
functions
h0(.)Prefixi
h1(.)
still have some
overflow left…
the prefix might go to
one of the two buckets…
We combine CHAP with Multiple Hashing
![Page 12: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/12.jpg)
CHAP(H, m)
1[h1()]0[h0()]
Probing Pointers
h0(.)
h1(.)
Prefixi
multiple hash
functionsuse
multiple hash
functions
Number of Hash
Functions
Number of Probing Pointers
![Page 13: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/13.jpg)
400 200 100 500
2
4
6
8
10
12
MH(6) CHAP(3,3)
L: Bucket size
Ove
rflo
w %
CHAP(H,H) vs. Multiple Hashing (MH): Overflow
We experiment with m = H
![Page 14: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/14.jpg)
IG
MP MP MP MP MP
Matching Processors
Priority Encoder
Result
…
…
IP Address
Search in Set-Associative Arch.
RAM
Parallel MatchingOne Cell
Prefix Len Port
- All keys in one row are matched in parallel
- Consumes “1/N” of TCAM power
N
![Page 15: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/15.jpg)
400 200 100 500
0.5
1
1.5
2
2.5
MH(6) CHAP(3,3)
L: Bucket size
AS
ST
CHAP vs. MH: ASST(Average Successful Search Time)
![Page 16: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/16.jpg)
Tradeoff between Overflow and ASST
ASST
Overflow
Curve # 1Curve # 2
Better scheme
![Page 17: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/17.jpg)
Tradeoff between Overflow and ASST
![Page 18: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/18.jpg)
Conclusion and Future Work CHAP is effective in:
reducing the overflow by 72% on average compared to other probing schemes
low average memory access time (2.5 accesses max) apply it to other network applications:
packet filtering, packet inspection, VPN packet forwarding … (future work)
study the general case ``CHAP(H,m)’’ with “H m” may be useful for other applications (speech
recognition…)
![Page 19: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/19.jpg)
Questions?
THANK YOU
![Page 20: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/20.jpg)
Backup slides
![Page 21: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/21.jpg)
Index Generator
…
The CA-RAM Architecture
One Cell
Prefix Len Port
MP MP MP MP MP
Matching Processors
Priority Encoder
Parallel Matching
…
N = n# row
s
RAM
L = bucket width
IGKey
![Page 22: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/22.jpg)
IG
this row where the prefix is stored
MP MP MP MP MP
Matching Processors
Priority Encoder
Result
…
…
IP Address
Search in CA-RAM
RAM
Parallel MatchingOne Cell
Prefix Len Port
![Page 23: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/23.jpg)
CHAP Setup Algorithm The goal is to map lookup table into a
hash table with 2R = N rowsR = n# of bits used to index the hash table
first sort prefixes from long to short then we collect stats about the lookup table:calculate the n# of prefixes to be assigned to
each row
![Page 24: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/24.jpg)
CHAP Setup Algorithm
![Page 25: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/25.jpg)
CHAP Setup Algorithm
When Algorithm 1 exits, “table_overflow” contains the n# of prefixes that could not fit if not acceptable, then the algorithm repeated
with more hash functionsa separate TCAM is used to store the short
prefixes and the overflow Activating the probing pointer’s array is
done by running the best fit algorithm
![Page 26: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/26.jpg)
Search in CHAP the order of accessing the probing pointers
used in searching has to be the same order used in inserting the prefixes:
This constraint has to be satisfied to guarantee the LPM
the order is maintained by dedicating one probing pointer per hash function
![Page 27: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/27.jpg)
The Incremental Updates
we need to define where to store the new prefix (kn) according to its length to achieve LPM if the prefix already exists then the existing entry
will be updated
based on the length of kn relative to the lengths of both kl and ks, we will try to insert kn in one of the 2×H rows generated by the hash functions and the probing pointers
![Page 28: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/28.jpg)
The Incremental Updates
![Page 29: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/29.jpg)
The Incremental Updates
the subroutines terminate successfully if we were able to insert kn successfully
Otherwise, we should either insert kn into the auxiliary TCAM,
or try using backtracking scheme like “Cuckoo hashing” replace an existing prefix (ky) from the hash
table by kn
try to reinsert ky into the hash table recursively
![Page 30: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/30.jpg)
Formal problem definition internet routers require wire speed packet
forwarding while sizes of the IP lookup tables are increasing
near future: “Terabit” link rates will be available with affordable prices
need scalable solution that fits our current needs, and future needs
![Page 31: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/31.jpg)
Hash-based solution
hardware realization of hash table! it directly addresses the all severe shortcomings
of the TCAM as it uses RAM: High bit density and very scalable Low power consumption
however: hard to handle the overflow no bound on the memory access time
![Page 32: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/32.jpg)
CHAP vs. Multiple Hashing - Overflow
overflow comparison between the CHAP(H,H) and MH(H) for H = 1 to 4
and for the same loading factor (RAM table aspect ratio)
1 2 3 40
1020304050607080
MH(H)
CHAP(H,H)
N# Hashing Functions
Ove
rflow
%
![Page 33: Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c855503460f9493b76e/html5/thumbnails/33.jpg)
CHAP vs. Multiple Hashing - ASST
ASST comparison between the CHAP(H,H) and MH(H) for H = 1 to 4
and for the same loading factor (RAM table aspect ratio)
1 2 3 40.0
0.5
1.0
1.5
2.0
2.5
3.0
MH(H)CHAP(H,H)
H = N# Hashing Functions
ASS
T