okashoi / isucon-practice-20200802

0 stars 0 forks source link

いい感じにスピードアップする #1

Open okashoi opened 4 years ago

okashoi commented 4 years ago

今日は解説記事に従って進める

http://isucon.net/archives/32976287.html

okashoi commented 4 years ago

初期状態ベンチマーク

Result:   SUCCESS 
RawScore: 2660.7
Fails:    0
Score:    2660.7
okashoi commented 4 years ago
Result:   SUCCESS 
RawScore: 2674.7
Fails:    0
Score:    2674.7
yamachu commented 4 years ago
Result:   SUCCESS
RawScore: 3643.9
Fails:    0
Score:    3643.9
okashoi commented 4 years ago

かわらん

Result:   SUCCESS 
RawScore: 3640.5
Fails:    0
Score:    3640.5
okashoi commented 4 years ago

現状のベンチ

Flame Graph

http://52.199.202.14/torch-20200802063612.svg

Kataribe

Top 20 Sort By Count
Count   Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
 1476   0.864  0.0006  0.0013  0.000  0.000  0.001  0.003  0.006  0.013  1476    0    0    0    24869124      16849      16849      16849  GET /css/bootstrap-responsive.min.css HTTP/1.1
 1476   1.026  0.0007  0.0015  0.000  0.000  0.001  0.003  0.007  0.022  1476    0    0    0   156478140     106015     106015     106015  GET /css/bootstrap.min.css HTTP/1.1
 1476   0.962  0.0007  0.0013  0.000  0.000  0.001  0.003  0.007  0.015  1476    0    0    0   137425932      93107      93107      93107  GET /js/jquery.min.js HTTP/1.1
 1476   0.853  0.0006  0.0014  0.000  0.000  0.001  0.002  0.006  0.024  1476    0    0    0    42259356      28631      28631      28631  GET /js/bootstrap.min.js HTTP/1.1
 1377  70.673  0.0513  0.0287  0.000  0.048  0.090  0.104  0.130  0.152  1278    0   99    0     5641177         10       4096      58970  get memo
  504  61.142  0.1213  0.0465  0.035  0.116  0.183  0.202  0.245  0.362   504    0    0    0     7540949      13478      14962      16057  GET / HTTP/1.1
  201   0.632  0.0031  0.0029  0.001  0.002  0.007  0.009  0.016  0.023     0  201    0    0           0          0          0          0  POST /signin HTTP/1.1
  201   0.099  0.0005  0.0009  0.000  0.000  0.001  0.002  0.004  0.007   201    0    0    0      268134       1334       1334       1334  GET /signin HTTP/1.1
  201   0.697  0.0035  0.0025  0.001  0.002  0.007  0.009  0.012  0.014     0  201    0    0           0          0          0          0  POST /memo HTTP/1.1
  201  12.537  0.0624  0.0293  0.017  0.058  0.100  0.113  0.145  0.217   201    0    0    0     3064157       1920      15244      27855  GET /mypage HTTP/1.1
  201   0.167  0.0008  0.0013  0.000  0.001  0.001  0.003  0.006  0.012     0  201    0    0           0          0          0          0  POST /signout HTTP/1.1
   38   8.120  0.2137  0.0814  0.090  0.205  0.331  0.388  0.436  0.436    38    0    0    0      529482      13592      13933      14099  GET /recent/204 HTTP/1.1
   26   6.104  0.2348  0.0649  0.130  0.245  0.327  0.361  0.387  0.387    26    0    0    0      355185      13182      13660      13905  GET /recent/205 HTTP/1.1
    7   1.268  0.1811  0.0693  0.106  0.174  0.272  0.272  0.272  0.272     7    0    0    0       97899      13868      13985      14166  GET /recent/156 HTTP/1.1
    7   1.058  0.1511  0.0697  0.061  0.162  0.283  0.283  0.283  0.283     7    0    0    0       99259      13905      14179      14457  GET /recent/178 HTTP/1.1
    6   0.852  0.1420  0.0412  0.055  0.164  0.181  0.181  0.181  0.181     6    0    0    0       85635      14074      14272      14394  GET /recent/92 HTTP/1.1
    6   1.098  0.1830  0.0712  0.065  0.176  0.293  0.293  0.293  0.293     6    0    0    0       84151      13919      14025      14134  GET /recent/203 HTTP/1.1
    6   0.654  0.1090  0.0552  0.079  0.089  0.232  0.232  0.232  0.232     6    0    0    0       88021      14578      14670      14796  GET /recent/86 HTTP/1.1
    6   0.746  0.1243  0.0782  0.060  0.095  0.289  0.289  0.289  0.289     6    0    0    0       85723      14142      14287      14478  GET /recent/154 HTTP/1.1
    5   0.406  0.0812  0.0163  0.061  0.083  0.108  0.108  0.108  0.108     5    0    0    0       70700      13897      14140      14407  GET /recent/7 HTTP/1.1

Top 20 Sort By Total
Count   Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
 1377  70.673  0.0513  0.0287  0.000  0.048  0.090  0.104  0.130  0.152  1278    0   99    0     5641177         10       4096      58970  get memo
  504  61.142  0.1213  0.0465  0.035  0.116  0.183  0.202  0.245  0.362   504    0    0    0     7540949      13478      14962      16057  GET / HTTP/1.1
  201  12.537  0.0624  0.0293  0.017  0.058  0.100  0.113  0.145  0.217   201    0    0    0     3064157       1920      15244      27855  GET /mypage HTTP/1.1
   38   8.120  0.2137  0.0814  0.090  0.205  0.331  0.388  0.436  0.436    38    0    0    0      529482      13592      13933      14099  GET /recent/204 HTTP/1.1
   26   6.104  0.2348  0.0649  0.130  0.245  0.327  0.361  0.387  0.387    26    0    0    0      355185      13182      13660      13905  GET /recent/205 HTTP/1.1
    7   1.268  0.1811  0.0693  0.106  0.174  0.272  0.272  0.272  0.272     7    0    0    0       97899      13868      13985      14166  GET /recent/156 HTTP/1.1
    6   1.098  0.1830  0.0712  0.065  0.176  0.293  0.293  0.293  0.293     6    0    0    0       84151      13919      14025      14134  GET /recent/203 HTTP/1.1
    7   1.058  0.1511  0.0697  0.061  0.162  0.283  0.283  0.283  0.283     7    0    0    0       99259      13905      14179      14457  GET /recent/178 HTTP/1.1
 1476   1.026  0.0007  0.0015  0.000  0.000  0.001  0.003  0.007  0.022  1476    0    0    0   156478140     106015     106015     106015  GET /css/bootstrap.min.css HTTP/1.1
 1476   0.962  0.0007  0.0013  0.000  0.000  0.001  0.003  0.007  0.015  1476    0    0    0   137425932      93107      93107      93107  GET /js/jquery.min.js HTTP/1.1
    4   0.870  0.2175  0.0288  0.174  0.227  0.254  0.254  0.254  0.254     4    0    0    0       56140      13891      14035      14189  GET /recent/144 HTTP/1.1
 1476   0.864  0.0006  0.0013  0.000  0.000  0.001  0.003  0.006  0.013  1476    0    0    0    24869124      16849      16849      16849  GET /css/bootstrap-responsive.min.css HTTP/1.1
 1476   0.853  0.0006  0.0014  0.000  0.000  0.001  0.002  0.006  0.024  1476    0    0    0    42259356      28631      28631      28631  GET /js/bootstrap.min.js HTTP/1.1
    6   0.852  0.1420  0.0412  0.055  0.164  0.181  0.181  0.181  0.181     6    0    0    0       85635      14074      14272      14394  GET /recent/92 HTTP/1.1
    4   0.791  0.1977  0.1026  0.060  0.201  0.349  0.349  0.349  0.349     4    0    0    0       59228      14730      14807      14862  GET /recent/112 HTTP/1.1
    4   0.762  0.1905  0.0609  0.089  0.229  0.245  0.245  0.245  0.245     4    0    0    0       54699      13571      13674      13792  GET /recent/175 HTTP/1.1
    5   0.756  0.1512  0.0485  0.099  0.160  0.232  0.232  0.232  0.232     5    0    0    0       71499      14044      14299      14492  GET /recent/145 HTTP/1.1
    6   0.746  0.1243  0.0782  0.060  0.095  0.289  0.289  0.289  0.289     6    0    0    0       85723      14142      14287      14478  GET /recent/154 HTTP/1.1
    4   0.738  0.1845  0.0411  0.135  0.221  0.229  0.229  0.229  0.229     4    0    0    0       58107      14155      14526      14899  GET /recent/62 HTTP/1.1
    4   0.731  0.1828  0.0620  0.095  0.198  0.268  0.268  0.268  0.268     4    0    0    0       53942      13369      13485      13665  GET /recent/173 HTTP/1.1

Top 20 Sort By Mean
Count  Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max  2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
    1  0.580  0.5800  0.0000  0.580  0.580  0.580  0.580  0.580  0.580    1    0    0    0      345378     345378     345378     345378  GET /torch-20200802063612.svg HTTP/1.1
    1  0.377  0.3770  0.0000  0.377  0.377  0.377  0.377  0.377  0.377    1    0    0    0       14364      14364      14364      14364  GET /recent/91 HTTP/1.1
    1  0.307  0.3070  0.0000  0.307  0.307  0.307  0.307  0.307  0.307    1    0    0    0       14412      14412      14412      14412  GET /recent/188 HTTP/1.1
    2  0.594  0.2970  0.0680  0.229  0.365  0.365  0.365  0.365  0.365    2    0    0    0       28708      14252      14354      14456  GET /recent/199 HTTP/1.1
    1  0.269  0.2690  0.0000  0.269  0.269  0.269  0.269  0.269  0.269    1    0    0    0       13634      13634      13634      13634  GET /recent/194 HTTP/1.1
    1  0.257  0.2570  0.0000  0.257  0.257  0.257  0.257  0.257  0.257    1    0    0    0       14307      14307      14307      14307  GET /recent/168 HTTP/1.1
    1  0.253  0.2530  0.0000  0.253  0.253  0.253  0.253  0.253  0.253    1    0    0    0       14010      14010      14010      14010  GET /recent/122 HTTP/1.1
    1  0.251  0.2510  0.0000  0.251  0.251  0.251  0.251  0.251  0.251    1    0    0    0       14111      14111      14111      14111  GET /recent/109 HTTP/1.1
    1  0.251  0.2510  0.0000  0.251  0.251  0.251  0.251  0.251  0.251    1    0    0    0       13984      13984      13984      13984  GET /recent/177 HTTP/1.1
    1  0.247  0.2470  0.0000  0.247  0.247  0.247  0.247  0.247  0.247    1    0    0    0       14576      14576      14576      14576  GET /recent/76 HTTP/1.1
    1  0.246  0.2460  0.0000  0.246  0.246  0.246  0.246  0.246  0.246    1    0    0    0       14070      14070      14070      14070  GET /recent/167 HTTP/1.1
    3  0.723  0.2410  0.0193  0.224  0.231  0.268  0.268  0.268  0.268    3    0    0    0       42614      13929      14204      14466  GET /recent/135 HTTP/1.1
    1  0.239  0.2390  0.0000  0.239  0.239  0.239  0.239  0.239  0.239    1    0    0    0       14189      14189      14189      14189  GET /recent/143 HTTP/1.1
    3  0.714  0.2380  0.0210  0.209  0.247  0.258  0.258  0.258  0.258    3    0    0    0       41512      13449      13837      14165  GET /recent/99 HTTP/1.1
   26  6.104  0.2348  0.0649  0.130  0.245  0.327  0.361  0.387  0.387   26    0    0    0      355185      13182      13660      13905  GET /recent/205 HTTP/1.1
    1  0.233  0.2330  0.0000  0.233  0.233  0.233  0.233  0.233  0.233    1    0    0    0       13979      13979      13979      13979  GET /recent/139 HTTP/1.1
    3  0.673  0.2243  0.1340  0.114  0.146  0.413  0.413  0.413  0.413    3    0    0    0       42285      13877      14095      14304  GET /recent/157 HTTP/1.1
    2  0.437  0.2185  0.0425  0.176  0.261  0.261  0.261  0.261  0.261    2    0    0    0       28181      13991      14090      14190  GET /recent/148 HTTP/1.1
    4  0.870  0.2175  0.0288  0.174  0.227  0.254  0.254  0.254  0.254    4    0    0    0       56140      13891      14035      14189  GET /recent/144 HTTP/1.1
    2  0.432  0.2160  0.0170  0.199  0.233  0.233  0.233  0.233  0.233    2    0    0    0       28472      14203      14236      14269  GET /recent/101 HTTP/1.1

Top 20 Sort By Standard Deviation
Count  Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max  2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
    3  0.611  0.2037  0.1570  0.039  0.157  0.415  0.415  0.415  0.415    3    0    0    0       42053      13937      14017      14131  GET /recent/1 HTTP/1.1
    3  0.673  0.2243  0.1340  0.114  0.146  0.413  0.413  0.413  0.413    3    0    0    0       42285      13877      14095      14304  GET /recent/157 HTTP/1.1
    4  0.618  0.1545  0.1099  0.049  0.151  0.334  0.334  0.334  0.334    4    0    0    0       56757      13960      14189      14425  GET /recent/70 HTTP/1.1
    3  0.555  0.1850  0.1034  0.052  0.199  0.304  0.304  0.304  0.304    3    0    0    0       41247      13672      13749      13880  GET /recent/83 HTTP/1.1
    4  0.791  0.1977  0.1026  0.060  0.201  0.349  0.349  0.349  0.349    4    0    0    0       59228      14730      14807      14862  GET /recent/112 HTTP/1.1
    3  0.542  0.1807  0.1006  0.096  0.124  0.322  0.322  0.322  0.322    3    0    0    0       44051      14553      14683      14838  GET /recent/127 HTTP/1.1
    3  0.455  0.1517  0.0909  0.081  0.094  0.280  0.280  0.280  0.280    3    0    0    0       44084      14372      14694      15119  GET /recent/134 HTTP/1.1
    3  0.564  0.1880  0.0884  0.065  0.230  0.269  0.269  0.269  0.269    3    0    0    0       41218      13633      13739      13842  GET /recent/192 HTTP/1.1
   38  8.120  0.2137  0.0814  0.090  0.205  0.331  0.388  0.436  0.436   38    0    0    0      529482      13592      13933      14099  GET /recent/204 HTTP/1.1
    6  0.746  0.1243  0.0782  0.060  0.095  0.289  0.289  0.289  0.289    6    0    0    0       85723      14142      14287      14478  GET /recent/154 HTTP/1.1
    2  0.370  0.1850  0.0780  0.107  0.263  0.263  0.263  0.263  0.263    2    0    0    0       27920      13955      13960      13965  GET /recent/118 HTTP/1.1
    2  0.306  0.1530  0.0720  0.081  0.225  0.225  0.225  0.225  0.225    2    0    0    0       28562      14173      14281      14389  GET /recent/21 HTTP/1.1
    4  0.562  0.1405  0.0715  0.054  0.148  0.250  0.250  0.250  0.250    4    0    0    0       57457      13816      14364      14692  GET /recent/103 HTTP/1.1
    6  1.098  0.1830  0.0712  0.065  0.176  0.293  0.293  0.293  0.293    6    0    0    0       84151      13919      14025      14134  GET /recent/203 HTTP/1.1
    7  1.058  0.1511  0.0697  0.061  0.162  0.283  0.283  0.283  0.283    7    0    0    0       99259      13905      14179      14457  GET /recent/178 HTTP/1.1
    7  1.268  0.1811  0.0693  0.106  0.174  0.272  0.272  0.272  0.272    7    0    0    0       97899      13868      13985      14166  GET /recent/156 HTTP/1.1
    2  0.225  0.1125  0.0685  0.044  0.181  0.181  0.181  0.181  0.181    2    0    0    0       27763      13848      13881      13915  GET /recent/49 HTTP/1.1
    2  0.594  0.2970  0.0680  0.229  0.365  0.365  0.365  0.365  0.365    2    0    0    0       28708      14252      14354      14456  GET /recent/199 HTTP/1.1
    3  0.469  0.1563  0.0665  0.087  0.136  0.246  0.246  0.246  0.246    3    0    0    0       40426      13389      13475      13630  GET /recent/66 HTTP/1.1
    2  0.336  0.1680  0.0650  0.103  0.233  0.233  0.233  0.233  0.233    2    0    0    0       28762      14332      14381      14430  GET /recent/184 HTTP/1.1

