In [1]:
import swan

"Sensitivity profile" experiment


In [2]:
profile1 = swan.SensitivityProfile("6ed71a63-14c0-8e3e-3a65-4da9a11eecf6", slo=500)

In [3]:
profile1.df.head() # or just `profile1`


Out[3]:
Profile 6ed71a63-14c0-8e3e-3a65-4da9a11eecf6 Aggressor Target QPS swan_repetition std batches percentile/10th min percentile/90th percentile/99th qps percentile/95th percentile/5th avg achieved QPS achieved latency composite values
0 Caffe 100000 0 305.2 874.0 99.8 60.2 170.4 252.4 99728.5 187.4 94.5 145.5 0.997285 0.5048 {u'qps': 99728.5, u'achieved QPS': 0.997285, u...
1 Caffe 150000 0 198.8 822.0 100.4 60.2 188.0 391.5 149154.2 224.6 94.9 151.2 0.994361 0.7830 {u'qps': 149154.2, u'achieved QPS': 0.99436133...
2 Caffe 200000 0 250.4 787.0 101.6 54.8 210.9 783.8 198501.4 271.2 96.2 170.5 0.992507 1.5676 {u'qps': 198501.4, u'achieved QPS': 0.992507, ...
3 Caffe 250000 0 1210.9 751.0 108.5 54.8 1028.4 5893.3 248177.8 2295.2 100.3 485.9 0.992711 11.7866 {u'qps': 248177.8, u'achieved QPS': 0.9927112,...
4 Caffe 300000 0 1423.2 880.0 111.1 54.8 770.0 5834.4 299432.0 2115.0 101.8 496.2 0.998107 11.6688 {u'qps': 299432.0, u'achieved QPS': 0.99810666...

In [4]:
profile1.latency()


Out[4]:
normalized latency[us] of "sensitivity profile" experiment 6ed71a63-14c0-8e3e-3a65-4da9a11eecf6
Target QPS 50000 100000 150000 200000 250000 300000 350000 400000 450000 500000
Aggressor
Baseline 34% 35% 37% 38% 42% 46% 55% 67% 89% 134%
Caffe 42% 50% 78% 157% > 300% > 300% > 300% > 300% > 300% > 300%
stress-ng-cache-l1 36% 38% 45% 56% 73% 146% 218% 152% 228% > 300%
stress-ng-cache-l3 36% 38% 42% 49% 65% 105% > 300% > 300% > 300% > 300%
stress-ng-memcpy 43% 54% 111% > 300% > 300% > 300% FAIL FAIL FAIL FAIL
stress-ng-stream 55% 73% > 300% > 300% FAIL FAIL FAIL FAIL FAIL FAIL

In [5]:
profile1.latency(normalized=False)


Out[5]:
latency[us] of "sensitivity profile" experiment 6ed71a63-14c0-8e3e-3a65-4da9a11eecf6
Target QPS 50000 100000 150000 200000 250000 300000 350000 400000 450000 500000
Aggressor
Baseline 169 175 184 192 209 229 273 334 443 672
Caffe 208 252 392 784 5893 5834 4381 6301 5486 6353
stress-ng-cache-l1 180 188 226 282 363 730 1092 762 1142 2498
stress-ng-cache-l3 178 189 210 244 324 524 2017 3353 4199 4655
stress-ng-memcpy 214 272 557 2707 5145 7764 FAIL FAIL FAIL FAIL
stress-ng-stream 274 366 3752 11318 FAIL FAIL FAIL FAIL FAIL FAIL

In [6]:
profile1.qps()


Out[6]:
normalized queries per second of "sensitivity profile" experiment 6ed71a63-14c0-8e3e-3a65-4da9a11eecf6
Target QPS 50000 100000 150000 200000 250000 300000 350000 400000 450000 500000
Aggressor
Baseline 100% 100% 99% 100% 99% 99% 99% 99% 99% 99%
Caffe 100% 100% 99% 99% 99% 100% 99% 97% 99% 92%
stress-ng-cache-l1 100% 100% 100% 100% 99% 99% 99% 99% 99% 99%
stress-ng-cache-l3 100% 100% 99% 100% 99% 99% 99% 99% 99% 99%
stress-ng-memcpy 100% 100% 100% 99% 100% 99% 86% 82% 82% 63%
stress-ng-stream 100% 100% 100% 95% 76% 71% 54% 47% 43% 47%

In [7]:
profile1.qps(normalized=False)


Out[7]:
queries per second of "sensitivity profile" experiment 6ed71a63-14c0-8e3e-3a65-4da9a11eecf6
Target QPS 50000 100000 150000 200000 250000 300000 350000 400000 450000 500000
Aggressor
Baseline 49,898 99,868 149,226 199,414 247,955 298,103 347,200 397,310 444,987 494,809
Caffe 49,814 99,728 149,154 198,501 248,178 299,432 347,353 389,269 445,944 460,934
stress-ng-cache-l1 49,903 99,733 149,449 199,127 248,400 297,454 344,878 396,214 445,455 494,617
stress-ng-cache-l3 49,865 99,664 148,965 199,249 248,340 298,005 347,550 396,370 445,301 494,420
stress-ng-memcpy 49,757 99,530 149,783 198,699 249,095 297,026 300,220 326,542 368,510 314,136
stress-ng-stream 49,878 99,680 149,663 189,410 189,599 214,154 190,098 189,650 192,100 233,033

In [8]:
profile1.caffe_batches()


Out[8]:
caffe image batches of "sensitivity profile" experiment 6ed71a63-14c0-8e3e-3a65-4da9a11eecf6
Target QPS 50000 100000 150000 200000 250000 300000 350000 400000 450000 500000
Aggressor
Caffe 971 874 822 787 751 880 714 696 820 701

"Optimal core allocation" experiment


In [9]:
core = swan.OptimalCoreAllocation("80ad81ec-e6d7-cfc2-de6c-6c60cb300d7f", slo=500)

In [10]:
core.latency() # optionally call with normalized=False to see absolute values


Out[10]:
normalized latency[us] of "optimal core allocation" experiment 80ad81ec-e6d7-cfc2-de6c-6c60cb300d7f
Target QPS 150000 300000 450000 600000 750000 900000 1050000 1200000 1350000 1500000
Number of cores
1 > 300% FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL
2 42% > 300% FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL
3 38% 76% > 300% > 300% FAIL FAIL FAIL FAIL FAIL FAIL
4 37% 52% > 300% > 300% > 300% FAIL FAIL FAIL FAIL FAIL
5 37% 45% 88% > 300% > 300% > 300% FAIL FAIL FAIL FAIL
6 36% 42% 63% 209% > 300% > 300% > 300% FAIL FAIL FAIL
7 36% 39% 50% 95% > 300% > 300% > 300% > 300% > 300% FAIL
8 34% 38% 47% 68% 149% > 300% > 300% > 300% > 300% > 300%
9 34% 37% 44% 58% 96% 229% > 300% > 300% > 300% > 300%
10 34% 37% 42% 53% 74% 127% > 300% > 300% > 300% > 300%
11 34% 37% 41% 50% 68% 104% 160% > 300% > 300% > 300%
12 34% 37% 41% 49% 65% 97% 138% 231% > 300% > 300%
13 34% 37% 41% 48% 60% 93% 144% 177% 278% > 300%
14 34% 37% 41% 48% 61% 111% 197% 220% 231% > 300%
15 34% 37% 41% 47% 66% 124% 227% 298% 248% 279%
16 34% 37% 41% 49% 68% 128% 291% > 300% > 300% > 300%

In [11]:
core.qps() # optionally call with normalized=False to see absolute values


Out[11]:
normalized queries per second of "optimal core allocation" experiment 80ad81ec-e6d7-cfc2-de6c-6c60cb300d7f
Target QPS 150000 300000 450000 600000 750000 900000 1050000 1200000 1350000 1500000
Number of cores
1 100% 62% 41% 31% 25% 20% 18% 15% 14% 12%
2 100% 99% 80% 60% 48% 40% 34% 30% 27% 24%
3 100% 99% 99% 90% 71% 59% 51% 45% 40% 36%
4 100% 100% 98% 98% 95% 79% 68% 59% 52% 48%
5 99% 99% 99% 99% 98% 98% 84% 73% 65% 59%
6 99% 99% 99% 99% 99% 97% 97% 88% 78% 71%
7 100% 99% 99% 99% 98% 99% 98% 97% 91% 82%
8 100% 100% 99% 99% 98% 98% 97% 97% 97% 94%
9 99% 100% 99% 99% 98% 98% 98% 97% 96% 91%
10 99% 99% 99% 98% 98% 98% 97% 98% 96% 91%
11 99% 99% 99% 99% 98% 98% 98% 97% 96% 93%
12 100% 99% 99% 99% 98% 98% 98% 97% 96% 94%
13 100% 99% 99% 99% 98% 98% 97% 98% 97% 95%
14 100% 99% 99% 99% 98% 98% 98% 97% 97% 95%
15 99% 99% 99% 99% 98% 98% 98% 98% 97% 95%
16 100% 99% 99% 99% 98% 98% 98% 98% 96% 96%

In [12]:
core.cpu()


Out[12]:
cpu utilization of "optimal core allocation" experiment 80ad81ec-e6d7-cfc2-de6c-6c60cb300d7f
Target QPS 150000 300000 450000 600000 750000 900000 1050000 1200000 1350000 1500000
Number of cores
1 21% 6% 6% 8% 5% 5% 5% 6% 6% 8%
2 7% 6% 9% 11% 10% 11% 10% 11% 10% 11%
3 7% 7% 9% 13% 16% 15% 15% 15% 15% 16%
4 11% 8% 14% 15% 19% 20% 20% 20% 21% 21%
5 11% 9% 12% 16% 19% 22% 27% 25% 27% 26%
6 14% 9% 12% 17% 22% 25% 26% 27% 31% 30%
7 13% 10% 14% 21% 24% 30% 29% 27% 33% 33%
8 15% 13% 17% 21% 22% 29% 35% 33% 32% 36%
9 16% 12% 18% 22% 23% 28% 34% 33% 36% 39%
10 19% 13% 19% 24% 33% 34% 41% 41% 41% 45%
11 19% 16% 21% 23% 32% 36% 41% 48% 55% 54%
12 20% 14% 21% 25% 36% 41% 43% 50% 50% 55%
13 24% 16% 20% 23% 33% 42% 46% 52% 57% 57%
14 25% 16% 23% 25% 38% 43% 50% 56% 58% 64%
15 27% 13% 17% 30% 30% 45% 55% 61% 60% 66%
16 28% 11% 20% 30% 35% 45% 54% 57% 65% 74%

"Memcached CAT" experiment


In [13]:
cat1 = swan.CAT("bc1ee530-4e02-b9fd-e845-752eb7545773", 500)

In [14]:
cat1.latency()


Out[14]:
normalized latency[us] of "memcached-cat" experiment bc1ee530-4e02-b9fd-e845-752eb7545773
Target QPS 150000 375000 500000
BE number of cores 1 2 3 4 1 2 3 4 1 2 3 4
swan_aggressor_name BE cache ways
Baseline 1 44% 41% 41% 41% 176% 94% 121% 166% 157% 264% 235% 243%
2 44% 41% 40% 41% 172% 123% 93% 89% 146% 161% 236% 209%
3 45% 41% 40% 43% 97% 119% 94% 88% 133% 169% 183% 207%
4 42% 44% 42% 48% 149% 133% 150% 90% 237% 135% 222% 140%
5 40% 41% 46% 41% 147% 148% 139% 93% 232% 242% 185% 223%
6 43% 40% 40% 41% 88% 98% 106% 130% 163% 222% 199% 226%
7 41% 41% 43% 41% 107% 212% 161% 178% 215% 257% 289% 216%
8 44% 39% 45% 43% 112% 149% 158% 149% 209% 158% 272% 236%
9 45% 40% 44% 40% 221% 205% 157% 177% 228% > 300% 178% 186%
10 41% 43% 43% 48% 169% 138% 220% 247% 223% > 300% 290% 297%
11 45% 44% 44% 45% 209% 250% 140% 269% > 300% > 300% 264% > 300%
Caffe 1 93% 209% 80% 252% > 300% > 300% > 300% > 300% > 300% > 300% > 300% > 300%
2 168% 128% 134% 72% > 300% > 300% > 300% > 300% > 300% > 300% > 300% > 300%
3 87% 79% 108% 96% > 300% > 300% > 300% > 300% > 300% > 300% > 300% > 300%
4 116% 191% 124% 142% > 300% > 300% > 300% > 300% > 300% > 300% > 300% > 300%
5 109% 212% 121% 88% > 300% > 300% > 300% > 300% > 300% > 300% > 300% > 300%
6 126% 83% 148% 122% > 300% > 300% > 300% > 300% > 300% > 300% > 300% > 300%
7 115% 151% 86% 86% > 300% > 300% > 300% > 300% > 300% FAIL FAIL > 300%
8 100% 138% 127% 249% > 300% > 300% > 300% > 300% FAIL FAIL FAIL FAIL
9 163% 107% 127% 136% > 300% > 300% > 300% > 300% FAIL FAIL FAIL FAIL
10 173% 133% 178% 168% > 300% > 300% > 300% > 300% FAIL FAIL FAIL FAIL
11 245% 99% 178% 153% > 300% > 300% > 300% > 300% FAIL FAIL FAIL FAIL
stress-ng-cache-l3 1 39% 44% 41% 45% 115% 166% 217% 213% 213% 176% 166% 206%
2 41% 40% 40% 38% 149% 167% 212% 140% 227% 128% 169% 294%
3 41% 38% 39% 39% 136% 162% 201% 152% 237% 253% 230% 274%
4 40% 38% 40% 40% 151% 126% 140% 176% 235% 186% 158% 246%
5 41% 38% 40% 45% 209% 152% 129% 170% 215% 153% 235% 230%
6 39% 38% 41% 42% 240% 130% 130% 152% 132% 255% 279% 243%
7 45% 43% 40% 39% 151% 135% 215% 223% 287% 225% 256% 206%
8 40% 43% 47% 45% 246% 176% 142% 152% 262% > 300% > 300% > 300%
9 41% 41% 41% 43% 164% 239% 227% > 300% 217% 229% > 300% > 300%
10 44% 45% 46% 47% 161% > 300% 286% > 300% > 300% > 300% > 300% > 300%
11 46% 45% 50% 55% > 300% > 300% > 300% > 300% > 300% > 300% > 300% > 300%
stress-ng-memcpy 1 39% 39% 41% 44% 207% 155% 174% 232% 236% 194% 241% > 300%
2 45% 41% 46% 82% 181% 183% 227% > 300% 231% 186% > 300% > 300%
3 41% 41% 44% 68% 182% 186% > 300% 276% 178% 280% > 300% > 300%
4 41% 41% 52% 59% 127% 142% 299% > 300% 216% 238% 278% > 300%
5 41% 42% 45% 51% 157% 243% 286% 286% 248% 184% > 300% > 300%
6 40% 42% 47% 55% 159% 221% 249% > 300% 223% > 300% > 300% > 300%
7 41% 45% 49% 66% 192% 161% > 300% > 300% 219% 273% > 300% > 300%
8 40% 45% 53% 96% 166% 224% > 300% > 300% > 300% > 300% > 300% FAIL
9 44% 49% 112% 73% 155% > 300% > 300% > 300% > 300% > 300% FAIL FAIL
10 45% 57% 88% 150% 202% > 300% FAIL FAIL > 300% FAIL FAIL FAIL
11 53% 54% 79% 296% > 300% > 300% FAIL FAIL > 300% FAIL FAIL FAIL
stress-ng-stream 1 41% 45% 40% 45% 108% 217% 198% 198% 255% 245% > 300% 262%
2 39% 39% 46% 44% 176% 176% 270% > 300% 225% 272% 282% > 300%
3 38% 38% 43% 66% 106% 147% 214% > 300% 199% > 300% 262% > 300%
4 40% 45% 40% 52% 110% 232% 146% 257% 198% 226% > 300% > 300%
5 43% 40% 44% 45% 106% 145% 236% > 300% 288% > 300% 270% > 300%
6 39% 42% 45% 50% 151% 143% 209% > 300% 170% > 300% > 300% > 300%
7 40% 42% 45% 61% 161% > 300% 239% > 300% 163% > 300% > 300% FAIL
8 44% 52% 51% 79% 263% > 300% > 300% > 300% 283% > 300% FAIL FAIL
9 44% 51% 81% 85% > 300% > 300% > 300% FAIL > 300% FAIL FAIL FAIL
10 59% 62% > 300% > 300% 221% > 300% FAIL FAIL > 300% FAIL FAIL FAIL
11 55% 64% 193% > 300% > 300% FAIL FAIL FAIL FAIL FAIL FAIL FAIL