forked from primihub/primihub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpsi_benchmark.sh
158 lines (103 loc) · 5.2 KB
/
psi_benchmark.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
#!/bin/bash
bash pre_build.sh
bazel build --config=linux_x86_64 :libpsi_test
cd ./bazel-bin
echo -e "\e[44m Limit bandwidth to 100mbps \e[0m"
## replace lo with your card
sudo tc qdisc del dev lo root
## about 100mbps
sudo tc qdisc add dev lo root handle 1: tbf rate 100mbit burst 100000 limit 10000
## about 0.3ms ping latency
sudo tc qdisc add dev lo parent 1:1 handle 10: netem delay 0.15msec
echo -e "\e[31m kkrt, mkkrt, cm20 benchmark under single thread \e[0m"
echo -e "\e[32m Dataset size: 10 million: 100,000 \e[0m"
./libpsi_test -kkrt -ss 10000000 -rs 100000
./libpsi_test -mkkrt -ss 10000000 -rs 100000
./libpsi_test -cm20 -ss 10000000 -rs 100000
echo -e "\e[32m Dataset size: 100 million: 1 million \e[0m"
./libpsi_test -kkrt -ss 100000000 -rs 1000000
./libpsi_test -mkkrt -ss 100000000 -rs 1000000
./libpsi_test -cm20 -ss 100000000 -rs 1000000
echo -e "\e[32m Dataset size: 100 million: 1 million \e[0m"
./libpsi_test -kkrt -ss 10000000 -rs 10000000
./libpsi_test -mkkrt -ss 10000000 -rs 10000000
./libpsi_test -cm20 -ss 10000000 -rs 10000000
echo -e "\e[32m Dataset size: 100 million: 1 million \e[0m"
./libpsi_test -kkrt -ss 100000000 -rs 100000000
./libpsi_test -mkkrt -ss 100000000 -rs 100000000
./libpsi_test -cm20 -ss 100000000 -rs 100000000
echo -e "\e[31m kkrt, mkkrt, cm20 benchmarks with 16 threads \e[0m"
echo -e "\e[32m Dataset size: 100 million: 1 million \e[0m"
./libpsi_test -kkrt -ss 10000000 -rs 100000 -t 16
./libpsi_test -mkkrt -ss 10000000 -rs 100000 -t 16
./libpsi_test -cm20 -ss 10000000 -rs 100000 -t 16
echo -e "\e[32m Dataset size: 100 million: 1 million \e[0m"
./libpsi_test -kkrt -ss 100000000 -rs 1000000 -t 16
./libpsi_test -mkkrt -ss 100000000 -rs 1000000 -t 16
./libpsi_test -cm20 -ss 100000000 -rs 1000000 -t 16
echo -e "\e[32m Dataset size: 100 million: 1 million \e[0m"
./libpsi_test -kkrt -ss 10000000 -rs 10000000 -t 16
./libpsi_test -mkkrt -ss 10000000 -rs 10000000 -t 16
./libpsi_test -cm20 -ss 10000000 -rs 10000000 -t 16
echo -e "\e[32m Dataset size: 100 million: 1 million \e[0m"
./libpsi_test -kkrt -ss 100000000 -rs 100000000 -t 16
./libpsi_test -mkkrt -ss 100000000 -rs 100000000 -t 16
./libpsi_test -cm20 -ss 100000000 -rs 100000000 -t 16
echo -e "\e[44m Limit bandwidth to 1000mbps \e[0m"
## replace lo with your card
sudo tc qdisc del dev lo root
## about 1000mbps
sudo tc qdisc add dev lo root handle 1: tbf rate 1000mbit burst 100000 limit 10000
## about 0.3ms ping latency
sudo tc qdisc add dev lo parent 1:1 handle 10: netem delay 0.15msec
echo -e "\e[31m kkrt, mkkrt, cm20 benchmarks under single thread \e[0m"
echo -e "\e[32m Dataset size: 10 million: 100,000 \e[0m"
./libpsi_test -kkrt -ss 10000000 -rs 100000
./libpsi_test -mkkrt -ss 10000000 -rs 100000
./libpsi_test -cm20 -ss 10000000 -rs 100000
echo -e "\e[32m Dataset size: 100 million: 1 million \e[0m"
./libpsi_test -kkrt -ss 100000000 -rs 1000000
./libpsi_test -mkkrt -ss 100000000 -rs 1000000
./libpsi_test -cm20 -ss 100000000 -rs 1000000
echo -e "\e[32m Dataset size: 10 million: 10 million \e[0m"
./libpsi_test -kkrt -ss 10000000 -rs 10000000
./libpsi_test -mkkrt -ss 10000000 -rs 10000000
./libpsi_test -cm20 -ss 10000000 -rs 10000000
echo -e "\e[32m Dataset size: 100 million: 100million \e[0m"
./libpsi_test -kkrt -ss 100000000 -rs 100000000
./libpsi_test -mkkrt -ss 100000000 -rs 100000000
./libpsi_test -cm20 -ss 100000000 -rs 100000000
echo -e "\e[31m kkrt, mkkrt, cm20 benchmarks with 16 threads \e[0m"
echo -e "\e[32m Dataset size: 10 million: 100,000 \e[0m"
./libpsi_test -kkrt -ss 10000000 -rs 100000 -t 16
./libpsi_test -mkkrt -ss 10000000 -rs 100000 -t 16
./libpsi_test -cm20 -ss 10000000 -rs 100000 -t 16
echo -e "\e[32m Dataset size: 100 million: 1 million \e[0m"
./libpsi_test -kkrt -ss 100000000 -rs 1000000 -t 16
./libpsi_test -mkkrt -ss 100000000 -rs 1000000 -t 16
./libpsi_test -cm20 -ss 100000000 -rs 1000000 -t 16
echo -e "\e[32m Dataset size: 10 million: 10 million \e[0m"
./libpsi_test -kkrt -ss 10000000 -rs 10000000 -t 16
./libpsi_test -mkkrt -ss 10000000 -rs 10000000 -t 16
./libpsi_test -cm20 -ss 10000000 -rs 10000000 -t 16
echo -e "\e[32m Dataset size: 100 million: 100 million \e[0m"
./libpsi_test -kkrt -ss 100000000 -rs 100000000 -t 16
./libpsi_test -mkkrt -ss 100000000 -rs 100000000 -t 16
./libpsi_test -cm20 -ss 100000000 -rs 100000000 -t 16
echo -e "\e[31m kkrt, mkkrt, cm20 benchmarks with 36 threads \e[0m"
echo -e "\e[32m Dataset size: 10 million: 100,000 \e[0m"
./libpsi_test -kkrt -ss 10000000 -rs 100000 -t 36
./libpsi_test -mkkrt -ss 10000000 -rs 100000 -t 36
./libpsi_test -cm20 -ss 10000000 -rs 100000 -t 36
echo -e "\e[32m Dataset size: 10 million: 1 million \e[0m"
./libpsi_test -kkrt -ss 100000000 -rs 1000000 -t 36
./libpsi_test -mkkrt -ss 100000000 -rs 1000000 -t 36
./libpsi_test -cm20 -ss 100000000 -rs 1000000 -t 36
echo -e "\e[32m Dataset size: 10 million: 10 million \e[0m"
./libpsi_test -kkrt -ss 10000000 -rs 10000000 -t 36
./libpsi_test -mkkrt -ss 10000000 -rs 10000000 -t 36
./libpsi_test -cm20 -ss 10000000 -rs 10000000 -t 36
echo -e "\e[32m Dataset size: 100 million: 100 million \e[0m"
./libpsi_test -kkrt -ss 100000000 -rs 100000000 -t 36
./libpsi_test -mkkrt -ss 100000000 -rs 100000000 -t 36
./libpsi_test -cm20 -ss 100000000 -rs 100000000 -t 36