Top 20 Sort By Maximum(100 Percentile)
Count   Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max  2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
    1   0.580  0.5800  0.0000  0.580  0.580  0.580  0.580  0.580  0.580    1    0    0    0      345378     345378     345378     345378  GET /torch-20200802063612.svg HTTP/1.1
   38   8.120  0.2137  0.0814  0.090  0.205  0.331  0.388  0.436  0.436   38    0    0    0      529482      13592      13933      14099  GET /recent/204 HTTP/1.1
    3   0.611  0.2037  0.1570  0.039  0.157  0.415  0.415  0.415  0.415    3    0    0    0       42053      13937      14017      14131  GET /recent/1 HTTP/1.1
    3   0.673  0.2243  0.1340  0.114  0.146  0.413  0.413  0.413  0.413    3    0    0    0       42285      13877      14095      14304  GET /recent/157 HTTP/1.1
   26   6.104  0.2348  0.0649  0.130  0.245  0.327  0.361  0.387  0.387   26    0    0    0      355185      13182      13660      13905  GET /recent/205 HTTP/1.1
    1   0.377  0.3770  0.0000  0.377  0.377  0.377  0.377  0.377  0.377    1    0    0    0       14364      14364      14364      14364  GET /recent/91 HTTP/1.1
    2   0.594  0.2970  0.0680  0.229  0.365  0.365  0.365  0.365  0.365    2    0    0    0       28708      14252      14354      14456  GET /recent/199 HTTP/1.1
  504  61.142  0.1213  0.0465  0.035  0.116  0.183  0.202  0.245  0.362  504    0    0    0     7540949      13478      14962      16057  GET / HTTP/1.1
    4   0.791  0.1977  0.1026  0.060  0.201  0.349  0.349  0.349  0.349    4    0    0    0       59228      14730      14807      14862  GET /recent/112 HTTP/1.1
    4   0.618  0.1545  0.1099  0.049  0.151  0.334  0.334  0.334  0.334    4    0    0    0       56757      13960      14189      14425  GET /recent/70 HTTP/1.1
    3   0.542  0.1807  0.1006  0.096  0.124  0.322  0.322  0.322  0.322    3    0    0    0       44051      14553      14683      14838  GET /recent/127 HTTP/1.1
    1   0.307  0.3070  0.0000  0.307  0.307  0.307  0.307  0.307  0.307    1    0    0    0       14412      14412      14412      14412  GET /recent/188 HTTP/1.1
    3   0.555  0.1850  0.1034  0.052  0.199  0.304  0.304  0.304  0.304    3    0    0    0       41247      13672      13749      13880  GET /recent/83 HTTP/1.1
    6   1.098  0.1830  0.0712  0.065  0.176  0.293  0.293  0.293  0.293    6    0    0    0       84151      13919      14025      14134  GET /recent/203 HTTP/1.1
    6   0.746  0.1243  0.0782  0.060  0.095  0.289  0.289  0.289  0.289    6    0    0    0       85723      14142      14287      14478  GET /recent/154 HTTP/1.1
    7   1.058  0.1511  0.0697  0.061  0.162  0.283  0.283  0.283  0.283    7    0    0    0       99259      13905      14179      14457  GET /recent/178 HTTP/1.1
    3   0.589  0.1963  0.0592  0.154  0.155  0.280  0.280  0.280  0.280    3    0    0    0       41097      13378      13699      14000  GET /recent/189 HTTP/1.1
    3   0.455  0.1517  0.0909  0.081  0.094  0.280  0.280  0.280  0.280    3    0    0    0       44084      14372      14694      15119  GET /recent/134 HTTP/1.1
    7   1.268  0.1811  0.0693  0.106  0.174  0.272  0.272  0.272  0.272    7    0    0    0       97899      13868      13985      14166  GET /recent/156 HTTP/1.1
    1   0.269  0.2690  0.0000  0.269  0.269  0.269  0.269  0.269  0.269    1    0    0    0       13634      13634      13634      13634  GET /recent/194 HTTP/1.1

TOP 37 Slow Requests
 1  0.580  GET /torch-20200802063612.svg HTTP/1.1
 2  0.436  GET /recent/204 HTTP/1.1
 3  0.415  GET /recent/1 HTTP/1.1
 4  0.413  GET /recent/157 HTTP/1.1
 5  0.388  GET /recent/204 HTTP/1.1
 6  0.387  GET /recent/205 HTTP/1.1
 7  0.377  GET /recent/91 HTTP/1.1
 8  0.365  GET /recent/199 HTTP/1.1
 9  0.362  GET / HTTP/1.1
10  0.361  GET /recent/205 HTTP/1.1
11  0.353  GET /recent/204 HTTP/1.1
12  0.349  GET /recent/112 HTTP/1.1
13  0.334  GET /recent/70 HTTP/1.1
14  0.331  GET /recent/204 HTTP/1.1
15  0.327  GET /recent/205 HTTP/1.1
16  0.322  GET /recent/127 HTTP/1.1
17  0.309  GET /recent/205 HTTP/1.1
18  0.307  GET /recent/188 HTTP/1.1
19  0.304  GET /recent/83 HTTP/1.1
20  0.300  GET /recent/204 HTTP/1.1
21  0.295  GET /recent/204 HTTP/1.1
22  0.293  GET /recent/203 HTTP/1.1
23  0.289  GET /recent/204 HTTP/1.1
24  0.289  GET /recent/154 HTTP/1.1
25  0.288  GET /recent/204 HTTP/1.1
26  0.283  GET /recent/178 HTTP/1.1
27  0.282  GET /recent/205 HTTP/1.1
28  0.281  GET /recent/204 HTTP/1.1
29  0.280  GET /recent/134 HTTP/1.1
30  0.280  GET /recent/189 HTTP/1.1
31  0.276  GET /recent/205 HTTP/1.1
32  0.273  GET /recent/205 HTTP/1.1
33  0.272  GET /recent/156 HTTP/1.1
34  0.270  GET / HTTP/1.1
35  0.269  GET /recent/192 HTTP/1.1
36  0.269  GET /recent/204 HTTP/1.1
37  0.269  GET /recent/194 HTTP/1.1

slow query log

Count: 1  Time=0.14s (0s)  Lock=0.00s (0s)  Rows=0.0 (0), isucon[isucon]@localhost
  #

Count: 484  Time=0.10s (47s)  Lock=0.00s (0s)  Rows=100.0 (48400), isucon[isucon]@localhost
  SELECT * FROM memos WHERE is_private=N ORDER BY created_at DESC, id DESC LIMIT N OFFSET N

Count: 504  Time=0.06s (31s)  Lock=0.00s (0s)  Rows=100.0 (50400), isucon[isucon]@localhost
  SELECT * FROM memos WHERE is_private=N ORDER BY created_at DESC, id DESC LIMIT N

Count: 204  Time=0.06s (11s)  Lock=0.00s (0s)  Rows=50.8 (10366), isucon[isucon]@localhost
  SELECT id, content, is_private, created_at, updated_at FROM memos WHERE user=N AND is_private=N ORDER BY created_at

Count: 201  Time=0.06s (11s)  Lock=0.00s (0s)  Rows=104.2 (20937), isucon[isucon]@localhost
  SELECT id, content, is_private, created_at, updated_at FROM memos WHERE user=N ORDER BY created_at DESC

Count: 1074  Time=0.05s (56s)  Lock=0.00s (0s)  Rows=105.1 (112837), isucon[isucon]@localhost
  SELECT id, content, is_private, created_at, updated_at FROM memos WHERE user=N  ORDER BY created_at

Count: 988  Time=0.04s (37s)  Lock=0.00s (0s)  Rows=1.0 (988), isucon[isucon]@localhost
  SELECT count(*) AS c FROM memos WHERE is_private=N

Count: 1  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=0.0 (0), 0users@0hosts
  administrator command: Prepare

Count: 1  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=0.0 (0), 0users@0hosts
okashoi commented 4 years ago
Result:   SUCCESS 
RawScore: 5628.2
Fails:    0
Score:    5628.2

Flame Graph

http://52.199.202.14/torch-20200802071312.svg

Kataribe

Top 20 Sort By Count
Count   Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
 1971  26.984  0.0137  0.0302  0.000  0.003  0.044  0.074  0.153  0.334  1838    0  133    0     7666314         10       3889      58970  get memo
 1565   1.047  0.0007  0.0013  0.000  0.000  0.001  0.003  0.007  0.015  1565    0    0    0    44807515      28631      28631      28631  GET /js/bootstrap.min.js HTTP/1.1
 1565   1.343  0.0009  0.0017  0.000  0.000  0.002  0.003  0.009  0.024  1565    0    0    0   145712455      93107      93107      93107  GET /js/jquery.min.js HTTP/1.1
 1565   1.182  0.0008  0.0012  0.000  0.000  0.002  0.003  0.006  0.011  1565    0    0    0   165913475     106015     106015     106015  GET /css/bootstrap.min.css HTTP/1.1
 1565   0.973  0.0006  0.0013  0.000  0.000  0.001  0.003  0.006  0.015  1565    0    0    0    26368685      16849      16849      16849  GET /css/bootstrap-responsive.min.css HTTP/1.1
  725  27.279  0.0376  0.0199  0.014  0.033  0.058  0.071  0.094  0.200   725    0    0    0    10852092      13500      14968      15881  GET / HTTP/1.1
  286   5.313  0.0186  0.0277  0.001  0.008  0.057  0.085  0.132  0.140   286    0    0    0     4319125       1920      15101      28501  GET /mypage HTTP/1.1
  286   0.931  0.0033  0.0070  0.001  0.002  0.005  0.007  0.014  0.100     0  286    0    0           0          0          0          0  POST /signin HTTP/1.1
  286   0.962  0.0034  0.0028  0.001  0.002  0.007  0.011  0.014  0.016     0  286    0    0           0          0          0          0  POST /memo HTTP/1.1
  286   0.198  0.0007  0.0012  0.000  0.001  0.001  0.002  0.006  0.011     0  286    0    0           0          0          0          0  POST /signout HTTP/1.1
  286   0.120  0.0004  0.0008  0.000  0.000  0.001  0.001  0.003  0.007   286    0    0    0      381524       1334       1334       1334  GET /signin HTTP/1.1
   67   7.490  0.1118  0.0285  0.054  0.106  0.152  0.169  0.187  0.187    67    0    0    0      922354      13176      13766      14076  GET /recent/205 HTTP/1.1
   39   5.734  0.1470  0.0582  0.059  0.133  0.233  0.237  0.304  0.304    39    0    0    0      543513      13650      13936      14099  GET /recent/204 HTTP/1.1
   12   0.711  0.0592  0.0164  0.038  0.061  0.082  0.084  0.084  0.084    12    0    0    0      169906      13924      14158      14447  GET /recent/122 HTTP/1.1
   12   0.716  0.0597  0.0290  0.031  0.060  0.103  0.130  0.130  0.130    12    0    0    0      163644      13408      13637      13921  GET /recent/84 HTTP/1.1
   10   0.455  0.0455  0.0132  0.031  0.048  0.070  0.070  0.070  0.070    10    0    0    0      140077      13700      14007      14218  GET /recent/82 HTTP/1.1
   10   0.668  0.0668  0.0286  0.045  0.054  0.140  0.140  0.140  0.140    10    0    0    0      145339      14039      14533      14879  GET /recent/160 HTTP/1.1
   10   0.374  0.0374  0.0092  0.029  0.039  0.057  0.057  0.057  0.057    10    0    0    0      140898      13886      14089      14434  GET /recent/69 HTTP/1.1
   10   0.896  0.0896  0.0573  0.053  0.076  0.254  0.254  0.254  0.254    10    0    0    0      138211      13570      13821      14131  GET /recent/196 HTTP/1.1
    9   0.667  0.0741  0.0223  0.052  0.061  0.117  0.117  0.117  0.117     9    0    0    0      123343      13435      13704      13829  GET /recent/190 HTTP/1.1

Top 20 Sort By Total
Count   Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
  725  27.279  0.0376  0.0199  0.014  0.033  0.058  0.071  0.094  0.200   725    0    0    0    10852092      13500      14968      15881  GET / HTTP/1.1
 1971  26.984  0.0137  0.0302  0.000  0.003  0.044  0.074  0.153  0.334  1838    0  133    0     7666314         10       3889      58970  get memo
   67   7.490  0.1118  0.0285  0.054  0.106  0.152  0.169  0.187  0.187    67    0    0    0      922354      13176      13766      14076  GET /recent/205 HTTP/1.1
   39   5.734  0.1470  0.0582  0.059  0.133  0.233  0.237  0.304  0.304    39    0    0    0      543513      13650      13936      14099  GET /recent/204 HTTP/1.1
  286   5.313  0.0186  0.0277  0.001  0.008  0.057  0.085  0.132  0.140   286    0    0    0     4319125       1920      15101      28501  GET /mypage HTTP/1.1
 1565   1.343  0.0009  0.0017  0.000  0.000  0.002  0.003  0.009  0.024  1565    0    0    0   145712455      93107      93107      93107  GET /js/jquery.min.js HTTP/1.1
 1565   1.182  0.0008  0.0012  0.000  0.000  0.002  0.003  0.006  0.011  1565    0    0    0   165913475     106015     106015     106015  GET /css/bootstrap.min.css HTTP/1.1
 1565   1.047  0.0007  0.0013  0.000  0.000  0.001  0.003  0.007  0.015  1565    0    0    0    44807515      28631      28631      28631  GET /js/bootstrap.min.js HTTP/1.1
 1565   0.973  0.0006  0.0013  0.000  0.000  0.001  0.003  0.006  0.015  1565    0    0    0    26368685      16849      16849      16849  GET /css/bootstrap-responsive.min.css HTTP/1.1
  286   0.962  0.0034  0.0028  0.001  0.002  0.007  0.011  0.014  0.016     0  286    0    0           0          0          0          0  POST /memo HTTP/1.1
  286   0.931  0.0033  0.0070  0.001  0.002  0.005  0.007  0.014  0.100     0  286    0    0           0          0          0          0  POST /signin HTTP/1.1
   10   0.896  0.0896  0.0573  0.053  0.076  0.254  0.254  0.254  0.254    10    0    0    0      138211      13570      13821      14131  GET /recent/196 HTTP/1.1
    6   0.788  0.1313  0.0917  0.053  0.117  0.323  0.323  0.323  0.323     6    0    0    0       84973      14010      14162      14413  GET /recent/199 HTTP/1.1
    9   0.761  0.0846  0.0269  0.050  0.093  0.117  0.117  0.117  0.117     9    0    0    0      129090      13907      14343      14594  GET /recent/188 HTTP/1.1
    8   0.731  0.0914  0.0487  0.043  0.080  0.207  0.207  0.207  0.207     8    0    0    0      114542      14040      14317      14586  GET /recent/149 HTTP/1.1
   12   0.716  0.0597  0.0290  0.031  0.060  0.103  0.130  0.130  0.130    12    0    0    0      163644      13408      13637      13921  GET /recent/84 HTTP/1.1
   12   0.711  0.0592  0.0164  0.038  0.061  0.082  0.084  0.084  0.084    12    0    0    0      169906      13924      14158      14447  GET /recent/122 HTTP/1.1
    6   0.707  0.1178  0.0661  0.045  0.102  0.246  0.246  0.246  0.246     6    0    0    0       82196      13446      13699      13896  GET /recent/130 HTTP/1.1
    9   0.686  0.0762  0.0246  0.048  0.071  0.133  0.133  0.133  0.133     9    0    0    0      125209      13565      13912      14145  GET /recent/172 HTTP/1.1
    8   0.686  0.0858  0.0472  0.047  0.088  0.193  0.193  0.193  0.193     8    0    0    0      112450      13677      14056      14479  GET /recent/170 HTTP/1.1

Top 20 Sort By Mean
Count  Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max  2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
    1  0.156  0.1560  0.0000  0.156  0.156  0.156  0.156  0.156  0.156    1    0    0    0      363033     363033     363033     363033  GET /torch-20200802071312.svg HTTP/1.1
   39  5.734  0.1470  0.0582  0.059  0.133  0.233  0.237  0.304  0.304   39    0    0    0      543513      13650      13936      14099  GET /recent/204 HTTP/1.1
    6  0.788  0.1313  0.0917  0.053  0.117  0.323  0.323  0.323  0.323    6    0    0    0       84973      14010      14162      14413  GET /recent/199 HTTP/1.1
    6  0.707  0.1178  0.0661  0.045  0.102  0.246  0.246  0.246  0.246    6    0    0    0       82196      13446      13699      13896  GET /recent/130 HTTP/1.1
    4  0.451  0.1128  0.0766  0.045  0.123  0.234  0.234  0.234  0.234    4    0    0    0       55185      13637      13796      13931  GET /recent/166 HTTP/1.1
    1  0.112  0.1120  0.0000  0.112  0.112  0.112  0.112  0.112  0.112    1    0    0    0       13849      13849      13849      13849  GET /recent/179 HTTP/1.1
   67  7.490  0.1118  0.0285  0.054  0.106  0.152  0.169  0.187  0.187   67    0    0    0      922354      13176      13766      14076  GET /recent/205 HTTP/1.1
    4  0.433  0.1082  0.0221  0.082  0.107  0.143  0.143  0.143  0.143    4    0    0    0       56757      13719      14189      14532  GET /recent/189 HTTP/1.1
    1  0.107  0.1070  0.0000  0.107  0.107  0.107  0.107  0.107  0.107    1    0    0    0       13800      13800      13800      13800  GET /recent/173 HTTP/1.1
    5  0.517  0.1034  0.0718  0.059  0.069  0.246  0.246  0.246  0.246    5    0    0    0       70867      13909      14173      14367  GET /recent/171 HTTP/1.1
    5  0.492  0.0984  0.0323  0.055  0.102  0.142  0.142  0.142  0.142    5    0    0    0       68579      13633      13715      13846  GET /recent/182 HTTP/1.1
    5  0.470  0.0940  0.0354  0.056  0.093  0.157  0.157  0.157  0.157    5    0    0    0       67371      13259      13474      13740  GET /recent/197 HTTP/1.1
    5  0.458  0.0916  0.0549  0.042  0.085  0.193  0.193  0.193  0.193    5    0    0    0       69854      13650      13970      14215  GET /recent/137 HTTP/1.1
    8  0.731  0.0914  0.0487  0.043  0.080  0.207  0.207  0.207  0.207    8    0    0    0      114542      14040      14317      14586  GET /recent/149 HTTP/1.1
    5  0.454  0.0908  0.0218  0.050  0.097  0.116  0.116  0.116  0.116    5    0    0    0       71122      13684      14224      14642  GET /recent/174 HTTP/1.1
    3  0.271  0.0903  0.0252  0.057  0.096  0.118  0.118  0.118  0.118    3    0    0    0       42390      14083      14130      14159  GET /recent/185 HTTP/1.1
    5  0.451  0.0902  0.0448  0.047  0.090  0.171  0.171  0.171  0.171    5    0    0    0       69279      13700      13855      14398  GET /recent/168 HTTP/1.1
   10  0.896  0.0896  0.0573  0.053  0.076  0.254  0.254  0.254  0.254   10    0    0    0      138211      13570      13821      14131  GET /recent/196 HTTP/1.1
    7  0.624  0.0891  0.0317  0.049  0.084  0.146  0.146  0.146  0.146    7    0    0    0       97963      13662      13994      14386  GET /recent/161 HTTP/1.1
    6  0.532  0.0887  0.0296  0.052  0.090  0.139  0.139  0.139  0.139    6    0    0    0       83114      13726      13852      14102  GET /recent/192 HTTP/1.1

Top 20 Sort By Standard Deviation
Count  Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max  2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
    6  0.788  0.1313  0.0917  0.053  0.117  0.323  0.323  0.323  0.323    6    0    0    0       84973      14010      14162      14413  GET /recent/199 HTTP/1.1
    4  0.451  0.1128  0.0766  0.045  0.123  0.234  0.234  0.234  0.234    4    0    0    0       55185      13637      13796      13931  GET /recent/166 HTTP/1.1
    5  0.517  0.1034  0.0718  0.059  0.069  0.246  0.246  0.246  0.246    5    0    0    0       70867      13909      14173      14367  GET /recent/171 HTTP/1.1
    5  0.402  0.0804  0.0687  0.041  0.042  0.217  0.217  0.217  0.217    5    0    0    0       70915      14107      14183      14224  GET /recent/133 HTTP/1.1
    6  0.707  0.1178  0.0661  0.045  0.102  0.246  0.246  0.246  0.246    6    0    0    0       82196      13446      13699      13896  GET /recent/130 HTTP/1.1
    5  0.281  0.0562  0.0602  0.017  0.031  0.176  0.176  0.176  0.176    5    0    0    0       69650      13517      13930      14131  GET /recent/1 HTTP/1.1
    4  0.344  0.0860  0.0584  0.049  0.058  0.187  0.187  0.187  0.187    4    0    0    0       54839      13385      13709      14602  GET /recent/175 HTTP/1.1
   39  5.734  0.1470  0.0582  0.059  0.133  0.233  0.237  0.304  0.304   39    0    0    0      543513      13650      13936      14099  GET /recent/204 HTTP/1.1
   10  0.896  0.0896  0.0573  0.053  0.076  0.254  0.254  0.254  0.254   10    0    0    0      138211      13570      13821      14131  GET /recent/196 HTTP/1.1
    4  0.257  0.0643  0.0553  0.032  0.033  0.160  0.160  0.160  0.160    4    0    0    0       54330      13272      13582      13891  GET /recent/89 HTTP/1.1
    5  0.458  0.0916  0.0549  0.042  0.085  0.193  0.193  0.193  0.193    5    0    0    0       69854      13650      13970      14215  GET /recent/137 HTTP/1.1
    8  0.731  0.0914  0.0487  0.043  0.080  0.207  0.207  0.207  0.207    8    0    0    0      114542      14040      14317      14586  GET /recent/149 HTTP/1.1
    5  0.324  0.0648  0.0481  0.034  0.036  0.159  0.159  0.159  0.159    5    0    0    0       69624      13637      13924      14351  GET /recent/94 HTTP/1.1
    8  0.686  0.0858  0.0472  0.047  0.088  0.193  0.193  0.193  0.193    8    0    0    0      112450      13677      14056      14479  GET /recent/170 HTTP/1.1
    5  0.451  0.0902  0.0448  0.047  0.090  0.171  0.171  0.171  0.171    5    0    0    0       69279      13700      13855      14398  GET /recent/168 HTTP/1.1
    4  0.333  0.0832  0.0439  0.038  0.106  0.144  0.144  0.144  0.144    4    0    0    0       57470      14171      14367      14556  GET /recent/97 HTTP/1.1
    5  0.392  0.0784  0.0427  0.045  0.066  0.161  0.161  0.161  0.161    5    0    0    0       70939      14003      14187      14420  GET /recent/145 HTTP/1.1
    7  0.562  0.0803  0.0410  0.049  0.052  0.167  0.167  0.167  0.167    7    0    0    0       95817      13336      13688      13958  GET /recent/180 HTTP/1.1
    3  0.199  0.0663  0.0372  0.039  0.041  0.119  0.119  0.119  0.119    3    0    0    0       42216      13879      14072      14280  GET /recent/123 HTTP/1.1
    4  0.298  0.0745  0.0361  0.039  0.097  0.122  0.122  0.122  0.122    4    0    0    0       56535      13817      14133      14548  GET /recent/124 HTTP/1.1

Top 20 Sort By Maximum(100 Percentile)
Count   Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
 1971  26.984  0.0137  0.0302  0.000  0.003  0.044  0.074  0.153  0.334  1838    0  133    0     7666314         10       3889      58970  get memo
    6   0.788  0.1313  0.0917  0.053  0.117  0.323  0.323  0.323  0.323     6    0    0    0       84973      14010      14162      14413  GET /recent/199 HTTP/1.1
   39   5.734  0.1470  0.0582  0.059  0.133  0.233  0.237  0.304  0.304    39    0    0    0      543513      13650      13936      14099  GET /recent/204 HTTP/1.1
   10   0.896  0.0896  0.0573  0.053  0.076  0.254  0.254  0.254  0.254    10    0    0    0      138211      13570      13821      14131  GET /recent/196 HTTP/1.1
    6   0.707  0.1178  0.0661  0.045  0.102  0.246  0.246  0.246  0.246     6    0    0    0       82196      13446      13699      13896  GET /recent/130 HTTP/1.1
    5   0.517  0.1034  0.0718  0.059  0.069  0.246  0.246  0.246  0.246     5    0    0    0       70867      13909      14173      14367  GET /recent/171 HTTP/1.1
    4   0.451  0.1128  0.0766  0.045  0.123  0.234  0.234  0.234  0.234     4    0    0    0       55185      13637      13796      13931  GET /recent/166 HTTP/1.1
    5   0.402  0.0804  0.0687  0.041  0.042  0.217  0.217  0.217  0.217     5    0    0    0       70915      14107      14183      14224  GET /recent/133 HTTP/1.1
    8   0.731  0.0914  0.0487  0.043  0.080  0.207  0.207  0.207  0.207     8    0    0    0      114542      14040      14317      14586  GET /recent/149 HTTP/1.1
  725  27.279  0.0376  0.0199  0.014  0.033  0.058  0.071  0.094  0.200   725    0    0    0    10852092      13500      14968      15881  GET / HTTP/1.1
    8   0.686  0.0858  0.0472  0.047  0.088  0.193  0.193  0.193  0.193     8    0    0    0      112450      13677      14056      14479  GET /recent/170 HTTP/1.1
    5   0.458  0.0916  0.0549  0.042  0.085  0.193  0.193  0.193  0.193     5    0    0    0       69854      13650      13970      14215  GET /recent/137 HTTP/1.1
   67   7.490  0.1118  0.0285  0.054  0.106  0.152  0.169  0.187  0.187    67    0    0    0      922354      13176      13766      14076  GET /recent/205 HTTP/1.1
    4   0.344  0.0860  0.0584  0.049  0.058  0.187  0.187  0.187  0.187     4    0    0    0       54839      13385      13709      14602  GET /recent/175 HTTP/1.1
    5   0.281  0.0562  0.0602  0.017  0.031  0.176  0.176  0.176  0.176     5    0    0    0       69650      13517      13930      14131  GET /recent/1 HTTP/1.1
    5   0.451  0.0902  0.0448  0.047  0.090  0.171  0.171  0.171  0.171     5    0    0    0       69279      13700      13855      14398  GET /recent/168 HTTP/1.1
    7   0.562  0.0803  0.0410  0.049  0.052  0.167  0.167  0.167  0.167     7    0    0    0       95817      13336      13688      13958  GET /recent/180 HTTP/1.1
    5   0.392  0.0784  0.0427  0.045  0.066  0.161  0.161  0.161  0.161     5    0    0    0       70939      14003      14187      14420  GET /recent/145 HTTP/1.1
    4   0.257  0.0643  0.0553  0.032  0.033  0.160  0.160  0.160  0.160     4    0    0    0       54330      13272      13582      13891  GET /recent/89 HTTP/1.1
    5   0.324  0.0648  0.0481  0.034  0.036  0.159  0.159  0.159  0.159     5    0    0    0       69624      13637      13924      14351  GET /recent/94 HTTP/1.1

TOP 37 Slow Requests
 1  0.334  GET /memo/41184 HTTP/1.1
 2  0.323  GET /recent/199 HTTP/1.1
 3  0.314  GET /memo/41212 HTTP/1.1
 4  0.304  GET /recent/204 HTTP/1.1
 5  0.269  GET /memo/41191 HTTP/1.1
 6  0.254  GET /recent/196 HTTP/1.1
 7  0.252  GET /memo/41177 HTTP/1.1
 8  0.246  GET /recent/130 HTTP/1.1
 9  0.246  GET /recent/171 HTTP/1.1
10  0.237  GET /memo/41194 HTTP/1.1
11  0.237  GET /recent/204 HTTP/1.1
12  0.235  GET /recent/204 HTTP/1.1
13  0.234  GET /recent/166 HTTP/1.1
14  0.233  GET /recent/204 HTTP/1.1
15  0.230  GET /recent/204 HTTP/1.1
16  0.227  GET /recent/204 HTTP/1.1
17  0.217  GET /recent/133 HTTP/1.1
18  0.210  GET /recent/204 HTTP/1.1
19  0.209  GET /memo/41217 HTTP/1.1
20  0.209  GET /memo/41179 HTTP/1.1
21  0.207  GET /recent/149 HTTP/1.1
22  0.201  GET /memo/41187 HTTP/1.1
23  0.200  GET /recent/204 HTTP/1.1
24  0.200  GET / HTTP/1.1
25  0.199  GET /recent/204 HTTP/1.1
26  0.199  GET /recent/204 HTTP/1.1
27  0.199  GET /recent/204 HTTP/1.1
28  0.193  GET /recent/137 HTTP/1.1
29  0.193  GET /recent/170 HTTP/1.1
30  0.191  GET / HTTP/1.1
31  0.191  GET /memo/41181 HTTP/1.1
32  0.187  GET / HTTP/1.1
33  0.187  GET /recent/205 HTTP/1.1
34  0.187  GET /recent/175 HTTP/1.1
35  0.186  GET /memo/41215 HTTP/1.1
36  0.184  GET /memo/41201 HTTP/1.1
37  0.183  GET /recent/204 HTTP/1.1

sloq query log

Reading mysql slow query log from /var/lib/mysql/mysql-slow.log
Count: 30  Time=0.18s (5s)  Lock=0.00s (0s)  Rows=61.3 (1839), isucon[isucon]@localhost
  SELECT id, content, is_private, created_at, updated_at FROM memos WHERE user=N AND is_private=N ORDER BY created_at

Count: 68  Time=0.14s (9s)  Lock=0.00s (0s)  Rows=100.0 (6800), isucon[isucon]@localhost
  SELECT * FROM memos WHERE is_private=N ORDER BY created_at DESC, id DESC LIMIT N OFFSET N

Count: 6  Time=0.09s (0s)  Lock=0.00s (0s)  Rows=100.0 (600), isucon[isucon]@localhost
  SELECT * FROM memos WHERE is_private=N ORDER BY created_at DESC, id DESC LIMIT N

Count: 48  Time=0.06s (2s)  Lock=0.00s (0s)  Rows=116.3 (5581), isucon[isucon]@localhost
  SELECT id, content, is_private, created_at, updated_at FROM memos WHERE user=N ORDER BY created_at DESC

Count: 253  Time=0.05s (13s)  Lock=0.00s (0s)  Rows=122.4 (30977), isucon[isucon]@localhost
  SELECT id, content, is_private, created_at, updated_at FROM memos WHERE user=N  ORDER BY created_at

Count: 1  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=0.0 (0), 0users@0hosts
okashoi commented 4 years ago

workload を変えながらベンチマーク実行

workload = 3

Result:   SUCCESS                                                                                                                                                              
RawScore: 7301.0                                                                                                                                                               
Fails:    0                                                                                                                                                                    
Score:    7301.0

workload = 5

Result:   SUCCESS                                                                                                                                                              
RawScore: 7246.6                                                                                                                                                               
Fails:    0                                                                                                                                                                    
Score:    7246.6

workload = 10

Result:   FAIL 
RawScore: 7285.2
Fails:    1094
Score:    0.0
okashoi commented 4 years ago

workload = 5

Result:   SUCCESS 
RawScore: 8139.7
Fails:    0
Score:    8139.7

Flame Graph

http://52.199.202.14/torch-20200802084659.svg

Kataribe

Top 20 Sort By Count
Count     Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
 3795    36.543  0.0096  0.0122  0.000  0.004  0.026  0.033  0.054  0.104  3795    0    0    0   108654645      28631      28631      28631  GET /js/bootstrap.min.js HTTP/1.1
 3795    36.783  0.0097  0.0125  0.000  0.005  0.026  0.034  0.056  0.115  3795    0    0    0   353341065      93107      93107      93107  GET /js/jquery.min.js HTTP/1.1
 3795    37.394  0.0099  0.0125  0.000  0.005  0.027  0.034  0.056  0.094  3795    0    0    0   402326925     106015     106015     106015  GET /css/bootstrap.min.css HTTP/1.1
 3795    38.253  0.0101  0.0125  0.000  0.005  0.027  0.035  0.057  0.083  3795    0    0    0    63941955      16849      16849      16849  GET /css/bootstrap-responsive.min.css HTTP/1.1
 3618   660.497  0.1826  0.1249  0.000  0.167  0.278  0.358  0.770  1.162  3137    0  481    0     8170153         10       2258      58970  get memo
 2423  1051.217  0.4338  1.2766  0.006  0.220  0.359  0.565  8.477  9.154  2423    0    0    0    37449694      13478      15455      16187  GET / HTTP/1.1
  972   180.054  0.1852  0.0883  0.002  0.176  0.265  0.308  0.558  0.896     0  972    0    0           0          0          0          0  POST /signin HTTP/1.1
  972    14.070  0.0145  0.0125  0.000  0.012  0.031  0.038  0.056  0.071     0  972    0    0           0          0          0          0  POST /signout HTTP/1.1
  972   184.338  0.1896  0.1324  0.002  0.170  0.267  0.364  0.834  1.049     0  972    0    0           0          0          0          0  POST /memo HTTP/1.1
  972   203.731  0.2096  0.2045  0.001  0.167  0.305  0.578  1.322  1.768   972    0    0    0     1296648       1334       1334       1334  GET /signin HTTP/1.1
  972   206.646  0.2126  0.1594  0.011  0.182  0.304  0.470  0.964  1.047   972    0    0    0    15243756       1920      15682      28610  GET /mypage HTTP/1.1
    8     3.083  0.3854  0.2091  0.256  0.332  0.927  0.927  0.927  0.927     8    0    0    0      113966      13788      14245      14751  GET /recent/83 HTTP/1.1
    8     4.342  0.5427  0.0639  0.426  0.576  0.609  0.609  0.609  0.609     8    0    0    0      111123      13517      13890      14102  GET /recent/205 HTTP/1.1
    7     1.844  0.2634  0.0735  0.155  0.251  0.360  0.360  0.360  0.360     7    0    0    0      101518      14072      14502      14822  GET /recent/37 HTTP/1.1
    7     2.780  0.3971  0.2643  0.158  0.256  0.871  0.871  0.871  0.871     7    0    0    0       98116      13511      14016      14423  GET /recent/34 HTTP/1.1
    7     2.744  0.3920  0.0944  0.211  0.389  0.511  0.511  0.511  0.511     7    0    0    0      100084      13870      14297      14648  GET /recent/130 HTTP/1.1
    7     2.569  0.3670  0.0873  0.268  0.373  0.519  0.519  0.519  0.519     7    0    0    0       98566      13736      14080      14184  GET /recent/74 HTTP/1.1
    7     2.404  0.3434  0.1190  0.134  0.389  0.492  0.492  0.492  0.492     7    0    0    0      100661      14041      14380      15066  GET /recent/107 HTTP/1.1
    7     3.314  0.4734  0.5274  0.135  0.266  1.745  1.745  1.745  1.745     7    0    0    0       98383      13699      14054      14437  GET /recent/55 HTTP/1.1
    7    40.001  5.7144  3.5333  0.051  7.937  8.339  8.339  8.339  8.339     7    0    0    0      100213      13932      14316      15677  GET /recent/1 HTTP/1.1

Top 20 Sort By Total
Count     Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
 2423  1051.217  0.4338  1.2766  0.006  0.220  0.359  0.565  8.477  9.154  2423    0    0    0    37449694      13478      15455      16187  GET / HTTP/1.1
 3618   660.497  0.1826  0.1249  0.000  0.167  0.278  0.358  0.770  1.162  3137    0  481    0     8170153         10       2258      58970  get memo
  972   206.646  0.2126  0.1594  0.011  0.182  0.304  0.470  0.964  1.047   972    0    0    0    15243756       1920      15682      28610  GET /mypage HTTP/1.1
  972   203.731  0.2096  0.2045  0.001  0.167  0.305  0.578  1.322  1.768   972    0    0    0     1296648       1334       1334       1334  GET /signin HTTP/1.1
  972   184.338  0.1896  0.1324  0.002  0.170  0.267  0.364  0.834  1.049     0  972    0    0           0          0          0          0  POST /memo HTTP/1.1
  972   180.054  0.1852  0.0883  0.002  0.176  0.265  0.308  0.558  0.896     0  972    0    0           0          0          0          0  POST /signin HTTP/1.1
    7    40.001  5.7144  3.5333  0.051  7.937  8.339  8.339  8.339  8.339     7    0    0    0      100213      13932      14316      15677  GET /recent/1 HTTP/1.1
 3795    38.253  0.0101  0.0125  0.000  0.005  0.027  0.035  0.057  0.083  3795    0    0    0    63941955      16849      16849      16849  GET /css/bootstrap-responsive.min.css HTTP/1.1
 3795    37.394  0.0099  0.0125  0.000  0.005  0.027  0.034  0.056  0.094  3795    0    0    0   402326925     106015     106015     106015  GET /css/bootstrap.min.css HTTP/1.1
 3795    36.783  0.0097  0.0125  0.000  0.005  0.026  0.034  0.056  0.115  3795    0    0    0   353341065      93107      93107      93107  GET /js/jquery.min.js HTTP/1.1
 3795    36.543  0.0096  0.0122  0.000  0.004  0.026  0.033  0.054  0.104  3795    0    0    0   108654645      28631      28631      28631  GET /js/bootstrap.min.js HTTP/1.1
  972    14.070  0.0145  0.0125  0.000  0.012  0.031  0.038  0.056  0.071     0  972    0    0           0          0          0          0  POST /signout HTTP/1.1
    8     4.342  0.5427  0.0639  0.426  0.576  0.609  0.609  0.609  0.609     8    0    0    0      111123      13517      13890      14102  GET /recent/205 HTTP/1.1
    6     4.301  0.7168  0.1868  0.466  0.698  1.084  1.084  1.084  1.084     6    0    0    0       84247      13926      14041      14212  GET /recent/204 HTTP/1.1
    6     3.571  0.5952  0.1543  0.415  0.566  0.919  0.919  0.919  0.919     6    0    0    0       83672      13501      13945      14232  GET /recent/180 HTTP/1.1
    6     3.480  0.5800  0.0317  0.520  0.599  0.612  0.612  0.612  0.612     6    0    0    0       81788      13446      13631      13933  GET /recent/207 HTTP/1.1
    7     3.314  0.4734  0.5274  0.135  0.266  1.745  1.745  1.745  1.745     7    0    0    0       98383      13699      14054      14437  GET /recent/55 HTTP/1.1
    6     3.186  0.5310  0.2088  0.286  0.517  0.945  0.945  0.945  0.945     6    0    0    0       81596      13331      13599      13849  GET /recent/166 HTTP/1.1
    6     3.159  0.5265  0.0413  0.462  0.534  0.582  0.582  0.582  0.582     6    0    0    0       82372      13548      13728      13869  GET /recent/194 HTTP/1.1
    8     3.083  0.3854  0.2091  0.256  0.332  0.927  0.927  0.927  0.927     8    0    0    0      113966      13788      14245      14751  GET /recent/83 HTTP/1.1

Top 20 Sort By Mean
Count   Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max  2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
    7  40.001  5.7144  3.5333  0.051  7.937  8.339  8.339  8.339  8.339    7    0    0    0      100213      13932      14316      15677  GET /recent/1 HTTP/1.1
    1   0.855  0.8550  0.0000  0.855  0.855  0.855  0.855  0.855  0.855    1    0    0    0       14302      14302      14302      14302  GET /recent/50 HTTP/1.1
    6   4.301  0.7168  0.1868  0.466  0.698  1.084  1.084  1.084  1.084    6    0    0    0       84247      13926      14041      14212  GET /recent/204 HTTP/1.1
    3   1.995  0.6650  0.1005  0.588  0.600  0.807  0.807  0.807  0.807    3    0    0    0       41356      13643      13785      14037  GET /recent/171 HTTP/1.1
    4   2.586  0.6465  0.3739  0.239  0.599  1.253  1.253  1.253  1.253    4    0    0    0       54992      13598      13748      13995  GET /recent/75 HTTP/1.1
    2   1.269  0.6345  0.0185  0.616  0.653  0.653  0.653  0.653  0.653    2    0    0    0       27991      13555      13995      14436  GET /recent/200 HTTP/1.1
    1   0.624  0.6240  0.0000  0.624  0.624  0.624  0.624  0.624  0.624    1    0    0    0       14312      14312      14312      14312  GET /recent/45 HTTP/1.1
    3   1.868  0.6227  0.2234  0.438  0.493  0.937  0.937  0.937  0.937    3    0    0    0       42558      14089      14186      14303  GET /recent/154 HTTP/1.1
    6   3.571  0.5952  0.1543  0.415  0.566  0.919  0.919  0.919  0.919    6    0    0    0       83672      13501      13945      14232  GET /recent/180 HTTP/1.1
    5   2.956  0.5912  0.1813  0.435  0.534  0.944  0.944  0.944  0.944    5    0    0    0       69550      13641      13910      14627  GET /recent/176 HTTP/1.1
    6   3.480  0.5800  0.0317  0.520  0.599  0.612  0.612  0.612  0.612    6    0    0    0       81788      13446      13631      13933  GET /recent/207 HTTP/1.1
    4   2.314  0.5785  0.0773  0.453  0.628  0.654  0.654  0.654  0.654    4    0    0    0       55769      13855      13942      14021  GET /recent/206 HTTP/1.1
    1   0.571  0.5710  0.0000  0.571  0.571  0.571  0.571  0.571  0.571    1    0    0    0       13575      13575      13575      13575  GET /recent/191 HTTP/1.1
    3   1.693  0.5643  0.3450  0.236  0.416  1.041  1.041  1.041  1.041    3    0    0    0       42347      13833      14115      14495  GET /recent/126 HTTP/1.1
    4   2.256  0.5640  0.0732  0.460  0.565  0.667  0.667  0.667  0.667    4    0    0    0       54012      13190      13503      13850  GET /recent/183 HTTP/1.1
    5   2.817  0.5634  0.3332  0.264  0.403  1.167  1.167  1.167  1.167    5    0    0    0       69613      13488      13922      15003  GET /recent/66 HTTP/1.1
    4   2.226  0.5565  0.1362  0.386  0.682  0.698  0.698  0.698  0.698    4    0    0    0       54780      13602      13695      13763  GET /recent/193 HTTP/1.1
    2   1.111  0.5555  0.0025  0.553  0.558  0.558  0.558  0.558  0.558    2    0    0    0       28284      13920      14142      14364  GET /recent/190 HTTP/1.1
    3   1.652  0.5507  0.0595  0.499  0.519  0.634  0.634  0.634  0.634    3    0    0    0       41991      13886      13997      14186  GET /recent/173 HTTP/1.1
    2   1.099  0.5495  0.0515  0.498  0.601  0.601  0.601  0.601  0.601    2    0    0    0       27963      13815      13981      14148  GET /recent/195 HTTP/1.1

Top 20 Sort By Standard Deviation
Count     Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
    7    40.001  5.7144  3.5333  0.051  7.937  8.339  8.339  8.339  8.339     7    0    0    0      100213      13932      14316      15677  GET /recent/1 HTTP/1.1
 2423  1051.217  0.4338  1.2766  0.006  0.220  0.359  0.565  8.477  9.154  2423    0    0    0    37449694      13478      15455      16187  GET / HTTP/1.1
    7     3.314  0.4734  0.5274  0.135  0.266  1.745  1.745  1.745  1.745     7    0    0    0       98383      13699      14054      14437  GET /recent/55 HTTP/1.1
    6     1.956  0.3260  0.3873  0.065  0.178  1.187  1.187  1.187  1.187     6    0    0    0       84880      13727      14146      14952  GET /recent/3 HTTP/1.1
    4     2.586  0.6465  0.3739  0.239  0.599  1.253  1.253  1.253  1.253     4    0    0    0       54992      13598      13748      13995  GET /recent/75 HTTP/1.1
    2     1.082  0.5410  0.3520  0.189  0.893  0.893  0.893  0.893  0.893     2    0    0    0       28237      14118      14118      14119  GET /recent/157 HTTP/1.1
    3     1.693  0.5643  0.3450  0.236  0.416  1.041  1.041  1.041  1.041     3    0    0    0       42347      13833      14115      14495  GET /recent/126 HTTP/1.1
    5     2.817  0.5634  0.3332  0.264  0.403  1.167  1.167  1.167  1.167     5    0    0    0       69613      13488      13922      15003  GET /recent/66 HTTP/1.1
    3     1.465  0.4883  0.3075  0.259  0.283  0.923  0.923  0.923  0.923     3    0    0    0       41691      13430      13897      14762  GET /recent/43 HTTP/1.1
    7     2.780  0.3971  0.2643  0.158  0.256  0.871  0.871  0.871  0.871     7    0    0    0       98116      13511      14016      14423  GET /recent/34 HTTP/1.1
    2     1.021  0.5105  0.2485  0.262  0.759  0.759  0.759  0.759  0.759     2    0    0    0       27846      13501      13923      14345  GET /recent/47 HTTP/1.1
    5     2.483  0.4966  0.2305  0.325  0.359  0.936  0.936  0.936  0.936     5    0    0    0       72970      14456      14594      14889  GET /recent/121 HTTP/1.1
    6     2.025  0.3375  0.2237  0.129  0.304  0.816  0.816  0.816  0.816     6    0    0    0       85759      14082      14293      14688  GET /recent/26 HTTP/1.1
    3     1.868  0.6227  0.2234  0.438  0.493  0.937  0.937  0.937  0.937     3    0    0    0       42558      14089      14186      14303  GET /recent/154 HTTP/1.1
    8     3.083  0.3854  0.2091  0.256  0.332  0.927  0.927  0.927  0.927     8    0    0    0      113966      13788      14245      14751  GET /recent/83 HTTP/1.1
    6     3.186  0.5310  0.2088  0.286  0.517  0.945  0.945  0.945  0.945     6    0    0    0       81596      13331      13599      13849  GET /recent/166 HTTP/1.1
  972   203.731  0.2096  0.2045  0.001  0.167  0.305  0.578  1.322  1.768   972    0    0    0     1296648       1334       1334       1334  GET /signin HTTP/1.1
    4     2.032  0.5080  0.2018  0.353  0.413  0.855  0.855  0.855  0.855     4    0    0    0       56302      13888      14075      14163  GET /recent/132 HTTP/1.1
    4     2.052  0.5130  0.2015  0.351  0.467  0.854  0.854  0.854  0.854     4    0    0    0       55030      13550      13757      14071  GET /recent/101 HTTP/1.1
    2     0.891  0.4455  0.1945  0.251  0.640  0.640  0.640  0.640  0.640     2    0    0    0       28575      14099      14287      14476  GET /recent/104 HTTP/1.1

Top 20 Sort By Maximum(100 Percentile)
Count     Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
 2423  1051.217  0.4338  1.2766  0.006  0.220  0.359  0.565  8.477  9.154  2423    0    0    0    37449694      13478      15455      16187  GET / HTTP/1.1
    7    40.001  5.7144  3.5333  0.051  7.937  8.339  8.339  8.339  8.339     7    0    0    0      100213      13932      14316      15677  GET /recent/1 HTTP/1.1
  972   203.731  0.2096  0.2045  0.001  0.167  0.305  0.578  1.322  1.768   972    0    0    0     1296648       1334       1334       1334  GET /signin HTTP/1.1
    7     3.314  0.4734  0.5274  0.135  0.266  1.745  1.745  1.745  1.745     7    0    0    0       98383      13699      14054      14437  GET /recent/55 HTTP/1.1
    4     2.586  0.6465  0.3739  0.239  0.599  1.253  1.253  1.253  1.253     4    0    0    0       54992      13598      13748      13995  GET /recent/75 HTTP/1.1
    6     1.956  0.3260  0.3873  0.065  0.178  1.187  1.187  1.187  1.187     6    0    0    0       84880      13727      14146      14952  GET /recent/3 HTTP/1.1
    5     2.817  0.5634  0.3332  0.264  0.403  1.167  1.167  1.167  1.167     5    0    0    0       69613      13488      13922      15003  GET /recent/66 HTTP/1.1
 3618   660.497  0.1826  0.1249  0.000  0.167  0.278  0.358  0.770  1.162  3137    0  481    0     8170153         10       2258      58970  get memo
    6     4.301  0.7168  0.1868  0.466  0.698  1.084  1.084  1.084  1.084     6    0    0    0       84247      13926      14041      14212  GET /recent/204 HTTP/1.1
  972   184.338  0.1896  0.1324  0.002  0.170  0.267  0.364  0.834  1.049     0  972    0    0           0          0          0          0  POST /memo HTTP/1.1
  972   206.646  0.2126  0.1594  0.011  0.182  0.304  0.470  0.964  1.047   972    0    0    0    15243756       1920      15682      28610  GET /mypage HTTP/1.1
    3     1.693  0.5643  0.3450  0.236  0.416  1.041  1.041  1.041  1.041     3    0    0    0       42347      13833      14115      14495  GET /recent/126 HTTP/1.1
    6     3.186  0.5310  0.2088  0.286  0.517  0.945  0.945  0.945  0.945     6    0    0    0       81596      13331      13599      13849  GET /recent/166 HTTP/1.1
    5     2.956  0.5912  0.1813  0.435  0.534  0.944  0.944  0.944  0.944     5    0    0    0       69550      13641      13910      14627  GET /recent/176 HTTP/1.1
    3     1.868  0.6227  0.2234  0.438  0.493  0.937  0.937  0.937  0.937     3    0    0    0       42558      14089      14186      14303  GET /recent/154 HTTP/1.1
    5     2.483  0.4966  0.2305  0.325  0.359  0.936  0.936  0.936  0.936     5    0    0    0       72970      14456      14594      14889  GET /recent/121 HTTP/1.1
    8     3.083  0.3854  0.2091  0.256  0.332  0.927  0.927  0.927  0.927     8    0    0    0      113966      13788      14245      14751  GET /recent/83 HTTP/1.1
    3     1.465  0.4883  0.3075  0.259  0.283  0.923  0.923  0.923  0.923     3    0    0    0       41691      13430      13897      14762  GET /recent/43 HTTP/1.1
    6     3.571  0.5952  0.1543  0.415  0.566  0.919  0.919  0.919  0.919     6    0    0    0       83672      13501      13945      14232  GET /recent/180 HTTP/1.1
  972   180.054  0.1852  0.0883  0.002  0.176  0.265  0.308  0.558  0.896     0  972    0    0           0          0          0          0  POST /signin HTTP/1.1

TOP 37 Slow Requests
 1  9.154  GET / HTTP/1.1
 2  9.123  GET / HTTP/1.1
 3  9.110  GET / HTTP/1.1
 4  9.105  GET / HTTP/1.1
 5  9.093  GET / HTTP/1.1
 6  9.047  GET / HTTP/1.1
 7  8.959  GET / HTTP/1.1
 8  8.942  GET / HTTP/1.1
 9  8.931  GET / HTTP/1.1
10  8.911  GET / HTTP/1.1
11  8.874  GET / HTTP/1.1
12  8.828  GET / HTTP/1.1
13  8.822  GET / HTTP/1.1
14  8.785  GET / HTTP/1.1
15  8.745  GET / HTTP/1.1
16  8.735  GET / HTTP/1.1
17  8.704  GET / HTTP/1.1
18  8.681  GET / HTTP/1.1
19  8.665  GET / HTTP/1.1
20  8.657  GET / HTTP/1.1
21  8.625  GET / HTTP/1.1
22  8.542  GET / HTTP/1.1
23  8.505  GET / HTTP/1.1
24  8.499  GET / HTTP/1.1
25  8.477  GET / HTTP/1.1
26  8.473  GET / HTTP/1.1
27  8.438  GET / HTTP/1.1
28  8.420  GET / HTTP/1.1
29  8.388  GET / HTTP/1.1
30  8.367  GET / HTTP/1.1
31  8.339  GET /recent/1 HTTP/1.1
32  8.298  GET / HTTP/1.1
33  8.260  GET / HTTP/1.1
34  8.252  GET / HTTP/1.1
35  8.234  GET / HTTP/1.1
36  8.194  GET / HTTP/1.1
37  8.153  GET / HTTP/1.1

slow query loig

Count: 62  Time=1.26s (78s)  Lock=0.00s (0s)  Rows=100.0 (6200), isucon[isucon]@localhost
  SELECT memos.*, users.username FROM memos USE INDEX (memos_idx_is_private_created_at) JOIN users ON memos.user = users.id WHERE is_private=N ORDER BY created_at DESC, memos.id DESC LIMIT N

Count: 10  Time=0.41s (4s)  Lock=0.00s (0s)  Rows=73.6 (736), isucon[isucon]@localhost
  SELECT id, content, is_private, created_at, updated_at FROM memos WHERE user=N AND is_private=N ORDER BY created_at

Count: 455  Time=0.25s (113s)  Lock=0.00s (0s)  Rows=100.0 (45500), isucon[isucon]@localhost
  SELECT memos.*, users.username FROM memos USE INDEX (memos_idx_is_private_created_at) JOIN users ON memos.user = users.id WHERE is_private=N ORDER BY created_at DESC, id DESC LIMIT N OFFSET N

Count: 57  Time=0.13s (7s)  Lock=0.00s (0s)  Rows=107.1 (6104), isucon[isucon]@localhost
  SELECT id, content, is_private, created_at, updated_at FROM memos WHERE user=N ORDER BY created_at DESC

Count: 94  Time=0.12s (11s)  Lock=0.00s (0s)  Rows=127.3 (11968), isucon[isucon]@localhost
  SELECT id, content, is_private, created_at, updated_at FROM memos WHERE user=N  ORDER BY created_at

Count: 2  Time=0.10s (0s)  Lock=0.00s (0s)  Rows=1.0 (2), isucon[isucon]@localhost
  SELECT count(*) AS c FROM memos WHERE is_private=N

Count: 1  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=0.0 (0), 0users@0hosts
okashoi commented 4 years ago

workload = 5

Result:   SUCCESS 
RawScore: 8209.0
Fails:    0
Score:    8209.0

Flame Graph

http://52.199.202.14/torch-20200802091456.svg

Kataribe

Top 20 Sort By Count
Count     Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
 3847    38.085  0.0099  0.0129  0.000  0.004  0.027  0.036  0.060  0.090  3847    0    0    0   358182629      93107      93107      93107  GET /js/jquery.min.js HTTP/1.1
 3847    38.516  0.0100  0.0126  0.000  0.005  0.027  0.036  0.057  0.087  3847    0    0    0   407839705     106015     106015     106015  GET /css/bootstrap.min.css HTTP/1.1
 3847    40.374  0.0105  0.0135  0.000  0.005  0.029  0.038  0.060  0.103  3847    0    0    0    64818103      16849      16849      16849  GET /css/bootstrap-responsive.min.css HTTP/1.1
 3847    37.136  0.0097  0.0124  0.000  0.004  0.026  0.035  0.053  0.108  3847    0    0    0   110143457      28631      28631      28631  GET /js/bootstrap.min.js HTTP/1.1
 3638   673.113  0.1850  0.1392  0.000  0.168  0.285  0.393  0.837  1.132  3176    0  462    0     8237825         10       2264      58971  get memo
 2455  1065.195  0.4339  1.2623  0.006  0.225  0.356  0.597  8.361  9.006  2455    0    0    0    37444525       4007      15252      15983  GET / HTTP/1.1
  976   168.868  0.1730  0.0870  0.013  0.165  0.268  0.300  0.353  0.915     0  976    0    0           0          0          0          0  POST /signin HTTP/1.1
  976   169.693  0.1739  0.1400  0.002  0.149  0.268  0.369  0.843  0.989     0  976    0    0           0          0          0          0  POST /memo HTTP/1.1
  976    15.054  0.0154  0.0150  0.000  0.011  0.036  0.047  0.068  0.083     0  976    0    0           0          0          0          0  POST /signout HTTP/1.1
  976   198.458  0.2033  0.1925  0.001  0.170  0.283  0.572  1.205  1.521   976    0    0    0     1301984       1334       1334       1334  GET /signin HTTP/1.1
  976   205.295  0.2103  0.1576  0.007  0.179  0.313  0.455  0.989  1.134   976    0    0    0    14888820       1920      15254      28973  GET /mypage HTTP/1.1
   13     8.654  0.6657  0.1182  0.430  0.693  0.797  0.808  0.808  0.808    13    0    0    0      179568      13200      13812      14086  GET /recent/205 HTTP/1.1
   11     5.684  0.5167  0.1401  0.282  0.489  0.702  0.719  0.719  0.719    11    0    0    0      151439      13565      13767      14041  GET /recent/206 HTTP/1.1
   10    38.388  3.8388  3.7219  0.074  7.504  7.695  7.695  7.695  7.695    10    0    0    0      147605      14109      14760      15524  GET /recent/1 HTTP/1.1
    8     4.122  0.5152  0.0508  0.437  0.509  0.591  0.591  0.591  0.591     8    0    0    0      112306      13666      14038      14473  GET /recent/202 HTTP/1.1
    8     4.526  0.5657  0.1261  0.377  0.628  0.726  0.726  0.726  0.726     8    0    0    0      110117      13403      13764      14143  GET /recent/198 HTTP/1.1
    8     2.223  0.2779  0.2816  0.065  0.182  1.002  1.002  1.002  1.002     8    0    0    0      113303      13726      14162      15000  GET /recent/5 HTTP/1.1
    8     2.298  0.2873  0.1370  0.161  0.296  0.604  0.604  0.604  0.604     8    0    0    0      112048      13354      14006      14926  GET /recent/41 HTTP/1.1
    7     2.523  0.3604  0.0302  0.304  0.372  0.406  0.406  0.406  0.406     7    0    0    0      100874      14008      14410      14728  GET /recent/107 HTTP/1.1
    7     3.603  0.5147  0.1035  0.317  0.536  0.641  0.641  0.641  0.641     7    0    0    0       98302      13915      14043      14291  GET /recent/137 HTTP/1.1

Top 20 Sort By Total
Count     Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
 2455  1065.195  0.4339  1.2623  0.006  0.225  0.356  0.597  8.361  9.006  2455    0    0    0    37444525       4007      15252      15983  GET / HTTP/1.1
 3638   673.113  0.1850  0.1392  0.000  0.168  0.285  0.393  0.837  1.132  3176    0  462    0     8237825         10       2264      58971  get memo
  976   205.295  0.2103  0.1576  0.007  0.179  0.313  0.455  0.989  1.134   976    0    0    0    14888820       1920      15254      28973  GET /mypage HTTP/1.1
  976   198.458  0.2033  0.1925  0.001  0.170  0.283  0.572  1.205  1.521   976    0    0    0     1301984       1334       1334       1334  GET /signin HTTP/1.1
  976   169.693  0.1739  0.1400  0.002  0.149  0.268  0.369  0.843  0.989     0  976    0    0           0          0          0          0  POST /memo HTTP/1.1
  976   168.868  0.1730  0.0870  0.013  0.165  0.268  0.300  0.353  0.915     0  976    0    0           0          0          0          0  POST /signin HTTP/1.1
 3847    40.374  0.0105  0.0135  0.000  0.005  0.029  0.038  0.060  0.103  3847    0    0    0    64818103      16849      16849      16849  GET /css/bootstrap-responsive.min.css HTTP/1.1
 3847    38.516  0.0100  0.0126  0.000  0.005  0.027  0.036  0.057  0.087  3847    0    0    0   407839705     106015     106015     106015  GET /css/bootstrap.min.css HTTP/1.1
   10    38.388  3.8388  3.7219  0.074  7.504  7.695  7.695  7.695  7.695    10    0    0    0      147605      14109      14760      15524  GET /recent/1 HTTP/1.1
 3847    38.085  0.0099  0.0129  0.000  0.004  0.027  0.036  0.060  0.090  3847    0    0    0   358182629      93107      93107      93107  GET /js/jquery.min.js HTTP/1.1
 3847    37.136  0.0097  0.0124  0.000  0.004  0.026  0.035  0.053  0.108  3847    0    0    0   110143457      28631      28631      28631  GET /js/bootstrap.min.js HTTP/1.1
  976    15.054  0.0154  0.0150  0.000  0.011  0.036  0.047  0.068  0.083     0  976    0    0           0          0          0          0  POST /signout HTTP/1.1
   13     8.654  0.6657  0.1182  0.430  0.693  0.797  0.808  0.808  0.808    13    0    0    0      179568      13200      13812      14086  GET /recent/205 HTTP/1.1
   11     5.684  0.5167  0.1401  0.282  0.489  0.702  0.719  0.719  0.719    11    0    0    0      151439      13565      13767      14041  GET /recent/206 HTTP/1.1
    8     4.526  0.5657  0.1261  0.377  0.628  0.726  0.726  0.726  0.726     8    0    0    0      110117      13403      13764      14143  GET /recent/198 HTTP/1.1
    8     4.122  0.5152  0.0508  0.437  0.509  0.591  0.591  0.591  0.591     8    0    0    0      112306      13666      14038      14473  GET /recent/202 HTTP/1.1
    6     4.017  0.6695  0.3109  0.271  0.658  1.267  1.267  1.267  1.267     6    0    0    0       81447      13302      13574      13857  GET /recent/192 HTTP/1.1
    6     3.926  0.6543  0.0898  0.473  0.680  0.738  0.738  0.738  0.738     6    0    0    0       82708      13448      13784      14056  GET /recent/207 HTTP/1.1
    7     3.882  0.5546  0.0534  0.450  0.566  0.605  0.605  0.605  0.605     7    0    0    0       96235      13312      13747      13963  GET /recent/208 HTTP/1.1
    7     3.603  0.5147  0.1035  0.317  0.536  0.641  0.641  0.641  0.641     7    0    0    0       98302      13915      14043      14291  GET /recent/137 HTTP/1.1

Top 20 Sort By Mean
Count   Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max  2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
   10  38.388  3.8388  3.7219  0.074  7.504  7.695  7.695  7.695  7.695   10    0    0    0      147605      14109      14760      15524  GET /recent/1 HTTP/1.1
    3   2.860  0.9533  0.7560  0.392  0.446  2.022  2.022  2.022  2.022    3    0    0    0       42366      13778      14122      14352  GET /recent/194 HTTP/1.1
    4   3.443  0.8608  0.5467  0.511  0.613  1.805  1.805  1.805  1.805    4    0    0    0       57079      14190      14269      14370  GET /recent/150 HTTP/1.1
    4   3.016  0.7540  0.5918  0.352  0.451  1.777  1.777  1.777  1.777    4    0    0    0       56702      13887      14175      14397  GET /recent/122 HTTP/1.1
    3   2.156  0.7187  0.2031  0.556  0.595  1.005  1.005  1.005  1.005    3    0    0    0       42079      13784      14026      14289  GET /recent/200 HTTP/1.1
    6   4.017  0.6695  0.3109  0.271  0.658  1.267  1.267  1.267  1.267    6    0    0    0       81447      13302      13574      13857  GET /recent/192 HTTP/1.1
   13   8.654  0.6657  0.1182  0.430  0.693  0.797  0.808  0.808  0.808   13    0    0    0      179568      13200      13812      14086  GET /recent/205 HTTP/1.1
    3   1.982  0.6607  0.6012  0.145  0.333  1.504  1.504  1.504  1.504    3    0    0    0       41609      13544      13869      14420  GET /recent/69 HTTP/1.1
    6   3.926  0.6543  0.0898  0.473  0.680  0.738  0.738  0.738  0.738    6    0    0    0       82708      13448      13784      14056  GET /recent/207 HTTP/1.1
    2   1.287  0.6435  0.1045  0.539  0.748  0.748  0.748  0.748  0.748    2    0    0    0       27682      13786      13841      13896  GET /recent/172 HTTP/1.1
    2   1.254  0.6270  0.0160  0.611  0.643  0.643  0.643  0.643  0.643    2    0    0    0       26892      13442      13446      13450  GET /recent/179 HTTP/1.1
    4   2.448  0.6120  0.2803  0.346  0.527  1.083  1.083  1.083  1.083    4    0    0    0       55887      13659      13971      14287  GET /recent/190 HTTP/1.1
    4   2.395  0.5988  0.5803  0.234  0.323  1.602  1.602  1.602  1.602    4    0    0    0       57122      13775      14280      14559  GET /recent/26 HTTP/1.1
    2   1.179  0.5895  0.0365  0.553  0.626  0.626  0.626  0.626  0.626    2    0    0    0       27565      13149      13782      14416  GET /recent/186 HTTP/1.1
    3   1.763  0.5877  0.2456  0.392  0.437  0.934  0.934  0.934  0.934    3    0    0    0       42712      13993      14237      14365  GET /recent/171 HTTP/1.1
    1   0.580  0.5800  0.0000  0.580  0.580  0.580  0.580  0.580  0.580    1    0    0    0       14257      14257      14257      14257  GET /recent/197 HTTP/1.1
    1   0.578  0.5780  0.0000  0.578  0.578  0.578  0.578  0.578  0.578    1    0    0    0       14210      14210      14210      14210  GET /recent/189 HTTP/1.1
    2   1.133  0.5665  0.1475  0.419  0.714  0.714  0.714  0.714  0.714    2    0    0    0       27461      13690      13730      13771  GET /recent/173 HTTP/1.1
    8   4.526  0.5657  0.1261  0.377  0.628  0.726  0.726  0.726  0.726    8    0    0    0      110117      13403      13764      14143  GET /recent/198 HTTP/1.1
    3   1.680  0.5600  0.0963  0.486  0.498  0.696  0.696  0.696  0.696    3    0    0    0       41539      13721      13846      13983  GET /recent/178 HTTP/1.1

Top 20 Sort By Standard Deviation
Count     Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
   10    38.388  3.8388  3.7219  0.074  7.504  7.695  7.695  7.695  7.695    10    0    0    0      147605      14109      14760      15524  GET /recent/1 HTTP/1.1
 2455  1065.195  0.4339  1.2623  0.006  0.225  0.356  0.597  8.361  9.006  2455    0    0    0    37444525       4007      15252      15983  GET / HTTP/1.1
    3     2.860  0.9533  0.7560  0.392  0.446  2.022  2.022  2.022  2.022     3    0    0    0       42366      13778      14122      14352  GET /recent/194 HTTP/1.1
    3     1.982  0.6607  0.6012  0.145  0.333  1.504  1.504  1.504  1.504     3    0    0    0       41609      13544      13869      14420  GET /recent/69 HTTP/1.1
    4     3.016  0.7540  0.5918  0.352  0.451  1.777  1.777  1.777  1.777     4    0    0    0       56702      13887      14175      14397  GET /recent/122 HTTP/1.1
    4     2.395  0.5988  0.5803  0.234  0.323  1.602  1.602  1.602  1.602     4    0    0    0       57122      13775      14280      14559  GET /recent/26 HTTP/1.1
    4     3.443  0.8608  0.5467  0.511  0.613  1.805  1.805  1.805  1.805     4    0    0    0       57079      14190      14269      14370  GET /recent/150 HTTP/1.1
    5     2.297  0.4594  0.3698  0.166  0.289  1.152  1.152  1.152  1.152     5    0    0    0       70963      13372      14192      14791  GET /recent/43 HTTP/1.1
    6     4.017  0.6695  0.3109  0.271  0.658  1.267  1.267  1.267  1.267     6    0    0    0       81447      13302      13574      13857  GET /recent/192 HTTP/1.1
    5     2.465  0.4930  0.2925  0.222  0.395  1.062  1.062  1.062  1.062     5    0    0    0       68926      13519      13785      14288  GET /recent/102 HTTP/1.1
    8     2.223  0.2779  0.2816  0.065  0.182  1.002  1.002  1.002  1.002     8    0    0    0      113303      13726      14162      15000  GET /recent/5 HTTP/1.1
    4     2.448  0.6120  0.2803  0.346  0.527  1.083  1.083  1.083  1.083     4    0    0    0       55887      13659      13971      14287  GET /recent/190 HTTP/1.1
    5     2.444  0.4888  0.2654  0.222  0.355  0.838  0.838  0.838  0.838     5    0    0    0       69698      13676      13939      14084  GET /recent/54 HTTP/1.1
    5     2.734  0.5468  0.2480  0.244  0.509  0.996  0.996  0.996  0.996     5    0    0    0       69245      13524      13849      14092  GET /recent/164 HTTP/1.1
    3     1.763  0.5877  0.2456  0.392  0.437  0.934  0.934  0.934  0.934     3    0    0    0       42712      13993      14237      14365  GET /recent/171 HTTP/1.1
    7     2.523  0.3604  0.2453  0.125  0.245  0.781  0.781  0.781  0.781     7    0    0    0       99564      14011      14223      14708  GET /recent/24 HTTP/1.1
    4     1.991  0.4978  0.2415  0.120  0.632  0.766  0.766  0.766  0.766     4    0    0    0       56413      13879      14103      14356  GET /recent/187 HTTP/1.1
    2     0.764  0.3820  0.2200  0.162  0.602  0.602  0.602  0.602  0.602     2    0    0    0       28164      13356      14082      14808  GET /recent/58 HTTP/1.1
    3     1.401  0.4670  0.2106  0.274  0.367  0.760  0.760  0.760  0.760     3    0    0    0       41352      13688      13784      13885  GET /recent/68 HTTP/1.1
    4     2.075  0.5188  0.2068  0.355  0.441  0.873  0.873  0.873  0.873     4    0    0    0       57716      14207      14429      14894  GET /recent/141 HTTP/1.1

Top 20 Sort By Maximum(100 Percentile)
Count     Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
 2455  1065.195  0.4339  1.2623  0.006  0.225  0.356  0.597  8.361  9.006  2455    0    0    0    37444525       4007      15252      15983  GET / HTTP/1.1
   10    38.388  3.8388  3.7219  0.074  7.504  7.695  7.695  7.695  7.695    10    0    0    0      147605      14109      14760      15524  GET /recent/1 HTTP/1.1
    3     2.860  0.9533  0.7560  0.392  0.446  2.022  2.022  2.022  2.022     3    0    0    0       42366      13778      14122      14352  GET /recent/194 HTTP/1.1
    4     3.443  0.8608  0.5467  0.511  0.613  1.805  1.805  1.805  1.805     4    0    0    0       57079      14190      14269      14370  GET /recent/150 HTTP/1.1
    4     3.016  0.7540  0.5918  0.352  0.451  1.777  1.777  1.777  1.777     4    0    0    0       56702      13887      14175      14397  GET /recent/122 HTTP/1.1
    4     2.395  0.5988  0.5803  0.234  0.323  1.602  1.602  1.602  1.602     4    0    0    0       57122      13775      14280      14559  GET /recent/26 HTTP/1.1
  976   198.458  0.2033  0.1925  0.001  0.170  0.283  0.572  1.205  1.521   976    0    0    0     1301984       1334       1334       1334  GET /signin HTTP/1.1
    3     1.982  0.6607  0.6012  0.145  0.333  1.504  1.504  1.504  1.504     3    0    0    0       41609      13544      13869      14420  GET /recent/69 HTTP/1.1
    6     4.017  0.6695  0.3109  0.271  0.658  1.267  1.267  1.267  1.267     6    0    0    0       81447      13302      13574      13857  GET /recent/192 HTTP/1.1
    5     2.297  0.4594  0.3698  0.166  0.289  1.152  1.152  1.152  1.152     5    0    0    0       70963      13372      14192      14791  GET /recent/43 HTTP/1.1
  976   205.295  0.2103  0.1576  0.007  0.179  0.313  0.455  0.989  1.134   976    0    0    0    14888820       1920      15254      28973  GET /mypage HTTP/1.1
 3638   673.113  0.1850  0.1392  0.000  0.168  0.285  0.393  0.837  1.132  3176    0  462    0     8237825         10       2264      58971  get memo
    4     2.448  0.6120  0.2803  0.346  0.527  1.083  1.083  1.083  1.083     4    0    0    0       55887      13659      13971      14287  GET /recent/190 HTTP/1.1
    5     2.465  0.4930  0.2925  0.222  0.395  1.062  1.062  1.062  1.062     5    0    0    0       68926      13519      13785      14288  GET /recent/102 HTTP/1.1
    3     2.156  0.7187  0.2031  0.556  0.595  1.005  1.005  1.005  1.005     3    0    0    0       42079      13784      14026      14289  GET /recent/200 HTTP/1.1
    8     2.223  0.2779  0.2816  0.065  0.182  1.002  1.002  1.002  1.002     8    0    0    0      113303      13726      14162      15000  GET /recent/5 HTTP/1.1
    5     2.734  0.5468  0.2480  0.244  0.509  0.996  0.996  0.996  0.996     5    0    0    0       69245      13524      13849      14092  GET /recent/164 HTTP/1.1
  976   169.693  0.1739  0.1400  0.002  0.149  0.268  0.369  0.843  0.989     0  976    0    0           0          0          0          0  POST /memo HTTP/1.1
    3     1.763  0.5877  0.2456  0.392  0.437  0.934  0.934  0.934  0.934     3    0    0    0       42712      13993      14237      14365  GET /recent/171 HTTP/1.1
  976   168.868  0.1730  0.0870  0.013  0.165  0.268  0.300  0.353  0.915     0  976    0    0           0          0          0          0  POST /signin HTTP/1.1

TOP 37 Slow Requests
 1  9.006  GET / HTTP/1.1
 2  9.003  GET / HTTP/1.1
 3  8.902  GET / HTTP/1.1
 4  8.901  GET / HTTP/1.1
 5  8.887  GET / HTTP/1.1
 6  8.846  GET / HTTP/1.1
 7  8.845  GET / HTTP/1.1
 8  8.836  GET / HTTP/1.1
 9  8.828  GET / HTTP/1.1
10  8.723  GET / HTTP/1.1
11  8.722  GET / HTTP/1.1
12  8.718  GET / HTTP/1.1
13  8.708  GET / HTTP/1.1
14  8.658  GET / HTTP/1.1
15  8.655  GET / HTTP/1.1
16  8.637  GET / HTTP/1.1
17  8.632  GET / HTTP/1.1
18  8.608  GET / HTTP/1.1
19  8.600  GET / HTTP/1.1
20  8.564  GET / HTTP/1.1
21  8.523  GET / HTTP/1.1
22  8.507  GET / HTTP/1.1
23  8.469  GET / HTTP/1.1
24  8.402  GET / HTTP/1.1
25  8.361  GET / HTTP/1.1
26  8.354  GET / HTTP/1.1
27  8.349  GET / HTTP/1.1
28  8.342  GET / HTTP/1.1
29  8.342  GET / HTTP/1.1
30  8.337  GET / HTTP/1.1
31  8.304  GET / HTTP/1.1
32  8.300  GET / HTTP/1.1
33  8.266  GET / HTTP/1.1
34  8.175  GET / HTTP/1.1
35  8.137  GET / HTTP/1.1
36  8.086  GET / HTTP/1.1
37  8.083  GET / HTTP/1.1

slow query log

Count: 62  Time=1.11s (69s)  Lock=0.00s (0s)  Rows=100.0 (6200), isucon[isucon]@localhost
  SELECT memos.*, users.username FROM memos USE INDEX (memos_idx_is_private_created_at) JOIN users ON memos.user = users.id WHERE is_private=N ORDER BY created_at DESC, memos.id DESC LIMIT N

Count: 16  Time=0.40s (6s)  Lock=0.00s (0s)  Rows=75.2 (1203), isucon[isucon]@localhost
  SELECT id, content, is_private, created_at, updated_at FROM memos WHERE user=N AND is_private=N ORDER BY created_at

Count: 474  Time=0.28s (132s)  Lock=0.00s (0s)  Rows=100.0 (47400), isucon[isucon]@localhost
  SELECT memos.*, users.username FROM memos USE INDEX (memos_idx_is_private_created_at) JOIN users ON memos.user = users.id WHERE is_private=N ORDER BY created_at DESC, id DESC LIMIT N OFFSET N

Count: 109  Time=0.14s (15s)  Lock=0.00s (0s)  Rows=132.0 (14390), isucon[isucon]@localhost
  SELECT id, content, is_private, created_at, updated_at FROM memos WHERE user=N  ORDER BY created_at

Count: 58  Time=0.14s (7s)  Lock=0.00s (0s)  Rows=108.9 (6315), isucon[isucon]@localhost
  SELECT id, content, is_private, created_at, updated_at FROM memos WHERE user=N ORDER BY created_at DESC

Count: 1  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=0.0 (0), 0users@0hosts
okashoi commented 4 years ago

workload = 5

Result:   SUCCESS 
RawScore: 7686.5
Fails:    0
Score:    7686.5

workload = 7

Result:   SUCCESS 
RawScore: 7293.8
Fails:    12
Score:    1385.8

Kataribe

Top 20 Sort By Count
Count    Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
 3622   32.261  0.0089  0.0116  0.000  0.004  0.024  0.031  0.052  0.106  3622    0    0    0   103701482      28631      28631      28631  GET /js/bootstrap.min.js HTTP/1.1
 3622   34.259  0.0095  0.0115  0.000  0.005  0.025  0.032  0.050  0.096  3622    0    0    0   383986330     106015     106015     106015  GET /css/bootstrap.min.css HTTP/1.1
 3622   34.543  0.0095  0.0115  0.000  0.005  0.025  0.032  0.052  0.108  3622    0    0    0    61027078      16849      16849      16849  GET /css/bootstrap-responsive.min.css HTTP/1.1
 3622   33.830  0.0093  0.0113  0.000  0.005  0.025  0.033  0.048  0.083  3622    0    0    0   337233554      93107      93107      93107  GET /js/jquery.min.js HTTP/1.1
 3573  756.087  0.2116  0.1918  0.000  0.184  0.322  0.419  1.260  1.571  3114    0  459    0     8007326         10       2241      58970  get memo
 2403  807.453  0.3360  0.5663  0.005  0.244  0.410  0.713  4.216  5.414  2403    0    0    0    36975642      13478      15387      16096  GET / HTTP/1.1
  955  181.002  0.1895  0.1243  0.004  0.180  0.293  0.345  0.739  1.124     0  955    0    0           0          0          0          0  POST /memo HTTP/1.1
  955  193.358  0.2025  0.1469  0.007  0.185  0.297  0.350  0.993  1.120     0  955    0    0           0          0          0          0  POST /signin HTTP/1.1
  955  217.304  0.2275  0.1627  0.007  0.201  0.364  0.541  0.924  1.066   955    0    0    0    14832408       1920      15531      28676  GET /mypage HTTP/1.1
  955   11.674  0.0122  0.0118  0.000  0.009  0.029  0.035  0.050  0.071     0  955    0    0           0          0          0          0  POST /signout HTTP/1.1
  955  291.995  0.3058  0.5347  0.001  0.197  0.347  1.057  3.846  4.157   955    0    0    0     1273970       1334       1334       1334  GET /signin HTTP/1.1
    9    7.550  0.8389  0.3606  0.091  0.918  1.223  1.223  1.223  1.223     9    0    0    0      125002      13523      13889      14251  GET /recent/204 HTTP/1.1
    7    7.758  1.1083  0.3954  0.186  1.270  1.424  1.424  1.424  1.424     7    0    0    0       95842      13172      13691      14019  GET /recent/205 HTTP/1.1
    7    2.814  0.4020  0.3556  0.050  0.185  0.848  0.848  0.848  0.848     7    0    0    0      101310      14287      14472      14667  GET /recent/124 HTTP/1.1
    6   21.467  3.5778  1.7636  0.061  4.924  4.957  4.957  4.957  4.957     6    0    0    0       84571      13951      14095      14131  GET /recent/1 HTTP/1.1
    6    3.565  0.5942  0.4450  0.063  0.811  1.160  1.160  1.160  1.160     6    0    0    0       84520      13911      14086      14222  GET /recent/104 HTTP/1.1
    6    6.084  1.0140  0.1566  0.677  1.081  1.145  1.145  1.145  1.145     6    0    0    0       83027      13430      13837      14063  GET /recent/207 HTTP/1.1
    5    5.933  1.1866  0.1331  0.968  1.189  1.327  1.327  1.327  1.327     5    0    0    0       68849      13175      13769      14011  GET /recent/208 HTTP/1.1
    5    3.271  0.6542  0.4594  0.097  0.856  1.228  1.228  1.228  1.228     5    0    0    0       71488      13786      14297      14735  GET /recent/97 HTTP/1.1
    5    5.287  1.0574  0.1205  0.934  0.985  1.257  1.257  1.257  1.257     5    0    0    0       69594      13644      13918      14120  GET /recent/203 HTTP/1.1

Top 20 Sort By Total
Count    Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
 2403  807.453  0.3360  0.5663  0.005  0.244  0.410  0.713  4.216  5.414  2403    0    0    0    36975642      13478      15387      16096  GET / HTTP/1.1
 3573  756.087  0.2116  0.1918  0.000  0.184  0.322  0.419  1.260  1.571  3114    0  459    0     8007326         10       2241      58970  get memo
  955  291.995  0.3058  0.5347  0.001  0.197  0.347  1.057  3.846  4.157   955    0    0    0     1273970       1334       1334       1334  GET /signin HTTP/1.1
  955  217.304  0.2275  0.1627  0.007  0.201  0.364  0.541  0.924  1.066   955    0    0    0    14832408       1920      15531      28676  GET /mypage HTTP/1.1
  955  193.358  0.2025  0.1469  0.007  0.185  0.297  0.350  0.993  1.120     0  955    0    0           0          0          0          0  POST /signin HTTP/1.1
  955  181.002  0.1895  0.1243  0.004  0.180  0.293  0.345  0.739  1.124     0  955    0    0           0          0          0          0  POST /memo HTTP/1.1
 3622   34.543  0.0095  0.0115  0.000  0.005  0.025  0.032  0.052  0.108  3622    0    0    0    61027078      16849      16849      16849  GET /css/bootstrap-responsive.min.css HTTP/1.1
 3622   34.259  0.0095  0.0115  0.000  0.005  0.025  0.032  0.050  0.096  3622    0    0    0   383986330     106015     106015     106015  GET /css/bootstrap.min.css HTTP/1.1
 3622   33.830  0.0093  0.0113  0.000  0.005  0.025  0.033  0.048  0.083  3622    0    0    0   337233554      93107      93107      93107  GET /js/jquery.min.js HTTP/1.1
 3622   32.261  0.0089  0.0116  0.000  0.004  0.024  0.031  0.052  0.106  3622    0    0    0   103701482      28631      28631      28631  GET /js/bootstrap.min.js HTTP/1.1
    6   21.467  3.5778  1.7636  0.061  4.924  4.957  4.957  4.957  4.957     6    0    0    0       84571      13951      14095      14131  GET /recent/1 HTTP/1.1
  955   11.674  0.0122  0.0118  0.000  0.009  0.029  0.035  0.050  0.071     0  955    0    0           0          0          0          0  POST /signout HTTP/1.1
    7    7.758  1.1083  0.3954  0.186  1.270  1.424  1.424  1.424  1.424     7    0    0    0       95842      13172      13691      14019  GET /recent/205 HTTP/1.1
    9    7.550  0.8389  0.3606  0.091  0.918  1.223  1.223  1.223  1.223     9    0    0    0      125002      13523      13889      14251  GET /recent/204 HTTP/1.1
    6    6.084  1.0140  0.1566  0.677  1.081  1.145  1.145  1.145  1.145     6    0    0    0       83027      13430      13837      14063  GET /recent/207 HTTP/1.1
    5    5.933  1.1866  0.1331  0.968  1.189  1.327  1.327  1.327  1.327     5    0    0    0       68849      13175      13769      14011  GET /recent/208 HTTP/1.1
    5    5.287  1.0574  0.1205  0.934  0.985  1.257  1.257  1.257  1.257     5    0    0    0       69594      13644      13918      14120  GET /recent/203 HTTP/1.1
    5    4.824  0.9648  0.1734  0.728  0.995  1.225  1.225  1.225  1.225     5    0    0    0       69595      13359      13919      14556  GET /recent/190 HTTP/1.1
    4    4.641  1.1603  0.1252  0.975  1.238  1.305  1.305  1.305  1.305     4    0    0    0       55026      13300      13756      13918  GET /recent/206 HTTP/1.1
    4    4.614  1.1535  0.0837  1.037  1.229  1.237  1.237  1.237  1.237     4    0    0    0       56612      14030      14153      14284  GET /recent/56 HTTP/1.1

Top 20 Sort By Mean
Count   Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max  2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
    6  21.467  3.5778  1.7636  0.061  4.924  4.957  4.957  4.957  4.957    6    0    0    0       84571      13951      14095      14131  GET /recent/1 HTTP/1.1
    2   3.282  1.6410  0.6390  1.002  2.280  2.280  2.280  2.280  2.280    2    0    0    0       28562      13871      14281      14691  GET /recent/135 HTTP/1.1
    1   1.381  1.3810  0.0000  1.381  1.381  1.381  1.381  1.381  1.381    1    0    0    0       14003      14003      14003      14003  GET /recent/152 HTTP/1.1
    1   1.358  1.3580  0.0000  1.358  1.358  1.358  1.358  1.358  1.358    1    0    0    0       14492      14492      14492      14492  GET /recent/189 HTTP/1.1
    1   1.354  1.3540  0.0000  1.354  1.354  1.354  1.354  1.354  1.354    1    0    0    0       13843      13843      13843      13843  GET /recent/194 HTTP/1.1
    1   1.336  1.3360  0.0000  1.336  1.336  1.336  1.336  1.336  1.336    1    0    0    0       14064      14064      14064      14064  GET /recent/105 HTTP/1.1
    1   1.308  1.3080  0.0000  1.308  1.308  1.308  1.308  1.308  1.308    1    0    0    0       13380      13380      13380      13380  GET /recent/68 HTTP/1.1
    2   2.587  1.2935  0.0135  1.280  1.307  1.307  1.307  1.307  1.307    2    0    0    0       27682      13836      13841      13846  GET /recent/180 HTTP/1.1
    1   1.284  1.2840  0.0000  1.284  1.284  1.284  1.284  1.284  1.284    1    0    0    0       14189      14189      14189      14189  GET /recent/139 HTTP/1.1
    1   1.235  1.2350  0.0000  1.235  1.235  1.235  1.235  1.235  1.235    1    0    0    0       14323      14323      14323      14323  GET /recent/191 HTTP/1.1
    3   3.620  1.2067  0.0752  1.150  1.157  1.313  1.313  1.313  1.313    3    0    0    0       43076      14178      14358      14688  GET /recent/60 HTTP/1.1
    1   1.196  1.1960  0.0000  1.196  1.196  1.196  1.196  1.196  1.196    1    0    0    0       13446      13446      13446      13446  GET /recent/66 HTTP/1.1
    1   1.194  1.1940  0.0000  1.194  1.194  1.194  1.194  1.194  1.194    1    0    0    0       13906      13906      13906      13906  GET /recent/121 HTTP/1.1
    1   1.191  1.1910  0.0000  1.191  1.191  1.191  1.191  1.191  1.191    1    0    0    0       14143      14143      14143      14143  GET /recent/72 HTTP/1.1
    5   5.933  1.1866  0.1331  0.968  1.189  1.327  1.327  1.327  1.327    5    0    0    0       68849      13175      13769      14011  GET /recent/208 HTTP/1.1
    2   2.360  1.1800  0.0550  1.125  1.235  1.235  1.235  1.235  1.235    2    0    0    0       28327      14054      14163      14273  GET /recent/157 HTTP/1.1
    1   1.168  1.1680  0.0000  1.168  1.168  1.168  1.168  1.168  1.168    1    0    0    0       14132      14132      14132      14132  GET /recent/170 HTTP/1.1
    2   2.335  1.1675  0.1135  1.054  1.281  1.281  1.281  1.281  1.281    2    0    0    0       29048      14458      14524      14590  GET /recent/175 HTTP/1.1
    2   2.331  1.1655  0.1775  0.988  1.343  1.343  1.343  1.343  1.343    2    0    0    0       27975      13718      13987      14257  GET /recent/95 HTTP/1.1
    4   4.641  1.1603  0.1252  0.975  1.238  1.305  1.305  1.305  1.305    4    0    0    0       55026      13300      13756      13918  GET /recent/206 HTTP/1.1

Top 20 Sort By Standard Deviation
Count    Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
    6   21.467  3.5778  1.7636  0.061  4.924  4.957  4.957  4.957  4.957     6    0    0    0       84571      13951      14095      14131  GET /recent/1 HTTP/1.1
    2    1.516  0.7580  0.7220  0.036  1.480  1.480  1.480  1.480  1.480     2    0    0    0       27777      13721      13888      14056  GET /recent/63 HTTP/1.1
    2    3.282  1.6410  0.6390  1.002  2.280  2.280  2.280  2.280  2.280     2    0    0    0       28562      13871      14281      14691  GET /recent/135 HTTP/1.1
    2    1.360  0.6800  0.6300  0.050  1.310  1.310  1.310  1.310  1.310     2    0    0    0       28467      13929      14233      14538  GET /recent/28 HTTP/1.1
 2403  807.453  0.3360  0.5663  0.005  0.244  0.410  0.713  4.216  5.414  2403    0    0    0    36975642      13478      15387      16096  GET / HTTP/1.1
    2    1.261  0.6305  0.5455  0.085  1.176  1.176  1.176  1.176  1.176     2    0    0    0       28825      14196      14412      14629  GET /recent/174 HTTP/1.1
    2    1.331  0.6655  0.5445  0.121  1.210  1.210  1.210  1.210  1.210     2    0    0    0       28591      14020      14295      14571  GET /recent/123 HTTP/1.1
    3    2.438  0.8127  0.5360  0.059  1.119  1.260  1.260  1.260  1.260     3    0    0    0       42574      13443      14191      14692  GET /recent/85 HTTP/1.1
  955  291.995  0.3058  0.5347  0.001  0.197  0.347  1.057  3.846  4.157   955    0    0    0     1273970       1334       1334       1334  GET /signin HTTP/1.1
    3    2.409  0.8030  0.5334  0.097  0.926  1.386  1.386  1.386  1.386     3    0    0    0       43390      14075      14463      14686  GET /recent/107 HTTP/1.1
    2    1.133  0.5665  0.5125  0.054  1.079  1.079  1.079  1.079  1.079     2    0    0    0       28723      14357      14361      14366  GET /recent/23 HTTP/1.1
    2    1.125  0.5625  0.4945  0.068  1.057  1.057  1.057  1.057  1.057     2    0    0    0       28620      13843      14310      14777  GET /recent/138 HTTP/1.1
    4    2.327  0.5817  0.4935  0.065  1.044  1.105  1.105  1.105  1.105     4    0    0    0       58530      14268      14632      15036  GET /recent/37 HTTP/1.1
    4    3.034  0.7585  0.4839  0.052  0.866  1.409  1.409  1.409  1.409     4    0    0    0       57803      14357      14450      14704  GET /recent/96 HTTP/1.1
    4    2.745  0.6863  0.4777  0.138  1.043  1.265  1.265  1.265  1.265     4    0    0    0       55918      13386      13979      14420  GET /recent/69 HTTP/1.1
    2    1.172  0.5860  0.4740  0.112  1.060  1.060  1.060  1.060  1.060     2    0    0    0       28344      14172      14172      14172  GET /recent/90 HTTP/1.1
    4    2.294  0.5735  0.4728  0.093  0.779  1.251  1.251  1.251  1.251     4    0    0    0       56762      13677      14190      14386  GET /recent/160 HTTP/1.1
    3    1.598  0.5327  0.4700  0.058  0.367  1.173  1.173  1.173  1.173     3    0    0    0       41941      13974      13980      13984  GET /recent/48 HTTP/1.1
    3    1.336  0.4453  0.4685  0.062  0.169  1.105  1.105  1.105  1.105     3    0    0    0       42310      13917      14103      14282  GET /recent/33 HTTP/1.1
    3    1.607  0.5357  0.4657  0.073  0.361  1.173  1.173  1.173  1.173     3    0    0    0       41927      13622      13975      14497  GET /recent/192 HTTP/1.1

Top 20 Sort By Maximum(100 Percentile)
Count    Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
 2403  807.453  0.3360  0.5663  0.005  0.244  0.410  0.713  4.216  5.414  2403    0    0    0    36975642      13478      15387      16096  GET / HTTP/1.1
    6   21.467  3.5778  1.7636  0.061  4.924  4.957  4.957  4.957  4.957     6    0    0    0       84571      13951      14095      14131  GET /recent/1 HTTP/1.1
  955  291.995  0.3058  0.5347  0.001  0.197  0.347  1.057  3.846  4.157   955    0    0    0     1273970       1334       1334       1334  GET /signin HTTP/1.1
    2    3.282  1.6410  0.6390  1.002  2.280  2.280  2.280  2.280  2.280     2    0    0    0       28562      13871      14281      14691  GET /recent/135 HTTP/1.1
 3573  756.087  0.2116  0.1918  0.000  0.184  0.322  0.419  1.260  1.571  3114    0  459    0     8007326         10       2241      58970  get memo
    2    1.516  0.7580  0.7220  0.036  1.480  1.480  1.480  1.480  1.480     2    0    0    0       27777      13721      13888      14056  GET /recent/63 HTTP/1.1
    7    7.758  1.1083  0.3954  0.186  1.270  1.424  1.424  1.424  1.424     7    0    0    0       95842      13172      13691      14019  GET /recent/205 HTTP/1.1
    4    3.034  0.7585  0.4839  0.052  0.866  1.409  1.409  1.409  1.409     4    0    0    0       57803      14357      14450      14704  GET /recent/96 HTTP/1.1
    3    2.409  0.8030  0.5334  0.097  0.926  1.386  1.386  1.386  1.386     3    0    0    0       43390      14075      14463      14686  GET /recent/107 HTTP/1.1
    1    1.381  1.3810  0.0000  1.381  1.381  1.381  1.381  1.381  1.381     1    0    0    0       14003      14003      14003      14003  GET /recent/152 HTTP/1.1
    5    4.567  0.9134  0.4376  0.079  1.026  1.372  1.372  1.372  1.372     5    0    0    0       70800      13782      14160      14568  GET /recent/119 HTTP/1.1
    1    1.358  1.3580  0.0000  1.358  1.358  1.358  1.358  1.358  1.358     1    0    0    0       14492      14492      14492      14492  GET /recent/189 HTTP/1.1
    1    1.354  1.3540  0.0000  1.354  1.354  1.354  1.354  1.354  1.354     1    0    0    0       13843      13843      13843      13843  GET /recent/194 HTTP/1.1
    4    3.115  0.7788  0.4479  0.167  1.024  1.350  1.350  1.350  1.350     4    0    0    0       57235      14055      14308      14552  GET /recent/51 HTTP/1.1
    2    2.331  1.1655  0.1775  0.988  1.343  1.343  1.343  1.343  1.343     2    0    0    0       27975      13718      13987      14257  GET /recent/95 HTTP/1.1
    1    1.336  1.3360  0.0000  1.336  1.336  1.336  1.336  1.336  1.336     1    0    0    0       14064      14064      14064      14064  GET /recent/105 HTTP/1.1
    5    5.933  1.1866  0.1331  0.968  1.189  1.327  1.327  1.327  1.327     5    0    0    0       68849      13175      13769      14011  GET /recent/208 HTTP/1.1
    3    3.620  1.2067  0.0752  1.150  1.157  1.313  1.313  1.313  1.313     3    0    0    0       43076      14178      14358      14688  GET /recent/60 HTTP/1.1
    2    1.360  0.6800  0.6300  0.050  1.310  1.310  1.310  1.310  1.310     2    0    0    0       28467      13929      14233      14538  GET /recent/28 HTTP/1.1
    1    1.308  1.3080  0.0000  1.308  1.308  1.308  1.308  1.308  1.308     1    0    0    0       13380      13380      13380      13380  GET /recent/68 HTTP/1.1

TOP 37 Slow Requests
 1  5.414  GET / HTTP/1.1
 2  5.197  GET / HTTP/1.1
 3  5.103  GET / HTTP/1.1
 4  5.018  GET / HTTP/1.1
 5  4.977  GET / HTTP/1.1
 6  4.977  GET / HTTP/1.1
 7  4.957  GET /recent/1 HTTP/1.1
 8  4.933  GET / HTTP/1.1
 9  4.932  GET /recent/1 HTTP/1.1
10  4.924  GET /recent/1 HTTP/1.1
11  4.914  GET / HTTP/1.1
12  4.907  GET / HTTP/1.1
13  4.876  GET / HTTP/1.1
14  4.870  GET / HTTP/1.1
15  4.857  GET / HTTP/1.1
16  4.857  GET / HTTP/1.1
17  4.847  GET / HTTP/1.1
18  4.836  GET / HTTP/1.1
19  4.834  GET / HTTP/1.1
20  4.822  GET / HTTP/1.1
21  4.819  GET / HTTP/1.1
22  4.789  GET / HTTP/1.1
23  4.764  GET / HTTP/1.1
24  4.764  GET / HTTP/1.1
25  4.745  GET / HTTP/1.1
26  4.700  GET / HTTP/1.1
27  4.668  GET / HTTP/1.1
28  4.216  GET / HTTP/1.1
29  4.176  GET / HTTP/1.1
30  4.157  GET /signin HTTP/1.1
31  4.145  GET /signin HTTP/1.1
32  4.037  GET /signin HTTP/1.1
33  4.023  GET /signin HTTP/1.1
34  3.997  GET /signin HTTP/1.1
35  3.994  GET /signin HTTP/1.1
36  3.971  GET /signin HTTP/1.1
37  3.943  GET /signin HTTP/1.1

slow query log

Count: 407  Time=0.49s (197s)  Lock=0.00s (0s)  Rows=100.0 (40700), isucon[isucon]@localhost
  SELECT memos.*, users.username FROM memos JOIN users ON memos.user = users.id JOIN (SELECT id FROM memos WHERE is_private=N ORDER BY created_at DESC LIMIT N OFFSET N) AS tmp ON tmp.id = memos.id

Count: 64  Time=0.40s (25s)  Lock=0.00s (0s)  Rows=70.5 (4514), isucon[isucon]@localhost
  SELECT id, content, is_private, created_at, updated_at FROM memos WHERE user=N AND is_private=N ORDER BY created_at

Count: 128  Time=0.13s (16s)  Lock=0.00s (0s)  Rows=136.1 (17420), isucon[isucon]@localhost
  SELECT id, content, is_private, created_at, updated_at FROM memos WHERE user=N  ORDER BY created_at

Count: 99  Time=0.11s (10s)  Lock=0.00s (0s)  Rows=121.5 (12027), isucon[isucon]@localhost
  SELECT id, content, is_private, created_at, updated_at FROM memos WHERE user=N ORDER BY created_at DESC

Count: 1  Time=0.11s (0s)  Lock=0.00s (0s)  Rows=1.0 (1), isucon[isucon]@localhost
  SELECT count(*) AS c FROM memos WHERE is_private=N

Count: 2403  Time=0.02s (55s)  Lock=0.00s (0s)  Rows=100.0 (240300), isucon[isucon]@localhost
  SELECT memos.*, users.username FROM memos JOIN users ON memos.user = users.id JOIN (SELECT id FROM memos WHERE is_private=N ORDER BY created_at DESC LIMIT N) AS tmp ON tmp.id = memos.id

Count: 1  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=0.0 (0), 0users@0hosts
okashoi commented 4 years ago

workload = 2

Result:   SUCCESS 
RawScore: 13939.3
Fails:    0
Score:    13939.3

Kataribe

Top 20 Sort By Count
Count   Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
 3183  79.231  0.0249  0.0552  0.000  0.011  0.037  0.119  0.288  0.954  2875    0  308    0     9671511         10       3038      58970  get memo
 2554   9.214  0.0036  0.0040  0.000  0.002  0.009  0.011  0.019  0.032  2554    0    0    0    73123574      28631      28631      28631  GET /js/bootstrap.min.js HTTP/1.1
 2554   9.387  0.0037  0.0043  0.000  0.002  0.009  0.011  0.022  0.040  2554    0    0    0    43032346      16849      16849      16849  GET /css/bootstrap-responsive.min.css HTTP/1.1
 2554   9.424  0.0037  0.0042  0.000  0.002  0.009  0.012  0.020  0.044  2554    0    0    0   270762310     106015     106015     106015  GET /css/bootstrap.min.css HTTP/1.1
 2554   9.665  0.0038  0.0043  0.000  0.002  0.009  0.012  0.020  0.043  2554    0    0    0   237795278      93107      93107      93107  GET /js/jquery.min.js HTTP/1.1
 1600  63.726  0.0398  0.1647  0.002  0.013  0.028  0.040  1.053  1.708  1600    0    0    0    24267736      13485      15167      15912  GET / HTTP/1.1
  636  17.987  0.0283  0.0442  0.001  0.014  0.083  0.143  0.211  0.280   636    0    0    0     9626694       1920      15136      28402  GET /mypage HTTP/1.1
  636   3.839  0.0060  0.0204  0.000  0.002  0.010  0.014  0.128  0.259   636    0    0    0      848424       1334       1334       1334  GET /signin HTTP/1.1
  636   7.827  0.0123  0.0112  0.001  0.010  0.022  0.030  0.055  0.127     0  636    0    0           0          0          0          0  POST /memo HTTP/1.1
  636   2.402  0.0038  0.0044  0.000  0.002  0.009  0.012  0.020  0.033     0  636    0    0           0          0          0          0  POST /signout HTTP/1.1
  636   9.325  0.0147  0.0194  0.001  0.011  0.026  0.034  0.076  0.277     0  636    0    0           0          0          0          0  POST /signin HTTP/1.1
   59   0.876  0.0148  0.0073  0.005  0.014  0.026  0.031  0.038  0.038    59    0    0    0      814002      13166      13796      14147  GET /recent/205 HTTP/1.1
   54   0.844  0.0156  0.0070  0.005  0.014  0.025  0.028  0.035  0.035    54    0    0    0      742428      12959      13748      14157  GET /recent/206 HTTP/1.1
   48   0.640  0.0133  0.0071  0.006  0.012  0.021  0.025  0.047  0.047    48    0    0    0      680776      13220      14182      14837  GET /recent/92 HTTP/1.1
   47   0.710  0.0151  0.0099  0.006  0.011  0.027  0.037  0.051  0.051    47    0    0    0      664908      13849      14146      14425  GET /recent/52 HTTP/1.1
   47   0.596  0.0127  0.0057  0.004  0.011  0.022  0.025  0.028  0.028    47    0    0    0      668060      13811      14214      14917  GET /recent/112 HTTP/1.1
   46   0.644  0.0140  0.0093  0.006  0.012  0.023  0.028  0.065  0.065    46    0    0    0      648270      13730      14092      14910  GET /recent/58 HTTP/1.1
   46   0.808  0.0176  0.0133  0.007  0.013  0.034  0.047  0.069  0.069    46    0    0    0      640055      13165      13914      14402  GET /recent/199 HTTP/1.1
   45   0.599  0.0133  0.0074  0.005  0.012  0.023  0.029  0.039  0.039    45    0    0    0      625584      13371      13901      14595  GET /recent/184 HTTP/1.1
   45   0.629  0.0140  0.0098  0.004  0.011  0.023  0.035  0.058  0.058    45    0    0    0      639439      13875      14209      14481  GET /recent/187 HTTP/1.1

Top 20 Sort By Total
Count   Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
 3183  79.231  0.0249  0.0552  0.000  0.011  0.037  0.119  0.288  0.954  2875    0  308    0     9671511         10       3038      58970  get memo
 1600  63.726  0.0398  0.1647  0.002  0.013  0.028  0.040  1.053  1.708  1600    0    0    0    24267736      13485      15167      15912  GET / HTTP/1.1
  636  17.987  0.0283  0.0442  0.001  0.014  0.083  0.143  0.211  0.280   636    0    0    0     9626694       1920      15136      28402  GET /mypage HTTP/1.1
   38  10.651  0.2803  1.1331  0.005  0.013  0.031  4.699  5.448  5.448    38    0    0    0      566048      13756      14896      15662  GET /recent/1 HTTP/1.1
 2554   9.665  0.0038  0.0043  0.000  0.002  0.009  0.012  0.020  0.043  2554    0    0    0   237795278      93107      93107      93107  GET /js/jquery.min.js HTTP/1.1
 2554   9.424  0.0037  0.0042  0.000  0.002  0.009  0.012  0.020  0.044  2554    0    0    0   270762310     106015     106015     106015  GET /css/bootstrap.min.css HTTP/1.1
 2554   9.387  0.0037  0.0043  0.000  0.002  0.009  0.011  0.022  0.040  2554    0    0    0    43032346      16849      16849      16849  GET /css/bootstrap-responsive.min.css HTTP/1.1
  636   9.325  0.0147  0.0194  0.001  0.011  0.026  0.034  0.076  0.277     0  636    0    0           0          0          0          0  POST /signin HTTP/1.1
 2554   9.214  0.0036  0.0040  0.000  0.002  0.009  0.011  0.019  0.032  2554    0    0    0    73123574      28631      28631      28631  GET /js/bootstrap.min.js HTTP/1.1
  636   7.827  0.0123  0.0112  0.001  0.010  0.022  0.030  0.055  0.127     0  636    0    0           0          0          0          0  POST /memo HTTP/1.1
   39   5.248  0.1346  0.7214  0.004  0.013  0.045  0.075  4.581  4.581    39    0    0    0      541231      13297      13877      14166  GET /recent/204 HTTP/1.1
  636   3.839  0.0060  0.0204  0.000  0.002  0.010  0.014  0.128  0.259   636    0    0    0      848424       1334       1334       1334  GET /signin HTTP/1.1
  636   2.402  0.0038  0.0044  0.000  0.002  0.009  0.012  0.020  0.033     0  636    0    0           0          0          0          0  POST /signout HTTP/1.1
   59   0.876  0.0148  0.0073  0.005  0.014  0.026  0.031  0.038  0.038    59    0    0    0      814002      13166      13796      14147  GET /recent/205 HTTP/1.1
   54   0.844  0.0156  0.0070  0.005  0.014  0.025  0.028  0.035  0.035    54    0    0    0      742428      12959      13748      14157  GET /recent/206 HTTP/1.1
   46   0.808  0.0176  0.0133  0.007  0.013  0.034  0.047  0.069  0.069    46    0    0    0      640055      13165      13914      14402  GET /recent/199 HTTP/1.1
   42   0.715  0.0170  0.0116  0.005  0.015  0.032  0.037  0.067  0.067    42    0    0    0      592215      13467      14100      14787  GET /recent/98 HTTP/1.1
   44   0.714  0.0162  0.0111  0.006  0.013  0.028  0.033  0.068  0.068    44    0    0    0      610099      13319      13865      14430  GET /recent/18 HTTP/1.1
   47   0.710  0.0151  0.0099  0.006  0.011  0.027  0.037  0.051  0.051    47    0    0    0      664908      13849      14146      14425  GET /recent/52 HTTP/1.1
   35   0.705  0.0201  0.0440  0.006  0.010  0.019  0.048  0.273  0.273    35    0    0    0      491129      13661      14032      14524  GET /recent/71 HTTP/1.1

Top 20 Sort By Mean
Count   Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
   38  10.651  0.2803  1.1331  0.005  0.013  0.031  4.699  5.448  5.448    38    0    0    0      566048      13756      14896      15662  GET /recent/1 HTTP/1.1
   39   5.248  0.1346  0.7214  0.004  0.013  0.045  0.075  4.581  4.581    39    0    0    0      541231      13297      13877      14166  GET /recent/204 HTTP/1.1
 1600  63.726  0.0398  0.1647  0.002  0.013  0.028  0.040  1.053  1.708  1600    0    0    0    24267736      13485      15167      15912  GET / HTTP/1.1
  636  17.987  0.0283  0.0442  0.001  0.014  0.083  0.143  0.211  0.280   636    0    0    0     9626694       1920      15136      28402  GET /mypage HTTP/1.1
 3183  79.231  0.0249  0.0552  0.000  0.011  0.037  0.119  0.288  0.954  2875    0  308    0     9671511         10       3038      58970  get memo
   35   0.705  0.0201  0.0440  0.006  0.010  0.019  0.048  0.273  0.273    35    0    0    0      491129      13661      14032      14524  GET /recent/71 HTTP/1.1
   28   0.556  0.0199  0.0289  0.006  0.011  0.037  0.056  0.160  0.160    28    0    0    0      399731      13699      14276      14728  GET /recent/82 HTTP/1.1
   20   0.377  0.0189  0.0172  0.006  0.014  0.060  0.074  0.074  0.074    20    0    0    0      275448      13439      13772      14395  GET /recent/191 HTTP/1.1
   31   0.582  0.0188  0.0172  0.006  0.013  0.036  0.066  0.084  0.084    31    0    0    0      448145      13935      14456      15125  GET /recent/28 HTTP/1.1
   46   0.808  0.0176  0.0133  0.007  0.013  0.034  0.047  0.069  0.069    46    0    0    0      640055      13165      13914      14402  GET /recent/199 HTTP/1.1
   27   0.462  0.0171  0.0136  0.007  0.014  0.026  0.058  0.065  0.065    27    0    0    0      373373      13342      13828      14605  GET /recent/85 HTTP/1.1
   42   0.715  0.0170  0.0116  0.005  0.015  0.032  0.037  0.067  0.067    42    0    0    0      592215      13467      14100      14787  GET /recent/98 HTTP/1.1
   28   0.470  0.0168  0.0274  0.006  0.011  0.021  0.026  0.157  0.157    28    0    0    0      395330      13745      14118      14445  GET /recent/15 HTTP/1.1
   36   0.599  0.0166  0.0092  0.006  0.014  0.029  0.037  0.045  0.045    36    0    0    0      509216      13902      14144      14513  GET /recent/148 HTTP/1.1
   31   0.512  0.0165  0.0116  0.006  0.013  0.029  0.051  0.056  0.056    31    0    0    0      428274      13252      13815      14425  GET /recent/91 HTTP/1.1
   44   0.714  0.0162  0.0111  0.006  0.013  0.028  0.033  0.068  0.068    44    0    0    0      610099      13319      13865      14430  GET /recent/18 HTTP/1.1
   38   0.616  0.0162  0.0129  0.005  0.013  0.024  0.033  0.086  0.086    38    0    0    0      542635      13689      14279      14986  GET /recent/107 HTTP/1.1
   30   0.473  0.0158  0.0122  0.005  0.011  0.040  0.045  0.055  0.055    30    0    0    0      414960      13299      13832      14301  GET /recent/11 HTTP/1.1
   42   0.661  0.0157  0.0084  0.005  0.015  0.028  0.028  0.047  0.047    42    0    0    0      593873      13571      14139      14607  GET /recent/47 HTTP/1.1
   27   0.424  0.0157  0.0086  0.005  0.013  0.033  0.034  0.038  0.038    27    0    0    0      388432      13863      14386      14824  GET /recent/109 HTTP/1.1

Top 20 Sort By Standard Deviation
Count   Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
   38  10.651  0.2803  1.1331  0.005  0.013  0.031  4.699  5.448  5.448    38    0    0    0      566048      13756      14896      15662  GET /recent/1 HTTP/1.1
   39   5.248  0.1346  0.7214  0.004  0.013  0.045  0.075  4.581  4.581    39    0    0    0      541231      13297      13877      14166  GET /recent/204 HTTP/1.1
 1600  63.726  0.0398  0.1647  0.002  0.013  0.028  0.040  1.053  1.708  1600    0    0    0    24267736      13485      15167      15912  GET / HTTP/1.1
 3183  79.231  0.0249  0.0552  0.000  0.011  0.037  0.119  0.288  0.954  2875    0  308    0     9671511         10       3038      58970  get memo
  636  17.987  0.0283  0.0442  0.001  0.014  0.083  0.143  0.211  0.280   636    0    0    0     9626694       1920      15136      28402  GET /mypage HTTP/1.1
   35   0.705  0.0201  0.0440  0.006  0.010  0.019  0.048  0.273  0.273    35    0    0    0      491129      13661      14032      14524  GET /recent/71 HTTP/1.1
   28   0.556  0.0199  0.0289  0.006  0.011  0.037  0.056  0.160  0.160    28    0    0    0      399731      13699      14276      14728  GET /recent/82 HTTP/1.1
   28   0.470  0.0168  0.0274  0.006  0.011  0.021  0.026  0.157  0.157    28    0    0    0      395330      13745      14118      14445  GET /recent/15 HTTP/1.1
  636   3.839  0.0060  0.0204  0.000  0.002  0.010  0.014  0.128  0.259   636    0    0    0      848424       1334       1334       1334  GET /signin HTTP/1.1
  636   9.325  0.0147  0.0194  0.001  0.011  0.026  0.034  0.076  0.277     0  636    0    0           0          0          0          0  POST /signin HTTP/1.1
   20   0.377  0.0189  0.0172  0.006  0.014  0.060  0.074  0.074  0.074    20    0    0    0      275448      13439      13772      14395  GET /recent/191 HTTP/1.1
   31   0.582  0.0188  0.0172  0.006  0.013  0.036  0.066  0.084  0.084    31    0    0    0      448145      13935      14456      15125  GET /recent/28 HTTP/1.1
   27   0.372  0.0138  0.0145  0.005  0.009  0.029  0.029  0.082  0.082    27    0    0    0      386704      13759      14322      15106  GET /recent/123 HTTP/1.1
   30   0.432  0.0144  0.0139  0.005  0.011  0.021  0.029  0.085  0.085    30    0    0    0      409339      13348      13644      13930  GET /recent/183 HTTP/1.1
   34   0.522  0.0154  0.0137  0.005  0.012  0.023  0.041  0.083  0.083    34    0    0    0      468283      13053      13773      14544  GET /recent/174 HTTP/1.1
   27   0.462  0.0171  0.0136  0.007  0.014  0.026  0.058  0.065  0.065    27    0    0    0      373373      13342      13828      14605  GET /recent/85 HTTP/1.1
   46   0.808  0.0176  0.0133  0.007  0.013  0.034  0.047  0.069  0.069    46    0    0    0      640055      13165      13914      14402  GET /recent/199 HTTP/1.1
   38   0.616  0.0162  0.0129  0.005  0.013  0.024  0.033  0.086  0.086    38    0    0    0      542635      13689      14279      14986  GET /recent/107 HTTP/1.1
   30   0.473  0.0158  0.0122  0.005  0.011  0.040  0.045  0.055  0.055    30    0    0    0      414960      13299      13832      14301  GET /recent/11 HTTP/1.1
   39   0.550  0.0141  0.0120  0.005  0.011  0.018  0.048  0.076  0.076    39    0    0    0      552038      13674      14154      14659  GET /recent/130 HTTP/1.1

Top 20 Sort By Maximum(100 Percentile)
Count   Total    Mean  Stddev    Min  P50.0  P90.0  P95.0  P99.0    Max   2xx  3xx  4xx  5xx  TotalBytes   MinBytes  MeanBytes   MaxBytes  Request
   38  10.651  0.2803  1.1331  0.005  0.013  0.031  4.699  5.448  5.448    38    0    0    0      566048      13756      14896      15662  GET /recent/1 HTTP/1.1
   39   5.248  0.1346  0.7214  0.004  0.013  0.045  0.075  4.581  4.581    39    0    0    0      541231      13297      13877      14166  GET /recent/204 HTTP/1.1
 1600  63.726  0.0398  0.1647  0.002  0.013  0.028  0.040  1.053  1.708  1600    0    0    0    24267736      13485      15167      15912  GET / HTTP/1.1
 3183  79.231  0.0249  0.0552  0.000  0.011  0.037  0.119  0.288  0.954  2875    0  308    0     9671511         10       3038      58970  get memo
  636  17.987  0.0283  0.0442  0.001  0.014  0.083  0.143  0.211  0.280   636    0    0    0     9626694       1920      15136      28402  GET /mypage HTTP/1.1
  636   9.325  0.0147  0.0194  0.001  0.011  0.026  0.034  0.076  0.277     0  636    0    0           0          0          0          0  POST /signin HTTP/1.1
   35   0.705  0.0201  0.0440  0.006  0.010  0.019  0.048  0.273  0.273    35    0    0    0      491129      13661      14032      14524  GET /recent/71 HTTP/1.1
  636   3.839  0.0060  0.0204  0.000  0.002  0.010  0.014  0.128  0.259   636    0    0    0      848424       1334       1334       1334  GET /signin HTTP/1.1
   28   0.556  0.0199  0.0289  0.006  0.011  0.037  0.056  0.160  0.160    28    0    0    0      399731      13699      14276      14728  GET /recent/82 HTTP/1.1
   28   0.470  0.0168  0.0274  0.006  0.011  0.021  0.026  0.157  0.157    28    0    0    0      395330      13745      14118      14445  GET /recent/15 HTTP/1.1
  636   7.827  0.0123  0.0112  0.001  0.010  0.022  0.030  0.055  0.127     0  636    0    0           0          0          0          0  POST /memo HTTP/1.1
   38   0.616  0.0162  0.0129  0.005  0.013  0.024  0.033  0.086  0.086    38    0    0    0      542635      13689      14279      14986  GET /recent/107 HTTP/1.1
   30   0.432  0.0144  0.0139  0.005  0.011  0.021  0.029  0.085  0.085    30    0    0    0      409339      13348      13644      13930  GET /recent/183 HTTP/1.1
   31   0.582  0.0188  0.0172  0.006  0.013  0.036  0.066  0.084  0.084    31    0    0    0      448145      13935      14456      15125  GET /recent/28 HTTP/1.1
   34   0.522  0.0154  0.0137  0.005  0.012  0.023  0.041  0.083  0.083    34    0    0    0      468283      13053      13773      14544  GET /recent/174 HTTP/1.1
   27   0.372  0.0138  0.0145  0.005  0.009  0.029  0.029  0.082  0.082    27    0    0    0      386704      13759      14322      15106  GET /recent/123 HTTP/1.1
   39   0.550  0.0141  0.0120  0.005  0.011  0.018  0.048  0.076  0.076    39    0    0    0      552038      13674      14154      14659  GET /recent/130 HTTP/1.1
   20   0.377  0.0189  0.0172  0.006  0.014  0.060  0.074  0.074  0.074    20    0    0    0      275448      13439      13772      14395  GET /recent/191 HTTP/1.1
   33   0.479  0.0145  0.0108  0.005  0.012  0.019  0.026  0.071  0.071    33    0    0    0      481694      14297      14596      14965  GET /recent/79 HTTP/1.1
   41   0.611  0.0149  0.0107  0.006  0.012  0.024  0.028  0.071  0.071    41    0    0    0      578650      13584      14113      14975  GET /recent/5 HTTP/1.1

TOP 37 Slow Requests
 1  5.448  GET /recent/1 HTTP/1.1
 2  4.699  GET /recent/1 HTTP/1.1
 3  4.581  GET /recent/204 HTTP/1.1
 4  1.708  GET / HTTP/1.1
 5  1.675  GET / HTTP/1.1
 6  1.663  GET / HTTP/1.1
 7  1.656  GET / HTTP/1.1
 8  1.628  GET / HTTP/1.1
 9  1.581  GET / HTTP/1.1
10  1.566  GET / HTTP/1.1
11  1.291  GET / HTTP/1.1
12  1.181  GET / HTTP/1.1
13  1.180  GET / HTTP/1.1
14  1.167  GET / HTTP/1.1
15  1.161  GET / HTTP/1.1
16  1.089  GET / HTTP/1.1
17  1.075  GET / HTTP/1.1
18  1.071  GET / HTTP/1.1
19  1.053  GET / HTTP/1.1
20  0.999  GET / HTTP/1.1
21  0.996  GET / HTTP/1.1
22  0.969  GET / HTTP/1.1
23  0.954  GET /memo/41177 HTTP/1.1
24  0.925  GET / HTTP/1.1
25  0.907  GET / HTTP/1.1
26  0.905  GET /memo/22269 HTTP/1.1
27  0.868  GET / HTTP/1.1
28  0.863  GET / HTTP/1.1
29  0.849  GET / HTTP/1.1
30  0.823  GET / HTTP/1.1
31  0.817  GET / HTTP/1.1
32  0.816  GET / HTTP/1.1
33  0.814  GET / HTTP/1.1
34  0.801  GET / HTTP/1.1
35  0.780  GET / HTTP/1.1
36  0.768  GET / HTTP/1.1
37  0.768  GET / HTTP/1.1

slow query log

Count: 3  Time=4.49s (13s)  Lock=0.00s (0s)  Rows=100.0 (300), isucon[isucon]@localhost
  SELECT memos.*, users.username FROM memos JOIN users ON memos.user = users.id JOIN (SELECT id, memo as memo_id FROM public_memos WHERE id BETWEEN N AND N) AS tmp ON tmp.memo_id = memos.id ORDER BY memos.created_at DESC

Count: 1  Time=0.97s (0s)  Lock=0.00s (0s)  Rows=0.0 (0), isucon[isucon]@localhost
  DROP TABLE IF EXISTS `memos`

Count: 52  Time=0.25s (13s)  Lock=0.00s (0s)  Rows=69.2 (3601), isucon[isucon]@localhost
  SELECT id, content, is_private, created_at, updated_at FROM memos WHERE user=N AND is_private=N ORDER BY created_at

Count: 72  Time=0.10s (7s)  Lock=0.00s (0s)  Rows=118.2 (8510), isucon[isucon]@localhost
  SELECT id, content, is_private, created_at, updated_at FROM memos WHERE user=N ORDER BY created_at DESC

Count: 216  Time=0.09s (19s)  Lock=0.00s (0s)  Rows=117.9 (25460), isucon[isucon]@localhost
  SELECT id, content, is_private, created_at, updated_at FROM memos WHERE user=N  ORDER BY created_at

Count: 1600  Time=0.02s (32s)  Lock=0.00s (0s)  Rows=100.0 (160000), isucon[isucon]@localhost
  SELECT memos.*, users.username FROM memos JOIN users ON memos.user = users.id JOIN (SELECT id FROM memos WHERE is_private=N ORDER BY created_at DESC LIMIT N) AS tmp ON tmp.id = memos.id

Count: 1  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=0.0 (0), 0users@0hosts