計測結果

初期状態
{"pass":true,"score":187,"success":338,"fail":11,"messages":["リクエストがタイムアウトしました (GET /favicon.ico)","リクエストがタイムアウトしました (POST /login)","リクエストがタイムアウトしました (POST /register)"]}

計測を入れた
{"pass":true,"score":0,"success":181,"fail":64,"messages":["リクエストがタイムアウトしました (GET /)","リクエストがタイムアウトしました (GET /@graciela)","リクエストがタイムアウトしました (GET /@helen)","リクエストがタイムアウトしました (GET /@joy)","リクエストがタイムアウトしました (GET /@kimberly)","リクエストがタイムアウトしました (GET /@kristine)","リクエストがタイムアウトしました (GET /@minnie)","リクエストがタイムアウトしました (GET /@rose)","リクエストがタイムアウトしました (GET /@rosetta)","リクエストがタイムアウトしました (GET /@shannon)","リクエストがタイムアウトしました (GET /@susana)","リクエストがタイムアウトしました (POST /login)","リクエストがタイムアウトしました (POST /register)"]}

+-------+-----+-----+-----+--------+--------------------------+-------+--------+---------+-------+--------+
| COUNT | 2XX | 3XX | 5XX | METHOD |           URI            |  MIN  |  MAX   |   SUM   |  AVG  |  P99   |
+-------+-----+-----+-----+--------+--------------------------+-------+--------+---------+-------+--------+
|    61 |   7 |   0 |   0 | GET    | /                        | 1.700 | 10.009 | 549.279 | 9.005 | 10.009 |
|    13 |   3 |   0 |   0 | GET    | /@\w+                    | 0.736 | 10.004 | 117.896 | 9.069 | 10.004 |
|     7 |   7 |   0 |   0 | GET    | /posts/[0-9]+            | 0.080 |  1.560 |   5.670 | 0.810 |  1.560 |
|    58 |   0 |  58 |   0 | POST   | /login                   | 0.024 |  0.576 |   5.320 | 0.092 |  0.576 |
|     4 |   0 |   4 |   0 | POST   | /register                | 0.020 |  0.100 |   0.268 | 0.067 |  0.100 |
|    28 |  28 |   0 |   0 | GET    | /login                   | 0.000 |  0.056 |   0.172 | 0.006 |  0.056 |
|    65 |  65 |   0 |   0 | GET    | /image/[0-9]+\.(jpg|png) | 0.000 |  0.020 |   0.148 | 0.002 |  0.020 |
|     1 |   1 |   0 |   0 | GET    | /initialize              | 0.044 |  0.044 |   0.044 | 0.044 |  0.044 |
|     6 |   0 |   5 |   0 | POST   | /                        | 0.000 |  0.008 |   0.012 | 0.002 |  0.008 |
|     1 |   0 |   1 |   0 | POST   | /comment                 | 0.008 |  0.008 |   0.008 | 0.008 |  0.008 |
|     9 |   9 |   0 |   0 | GET    | /favicon.ico             | 0.000 |  0.004 |   0.008 | 0.001 |  0.004 |
|     9 |   9 |   0 |   0 | GET    | /css/style.css           | 0.000 |  0.004 |   0.008 | 0.001 |  0.004 |
|     9 |   9 |   0 |   0 | GET    | /js/timeago.min.js       | 0.000 |  0.000 |   0.000 | 0.000 |  0.000 |
|     9 |   9 |   0 |   0 | GET    | /js/main.js              | 0.000 |  0.000 |   0.000 | 0.000 |  0.000 |
|     1 |   0 |   1 |   0 | GET    | /logout                  | 0.000 |  0.000 |   0.000 | 0.000 |  0.000 |
|     1 |   0 |   0 |   0 | GET    | /admin/banned            | 0.000 |  0.000 |   0.000 | 0.000 |  0.000 |
+-------+-----+-----+-----+--------+--------------------------+-------+--------+---------+-------+--------+

Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 1476  Time=1.66s (2454s)  Lock=0.00s (0s)  Rows=2.9 (4251), isuconp[isuconp]@localhost
  SELECT * FROM `comments` WHERE `post_id` = N ORDER BY `created_at` DESC LIMIT N

Count: 1483  Time=0.56s (829s)  Lock=0.00s (0s)  Rows=1.0 (1483), isuconp[isuconp]@localhost
  SELECT COUNT(*) AS `count` FROM `comments` WHERE `post_id` = N

Count: 61  Time=0.60s (36s)  Lock=0.00s (0s)  Rows=10001.0 (610059), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` ORDER BY `created_at` DESC

Count: 18067  Time=0.00s (10s)  Lock=0.00s (0s)  Rows=0.7 (12039), isuconp[isuconp]@localhost
  #

Count: 13  Time=0.61s (7s)  Lock=0.00s (0s)  Rows=1.0 (13), isuconp[isuconp]@localhost
  SELECT COUNT(*) AS count FROM `comments` WHERE `user_id` = N

Count: 5829  Time=0.00s (7s)  Lock=0.00s (0s)  Rows=1.0 (5829), isuconp[isuconp]@localhost
  SELECT * FROM `users` WHERE `id` = N

Count: 7  Time=0.62s (4s)  Lock=0.00s (0s)  Rows=7.4 (52), isuconp[isuconp]@localhost
  SELECT * FROM `comments` WHERE `post_id` = N ORDER BY `created_at` DESC

comments にインデックスを張る
{"pass":true,"score":14393,"success":13697,"fail":0,"messages":[]}

+-------+------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+
| COUNT | 2XX  | 3XX | 5XX | METHOD |             URI              |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+-------+------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+
|   437 |  437 |   0 |   0 | GET    | /                            | 0.100 | 1.040 | 283.825 | 0.649 | 1.000 |
|  8005 | 8005 |   0 |   0 | GET    | /image/[0-9]+\.(jpg|png|gif) | 0.000 | 0.228 | 109.280 | 0.014 | 0.092 |
|    96 |   96 |   0 |   0 | GET    | /posts                       | 0.092 | 1.380 |  87.499 | 0.911 | 1.380 |
|   101 |  101 |   0 |   0 | GET    | /@\w+                        | 0.068 | 1.212 |  67.964 | 0.673 | 1.008 |
|   702 |  702 |   0 |   0 | GET    | /posts/[0-9]+                | 0.004 | 0.304 |  55.965 | 0.080 | 0.236 |
|   318 |    0 | 318 |   0 | POST   | /login                       | 0.004 | 0.252 |  20.852 | 0.066 | 0.180 |
|    76 |    0 |  39 |   0 | POST   | /                            | 0.000 | 0.348 |   6.397 | 0.084 | 0.348 |
|    41 |    0 |  41 |   0 | POST   | /register                    | 0.020 | 0.228 |   3.704 | 0.090 | 0.228 |
|   924 |  924 |   0 |   0 | GET    | /js/timeago.min.js           | 0.000 | 0.076 |   3.044 | 0.003 | 0.040 |
|   924 |  924 |   0 |   0 | GET    | /favicon.ico                 | 0.000 | 0.052 |   2.984 | 0.003 | 0.032 |
|   924 |  924 |   0 |   0 | GET    | /css/style.css               | 0.000 | 0.112 |   2.576 | 0.003 | 0.032 |
|   924 |  924 |   0 |   0 | GET    | /js/main.js                  | 0.000 | 0.076 |   2.384 | 0.003 | 0.032 |
|    41 |    0 |  41 |   0 | POST   | /comment                     | 0.008 | 0.092 |   1.304 | 0.032 | 0.092 |
|   108 |  108 |   0 |   0 | GET    | /login                       | 0.004 | 0.084 |   0.828 | 0.008 | 0.076 |
|    41 |    0 |   0 |   0 | GET    | /admin/banned                | 0.004 | 0.152 |   0.708 | 0.017 | 0.152 |
|    54 |    0 |  54 |   0 | GET    | /logout                      | 0.004 | 0.024 |   0.144 | 0.003 | 0.024 |
|     1 |    1 |   0 |   0 | GET    | /initialize                  | 0.016 | 0.016 |   0.016 | 0.016 | 0.016 |
+-------+------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+

Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 437  Time=0.16s (69s)  Lock=0.00s (0s)  Rows=10018.4 (4378047), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` ORDER BY `created_at` DESC

Count: 96  Time=0.20s (19s)  Lock=0.00s (0s)  Rows=9914.8 (951821), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `created_at` <= 'S' ORDER BY `created_at` DESC

Count: 146854  Time=0.00s (17s)  Lock=0.00s (0s)  Rows=7.1 (1036123), isuconp[isuconp]@localhost
  #

Count: 101  Time=0.16s (16s)  Lock=0.00s (0s)  Rows=1.0 (101), isuconp[isuconp]@localhost
  SELECT COUNT(*) AS count FROM `comments` WHERE `user_id` = N

Count: 36776  Time=0.00s (13s)  Lock=0.00s (0s)  Rows=1.0 (36776), isuconp[isuconp]@localhost
  SELECT * FROM `users` WHERE `id` = N

Count: 8707  Time=0.00s (10s)  Lock=0.00s (0s)  Rows=1.0 (8707), isuconp[isuconp]@localhost
  SELECT * FROM `posts` WHERE `id` = N

Count: 11923  Time=0.00s (5s)  Lock=0.00s (0s)  Rows=1.4 (17002), isuconp[isuconp]@localhost
  SELECT * FROM `comments` WHERE `post_id` = N ORDER BY `created_at` DESC LIMIT N

posts にインデックス追加
{"pass":true,"score":14376,"success":13671,"fail":0,"messages":[]}

+-------+------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+
| COUNT | 2XX  | 3XX | 5XX | METHOD |             URI              |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+-------+------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+
|   439 |  439 |   0 |   0 | GET    | /                            | 0.096 | 1.065 | 278.660 | 0.635 | 0.964 |
|  8096 | 8096 |   0 |   0 | GET    | /image/[0-9]+\.(jpg|png|gif) | 0.004 | 0.188 | 113.187 | 0.014 | 0.080 |
|   101 |  101 |   0 |   0 | GET    | /posts                       | 0.120 | 1.188 |  86.942 | 0.861 | 1.184 |
|    97 |   97 |   0 |   0 | GET    | /@\w+                        | 0.060 | 1.116 |  67.574 | 0.697 | 1.116 |
|   676 |  676 |   0 |   0 | GET    | /posts/[0-9]+                | 0.004 | 0.300 |  58.031 | 0.086 | 0.260 |
|   321 |    0 | 321 |   0 | POST   | /login                       | 0.004 | 0.196 |  22.145 | 0.069 | 0.164 |
|    77 |    0 |  39 |   0 | POST   | /                            | 0.000 | 0.312 |   5.213 | 0.068 | 0.312 |
|    41 |    0 |  41 |   0 | POST   | /register                    | 0.016 | 0.236 |   4.216 | 0.103 | 0.236 |
|   899 |  899 |   0 |   0 | GET    | /favicon.ico                 | 0.004 | 0.156 |   3.084 | 0.003 | 0.032 |
|   899 |  899 |   0 |   0 | GET    | /js/timeago.min.js           | 0.000 | 0.168 |   2.984 | 0.003 | 0.036 |
|   899 |  899 |   0 |   0 | GET    | /js/main.js                  | 0.000 | 0.072 |   2.617 | 0.003 | 0.032 |
|   899 |  899 |   0 |   0 | GET    | /css/style.css               | 0.000 | 0.060 |   2.384 | 0.003 | 0.028 |
|    39 |    0 |  39 |   0 | POST   | /comment                     | 0.008 | 0.144 |   1.268 | 0.033 | 0.144 |
|   110 |  110 |   0 |   0 | GET    | /login                       | 0.004 | 0.056 |   0.832 | 0.008 | 0.044 |
|    41 |    0 |   0 |   0 | GET    | /admin/banned                | 0.004 | 0.088 |   0.708 | 0.017 | 0.088 |
|    55 |    0 |  55 |   0 | GET    | /logout                      | 0.004 | 0.040 |   0.264 | 0.005 | 0.040 |
|     1 |    1 |   0 |   0 | GET    | /initialize                  | 0.204 | 0.204 |   0.204 | 0.204 | 0.204 |
+-------+------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+

Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 439  Time=0.14s (60s)  Lock=0.00s (0s)  Rows=10019.0 (4398323), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` ORDER BY `created_at` DESC

Count: 147201  Time=0.00s (16s)  Lock=0.00s (0s)  Rows=7.4 (1085065), isuconp[isuconp]@localhost
  #

Count: 97  Time=0.16s (15s)  Lock=0.00s (0s)  Rows=1.0 (97), isuconp[isuconp]@localhost
  SELECT COUNT(*) AS count FROM `comments` WHERE `user_id` = N

Count: 101  Time=0.15s (14s)  Lock=0.00s (0s)  Rows=9911.1 (1001024), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `created_at` <= 'S' ORDER BY `created_at` DESC

Count: 36604  Time=0.00s (12s)  Lock=0.00s (0s)  Rows=1.0 (36604), isuconp[isuconp]@localhost
  SELECT * FROM `users` WHERE `id` = N

Count: 8772  Time=0.00s (10s)  Lock=0.00s (0s)  Rows=1.0 (8772), isuconp[isuconp]@localhost
  SELECT * FROM `posts` WHERE `id` = N

Count: 12064  Time=0.00s (5s)  Lock=0.00s (0s)  Rows=1.4 (16851), isuconp[isuconp]@localhost
  SELECT * FROM `comments` WHERE `post_id` = N ORDER BY `created_at` DESC LIMIT N

PREPARE が多そうなので interpolateParams=true を追加
{"pass":true,"score":15610,"success":14840,"fail":0,"messages":[]}

+-------+------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+
| COUNT | 2XX  | 3XX | 5XX | METHOD |             URI              |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+-------+------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+
|   480 |  480 |   0 |   0 | GET    | /                            | 0.060 | 0.904 | 248.139 | 0.517 | 0.820 |
|  8723 | 8723 |   0 |   0 | GET    | /image/[0-9]+\.(jpg|png|gif) | 0.000 | 0.244 | 142.846 | 0.016 | 0.096 |
|   114 |  114 |   0 |   0 | GET    | /posts                       | 0.132 | 0.944 |  75.408 | 0.661 | 0.924 |
|   117 |  117 |   0 |   0 | GET    | /@\w+                        | 0.040 | 0.892 |  63.217 | 0.540 | 0.880 |
|   751 |  751 |   0 |   0 | GET    | /posts/[0-9]+                | 0.004 | 0.280 |  48.958 | 0.065 | 0.212 |
|   346 |    0 | 346 |   0 | POST   | /login                       | 0.004 | 0.212 |  28.819 | 0.083 | 0.200 |
|    82 |    0 |  41 |   0 | POST   | /                            | 0.004 | 0.332 |   5.988 | 0.073 | 0.332 |
|   983 |  983 |   0 |   0 | GET    | /favicon.ico                 | 0.000 | 0.120 |   5.808 | 0.006 | 0.048 |
|    47 |    0 |  47 |   0 | POST   | /register                    | 0.016 | 0.328 |   5.352 | 0.114 | 0.328 |
|   983 |  983 |   0 |   0 | GET    | /js/timeago.min.js           | 0.000 | 0.120 |   5.212 | 0.005 | 0.048 |
|   983 |  983 |   0 |   0 | GET    | /js/main.js                  | 0.000 | 0.072 |   4.572 | 0.005 | 0.044 |
|   983 |  983 |   0 |   0 | GET    | /css/style.css               | 0.000 | 0.092 |   3.924 | 0.004 | 0.036 |
|    49 |    0 |  49 |   0 | POST   | /comment                     | 0.004 | 0.136 |   2.076 | 0.042 | 0.136 |
|   112 |  112 |   0 |   0 | GET    | /login                       | 0.000 | 0.100 |   1.092 | 0.010 | 0.068 |
|    47 |    0 |   0 |   0 | GET    | /admin/banned                | 0.004 | 0.060 |   0.612 | 0.013 | 0.060 |
|    56 |    0 |  56 |   0 | GET    | /logout                      | 0.004 | 0.048 |   0.376 | 0.007 | 0.048 |
|     1 |    1 |   0 |   0 | GET    | /initialize                  | 0.144 | 0.144 |   0.144 | 0.144 | 0.144 |
+-------+------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+

Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 480  Time=0.14s (68s)  Lock=0.00s (0s)  Rows=10020.1 (4809657), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` ORDER BY `created_at` DESC

Count: 114  Time=0.16s (18s)  Lock=0.00s (0s)  Rows=9900.8 (1128688), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `created_at` <= 'S' ORDER BY `created_at` DESC

Count: 40163  Time=0.00s (17s)  Lock=0.00s (0s)  Rows=1.0 (40163), isuconp[isuconp]@localhost
  SELECT * FROM `users` WHERE `id` = N

Count: 117  Time=0.15s (17s)  Lock=0.00s (0s)  Rows=1.0 (117), isuconp[isuconp]@localhost
  SELECT COUNT(*) AS count FROM `comments` WHERE `user_id` = N

Count: 9474  Time=0.00s (13s)  Lock=0.00s (0s)  Rows=1.0 (9474), isuconp[isuconp]@localhost
  SELECT * FROM `posts` WHERE `id` = N

Count: 13285  Time=0.00s (6s)  Lock=0.00s (0s)  Rows=1.4 (18428), isuconp[isuconp]@localhost
  SELECT * FROM `comments` WHERE `post_id` = N ORDER BY `created_at` DESC LIMIT N

Count: 117  Time=0.06s (6s)  Lock=0.00s (0s)  Rows=9.7 (1139), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `user_id` = N ORDER BY `created_at` DESC

GET / で１ページ分にLIMIT
{"pass":true,"score":22217,"success":20958,"fail":0,"messages":[]}

+-------+-------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+
| COUNT |  2XX  | 3XX | 5XX | METHOD |             URI              |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+-------+-------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+
|   765 |   765 |   0 |   0 | GET    | /                            | 0.028 | 0.464 | 184.537 | 0.241 | 0.420 |
| 12461 | 12461 |   0 |   0 | GET    | /image/[0-9]+\.(jpg|png|gif) | 0.004 | 0.112 | 162.307 | 0.013 | 0.056 |
|   150 |   150 |   0 |   0 | GET    | /posts                       | 0.080 | 0.832 |  76.130 | 0.508 | 0.832 |
|   158 |   158 |   0 |   0 | GET    | /@\w+                        | 0.044 | 0.756 |  67.223 | 0.425 | 0.704 |
|   987 |   987 |   0 |   0 | GET    | /posts/[0-9]+                | 0.004 | 0.172 |  52.343 | 0.053 | 0.144 |
|   550 |     0 | 550 |   0 | POST   | /login                       | 0.004 | 0.200 |  43.820 | 0.080 | 0.176 |
|   139 |     0 |  70 |   0 | POST   | /                            | 0.012 | 0.332 |   9.585 | 0.069 | 0.320 |
|    85 |     0 |  85 |   0 | POST   | /register                    | 0.020 | 0.200 |   9.048 | 0.106 | 0.200 |
|  1317 |  1317 |   0 |   0 | GET    | /favicon.ico                 | 0.000 | 0.068 |   4.300 | 0.003 | 0.020 |
|  1317 |  1317 |   0 |   0 | GET    | /js/timeago.min.js           | 0.000 | 0.048 |   3.885 | 0.003 | 0.024 |
|  1317 |  1317 |   0 |   0 | GET    | /js/main.js                  | 0.000 | 0.048 |   3.668 | 0.003 | 0.024 |
|  1317 |  1317 |   0 |   0 | GET    | /css/style.css               | 0.000 | 0.040 |   3.532 | 0.003 | 0.020 |
|    72 |     0 |  72 |   0 | POST   | /comment                     | 0.004 | 0.076 |   1.977 | 0.027 | 0.076 |
|    85 |     0 |   0 |   0 | GET    | /admin/banned                | 0.004 | 0.060 |   1.160 | 0.014 | 0.060 |
|   170 |   170 |   0 |   0 | GET    | /login                       | 0.004 | 0.036 |   0.964 | 0.006 | 0.036 |
|    85 |     0 |  85 |   0 | GET    | /logout                      | 0.004 | 0.048 |   0.484 | 0.006 | 0.048 |
|     1 |     1 |   0 |   0 | GET    | /initialize                  | 0.140 | 0.140 |   0.140 | 0.140 | 0.140 |
+-------+-------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+

Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 158  Time=0.13s (20s)  Lock=0.00s (0s)  Rows=1.0 (158), isuconp[isuconp]@localhost
  SELECT COUNT(*) AS count FROM `comments` WHERE `user_id` = N

Count: 52642  Time=0.00s (19s)  Lock=0.00s (0s)  Rows=1.0 (52642), isuconp[isuconp]@localhost
  SELECT * FROM `users` WHERE `id` = N

Count: 150  Time=0.11s (17s)  Lock=0.00s (0s)  Rows=9895.9 (1484390), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `created_at` <= 'S' ORDER BY `created_at` DESC

Count: 13448  Time=0.00s (16s)  Lock=0.00s (0s)  Rows=1.0 (13448), isuconp[isuconp]@localhost
  SELECT * FROM `posts` WHERE `id` = N

Count: 19972  Time=0.00s (9s)  Lock=0.00s (0s)  Rows=1.1 (21403), isuconp[isuconp]@localhost
  SELECT * FROM `comments` WHERE `post_id` = N ORDER BY `created_at` DESC LIMIT N

Count: 20959  Time=0.00s (9s)  Lock=0.00s (0s)  Rows=1.0 (20959), isuconp[isuconp]@localhost
  SELECT COUNT(*) AS `count` FROM `comments` WHERE `post_id` = N

Count: 158  Time=0.04s (6s)  Lock=0.00s (0s)  Rows=10.0 (1586), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `user_id` = N ORDER BY `created_at` DESC

comments テーブルに user_id のインデックス作成
{"pass":true,"score":23320,"success":22041,"fail":0,"messages":[]}

+-------+-------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+
| COUNT |  2XX  | 3XX | 5XX | METHOD |             URI              |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+-------+-------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+
|   782 |   782 |   0 |   0 | GET    | /                            | 0.016 | 0.472 | 183.085 | 0.234 | 0.416 |
| 12842 | 12842 |   0 |   0 | GET    | /image/[0-9]+\.(jpg|png|gif) | 0.000 | 0.208 | 163.499 | 0.013 | 0.056 |
|   160 |   160 |   0 |   0 | GET    | /posts                       | 0.088 | 0.824 |  76.954 | 0.481 | 0.792 |
|  1122 |  1122 |   0 |   0 | GET    | /posts/[0-9]+                | 0.004 | 0.164 |  56.953 | 0.051 | 0.136 |
|   179 |   179 |   0 |   0 | GET    | /@\w+                        | 0.040 | 0.560 |  51.550 | 0.288 | 0.552 |
|   560 |     0 | 560 |   0 | POST   | /login                       | 0.004 | 0.220 |  46.648 | 0.083 | 0.184 |
|   138 |     0 |  70 |   0 | POST   | /                            | 0.000 | 0.304 |  10.132 | 0.073 | 0.296 |
|    88 |     0 |  88 |   0 | POST   | /register                    | 0.020 | 0.196 |   9.612 | 0.109 | 0.196 |
|  1441 |  1441 |   0 |   0 | GET    | /favicon.ico                 | 0.000 | 0.076 |   4.568 | 0.003 | 0.024 |
|  1441 |  1441 |   0 |   0 | GET    | /js/timeago.min.js           | 0.004 | 0.052 |   4.144 | 0.003 | 0.024 |
|  1441 |  1441 |   0 |   0 | GET    | /js/main.js                  | 0.000 | 0.028 |   3.949 | 0.003 | 0.020 |
|  1441 |  1441 |   0 |   0 | GET    | /css/style.css               | 0.000 | 0.040 |   3.576 | 0.002 | 0.020 |
|    87 |     0 |  87 |   0 | POST   | /comment                     | 0.008 | 0.084 |   2.272 | 0.026 | 0.084 |
|    88 |     0 |   0 |   0 | GET    | /admin/banned                | 0.012 | 0.092 |   1.148 | 0.013 | 0.092 |
|   166 |   166 |   0 |   0 | GET    | /login                       | 0.004 | 0.036 |   0.924 | 0.006 | 0.028 |
|    83 |     0 |  83 |   0 | GET    | /logout                      | 0.004 | 0.044 |   0.448 | 0.005 | 0.044 |
|     1 |     1 |   0 |   0 | GET    | /initialize                  | 0.192 | 0.192 |   0.192 | 0.192 | 0.192 |
+-------+-------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+

Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 56556  Time=0.00s (19s)  Lock=0.00s (0s)  Rows=1.0 (56556), isuconp[isuconp]@localhost
  SELECT * FROM `users` WHERE `id` = N

Count: 13964  Time=0.00s (16s)  Lock=0.00s (0s)  Rows=1.0 (13964), isuconp[isuconp]@localhost
  SELECT * FROM `posts` WHERE `id` = N

Count: 160  Time=0.10s (15s)  Lock=0.00s (0s)  Rows=9895.6 (1583300), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `created_at` <= 'S' ORDER BY `created_at` DESC

Count: 20751  Time=0.00s (9s)  Lock=0.00s (0s)  Rows=1.1 (23041), isuconp[isuconp]@localhost
  SELECT * FROM `comments` WHERE `post_id` = N ORDER BY `created_at` DESC LIMIT N

Count: 21873  Time=0.00s (9s)  Lock=0.00s (0s)  Rows=1.0 (21873), isuconp[isuconp]@localhost
  SELECT COUNT(*) AS `count` FROM `comments` WHERE `post_id` = N

Count: 179  Time=0.04s (6s)  Lock=0.00s (0s)  Rows=10.2 (1820), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `user_id` = N ORDER BY `created_at` DESC

Count: 68  Time=0.09s (5s)  Lock=0.00s (0s)  Rows=0.0 (0), isuconp[isuconp]@localhost
  INSERT INTO `posts` (`user_id`, `mime`, `imgdata`, `body`) VALUES (N,'S',_binary'S','S')

画像をキャッシュ
（Conditional GET 未対応？）
{"pass":true,"score":23054,"success":21779,"fail":0,"messages":[]}

+-------+-------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+
| COUNT |  2XX  | 3XX | 5XX | METHOD |             URI              |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+-------+-------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+
|   774 |   774 |   0 |   0 | GET    | /                            | 0.028 | 0.480 | 185.108 | 0.239 | 0.432 |
| 12812 | 12812 |   0 |   0 | GET    | /image/[0-9]+\.(jpg|png|gif) | 0.004 | 0.116 | 165.543 | 0.013 | 0.056 |
|   160 |   160 |   0 |   0 | GET    | /posts                       | 0.096 | 0.732 |  76.746 | 0.480 | 0.676 |
|  1087 |  1087 |   0 |   0 | GET    | /posts/[0-9]+                | 0.004 | 0.172 |  57.292 | 0.053 | 0.136 |
|   175 |   175 |   0 |   0 | GET    | /@\w+                        | 0.064 | 0.544 |  52.542 | 0.300 | 0.508 |
|   555 |     0 | 555 |   0 | POST   | /login                       | 0.004 | 0.244 |  46.420 | 0.084 | 0.184 |
|   139 |     0 |  70 |   0 | POST   | /                            | 0.004 | 0.292 |   9.777 | 0.070 | 0.288 |
|    84 |     0 |  84 |   0 | POST   | /register                    | 0.016 | 0.228 |   9.188 | 0.109 | 0.228 |
|  1407 |  1407 |   0 |   0 | GET    | /favicon.ico                 | 0.004 | 0.064 |   4.648 | 0.003 | 0.024 |
|  1407 |  1407 |   0 |   0 | GET    | /js/main.js                  | 0.016 | 0.068 |   4.221 | 0.003 | 0.024 |
|  1407 |  1407 |   0 |   0 | GET    | /js/timeago.min.js           | 0.008 | 0.032 |   4.108 | 0.003 | 0.020 |
|  1407 |  1407 |   0 |   0 | GET    | /css/style.css               | 0.000 | 0.060 |   3.936 | 0.003 | 0.020 |
|    84 |     0 |  84 |   0 | POST   | /comment                     | 0.008 | 0.096 |   2.336 | 0.028 | 0.096 |
|    84 |     0 |   0 |   0 | GET    | /admin/banned                | 0.004 | 0.056 |   1.088 | 0.013 | 0.056 |
|   167 |   167 |   0 |   0 | GET    | /login                       | 0.004 | 0.040 |   1.084 | 0.006 | 0.032 |
|    83 |     0 |  83 |   0 | GET    | /logout                      | 0.004 | 0.024 |   0.480 | 0.006 | 0.024 |
|     1 |     1 |   0 |   0 | GET    | /initialize                  | 0.284 | 0.284 |   0.284 | 0.284 | 0.284 |
+-------+-------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+

Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 55498  Time=0.00s (19s)  Lock=0.00s (0s)  Rows=1.0 (55498), isuconp[isuconp]@localhost
  SELECT * FROM `users` WHERE `id` = N

Count: 13899  Time=0.00s (15s)  Lock=0.00s (0s)  Rows=1.0 (13899), isuconp[isuconp]@localhost
  SELECT * FROM `posts` WHERE `id` = N

Count: 160  Time=0.09s (14s)  Lock=0.00s (0s)  Rows=9896.0 (1583360), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `created_at` <= 'S' ORDER BY `created_at` DESC

Count: 20600  Time=0.00s (9s)  Lock=0.00s (0s)  Rows=1.1 (22631), isuconp[isuconp]@localhost
  SELECT * FROM `comments` WHERE `post_id` = N ORDER BY `created_at` DESC LIMIT N

Count: 21687  Time=0.00s (8s)  Lock=0.00s (0s)  Rows=1.0 (21687), isuconp[isuconp]@localhost
  SELECT COUNT(*) AS `count` FROM `comments` WHERE `post_id` = N

Count: 175  Time=0.04s (6s)  Lock=0.00s (0s)  Rows=10.4 (1828), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `user_id` = N ORDER BY `created_at` DESC

Count: 69  Time=0.08s (5s)  Lock=0.00s (0s)  Rows=0.0 (0), isuconp[isuconp]@localhost
  INSERT INTO `posts` (`user_id`, `mime`, `imgdata`, `body`) VALUES (N,'S',_binary'S','S')

GET / の N+1 を解消
{"pass":true,"score":23915,"success":22662,"fail":0,"messages":[]}

+-------+-------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+
| COUNT |  2XX  | 3XX | 5XX | METHOD |             URI              |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+-------+-------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+
| 12712 | 12712 |   0 |   0 | GET    | /image/[0-9]+\.(jpg|png|gif) | 0.004 | 0.108 | 202.805 | 0.016 | 0.064 |
|   743 |   743 |   0 |   0 | GET    | /                            | 0.020 | 0.408 | 179.644 | 0.242 | 0.376 |
|   170 |   170 |   0 |   0 | GET    | /posts                       | 0.072 | 0.556 |  61.003 | 0.359 | 0.548 |
|   538 |     0 | 538 |   0 | POST   | /login                       | 0.092 | 0.200 |  46.040 | 0.086 | 0.176 |
|   214 |   214 |   0 |   0 | GET    | /@\w+                        | 0.056 | 0.452 |  44.647 | 0.209 | 0.352 |
|  1301 |  1301 |   0 |   0 | GET    | /posts/[0-9]+                | 0.004 | 0.136 |  38.132 | 0.029 | 0.088 |
|   134 |     0 |  67 |   0 | POST   | /                            | 0.004 | 0.372 |   9.604 | 0.072 | 0.280 |
|    82 |     0 |  82 |   0 | POST   | /register                    | 0.016 | 0.212 |   9.433 | 0.115 | 0.212 |
|  1601 |  1601 |   0 |   0 | GET    | /favicon.ico                 | 0.000 | 0.052 |   6.520 | 0.004 | 0.028 |
|  1601 |  1601 |   0 |   0 | GET    | /js/timeago.min.js           | 0.004 | 0.044 |   6.220 | 0.004 | 0.024 |
|  1601 |  1601 |   0 |   0 | GET    | /css/style.css               | 0.000 | 0.044 |   5.577 | 0.003 | 0.028 |
|  1601 |  1601 |   0 |   0 | GET    | /js/main.js                  | 0.000 | 0.040 |   5.432 | 0.003 | 0.024 |
|    97 |     0 |  97 |   0 | POST   | /comment                     | 0.008 | 0.120 |   3.020 | 0.031 | 0.120 |
|    82 |     0 |   0 |   0 | GET    | /admin/banned                | 0.004 | 0.052 |   1.416 | 0.017 | 0.052 |
|   150 |   150 |   0 |   0 | GET    | /login                       | 0.004 | 0.060 |   1.192 | 0.008 | 0.056 |
|    75 |     0 |  75 |   0 | GET    | /logout                      | 0.004 | 0.048 |   0.492 | 0.007 | 0.048 |
|     1 |     1 |   0 |   0 | GET    | /initialize                  | 0.228 | 0.228 |   0.228 | 0.228 | 0.228 |
+-------+-------+-----+-----+--------+------------------------------+-------+-------+---------+-------+-------+

Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 14013  Time=0.00s (16s)  Lock=0.00s (0s)  Rows=1.0 (14013), isuconp[isuconp]@localhost
  SELECT * FROM `posts` WHERE `id` = N

Count: 170  Time=0.09s (14s)  Lock=0.00s (0s)  Rows=9896.5 (1682400), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `created_at` <= 'S' ORDER BY `created_at` DESC

Count: 20534  Time=0.00s (11s)  Lock=0.00s (0s)  Rows=1.2 (24225), isuconp[isuconp]@localhost
  SELECT c.`id` AS `comment.id`, c.`post_id` AS `comment.post_id`, c.`user_id` AS `comment.user_id`, c.`comment` AS `comment.comment`, c.`created_at` AS `comment.created_at`, u.`id` AS `user.id`, u.`account_name` AS `user.account_name`, u.`passhash` AS `user.passhash`, u.`authority` AS `user.authority`, u.`del_flg` AS `user.del_flg`, u.`created_at` AS `user.created_at` FROM `comments` AS c JOIN `users` AS u ON c.`user_id` = u.`id` WHERE c.`post_id` = N ORDER BY c.`created_at` DESC LIMIT N

Count: 21835  Time=0.00s (8s)  Lock=0.00s (0s)  Rows=1.0 (21835), isuconp[isuconp]@localhost
  SELECT COUNT(*) AS `count` FROM `comments` WHERE `post_id` = N

Count: 22879  Time=0.00s (7s)  Lock=0.00s (0s)  Rows=1.0 (22879), isuconp[isuconp]@localhost
  SELECT * FROM `users` WHERE `id` = N

Count: 214  Time=0.03s (6s)  Lock=0.00s (0s)  Rows=10.2 (2176), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `user_id` = N ORDER BY `created_at` DESC

Count: 67  Time=0.08s (5s)  Lock=0.00s (0s)  Rows=0.0 (0), isuconp[isuconp]@localhost
  INSERT INTO `posts` (`user_id`, `mime`, `imgdata`, `body`) VALUES (N,'S',_binary'S','S')

画像をDBから剥がしてnginxで配信
{"pass":true,"score":46835,"success":45120,"fail":0,"messages":[]}

+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
| COUNT | 2XX  |  3XX  | 5XX | METHOD |             URI              |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
|  1295 | 1295 |     0 |   0 | GET    | /                            | 0.016 | 0.409 | 291.147 | 0.225 | 0.344 |
|   320 |  320 |     0 |   0 | GET    | /posts                       | 0.080 | 0.516 | 112.054 | 0.350 | 0.492 |
|   300 |  300 |     0 |   0 | GET    | /@\w+                        | 0.040 | 0.424 |  66.908 | 0.223 | 0.388 |
|   859 |    0 |   859 |   0 | POST   | /login                       | 0.004 | 0.224 |  63.268 | 0.074 | 0.184 |
|  2143 | 2143 |     0 |   0 | GET    | /posts/[0-9]+                | 0.000 | 0.212 |  46.614 | 0.022 | 0.100 |
|  3004 | 3004 |     0 |   0 | GET    | /favicon.ico                 | 0.000 | 0.064 |   9.827 | 0.003 | 0.028 |
|    91 |    0 |    91 |   0 | POST   | /register                    | 0.016 | 0.212 |   9.473 | 0.104 | 0.212 |
|  3004 | 3004 |     0 |   0 | GET    | /js/timeago.min.js           | 0.000 | 0.076 |   9.405 | 0.003 | 0.024 |
|  3004 | 3004 |     0 |   0 | GET    | /js/main.js                  | 0.000 | 0.100 |   8.464 | 0.003 | 0.028 |
|  3004 | 3004 |     0 |   0 | GET    | /css/style.css               | 0.004 | 0.060 |   8.032 | 0.003 | 0.028 |
|   166 |    0 |    83 |   0 | POST   | /                            | 0.004 | 0.152 |   4.904 | 0.030 | 0.116 |
|   101 |    0 |   101 |   0 | POST   | /comment                     | 0.008 | 0.124 |   3.064 | 0.030 | 0.108 |
|   334 |  334 |     0 |   0 | GET    | /login                       | 0.004 | 0.108 |   2.500 | 0.007 | 0.048 |
|    91 |    0 |     0 |   0 | GET    | /admin/banned                | 0.012 | 0.112 |   1.108 | 0.012 | 0.112 |
|   167 |    0 |   167 |   0 | GET    | /logout                      | 0.000 | 0.060 |   1.052 | 0.006 | 0.060 |
| 27321 | 2101 | 25220 |   0 | GET    | /image/[0-9]+\.(jpg|png|gif) | 0.000 | 0.007 |   0.129 | 0.000 | 0.000 |
|     1 |    1 |     0 |   0 | GET    | /initialize                  | 0.028 | 0.028 |   0.028 | 0.028 | 0.028 |
+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+

Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 320  Time=0.10s (33s)  Lock=0.00s (0s)  Rows=9895.8 (3166640), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `created_at` <= 'S' ORDER BY `created_at` DESC

Count: 35469  Time=0.00s (22s)  Lock=0.00s (0s)  Rows=1.1 (37893), isuconp[isuconp]@localhost
  SELECT c.`id` AS `comment.id`, c.`post_id` AS `comment.post_id`, c.`user_id` AS `comment.user_id`, c.`comment` AS `comment.comment`, c.`created_at` AS `comment.created_at`, u.`id` AS `user.id`, u.`account_name` AS `user.account_name`, u.`passhash` AS `user.passhash`, u.`authority` AS `user.authority`, u.`del_flg` AS `user.del_flg`, u.`created_at` AS `user.created_at` FROM `comments` AS c JOIN `users` AS u ON c.`user_id` = u.`id` WHERE c.`post_id` = N ORDER BY c.`created_at` DESC LIMIT N

Count: 37612  Time=0.00s (14s)  Lock=0.00s (0s)  Rows=1.0 (37612), isuconp[isuconp]@localhost
  SELECT COUNT(*) AS `count` FROM `comments` WHERE `post_id` = N

Count: 38871  Time=0.00s (14s)  Lock=0.00s (0s)  Rows=1.0 (38871), isuconp[isuconp]@localhost
  SELECT * FROM `users` WHERE `id` = N

Count: 300  Time=0.04s (12s)  Lock=0.00s (0s)  Rows=10.0 (2988), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `user_id` = N ORDER BY `created_at` DESC

Count: 300  Time=0.02s (4s)  Lock=0.00s (0s)  Rows=10.0 (2988), isuconp[isuconp]@localhost
  SELECT `id` FROM `posts` WHERE `user_id` = N

Count: 2143  Time=0.00s (2s)  Lock=0.00s (0s)  Rows=9.6 (20678), isuconp[isuconp]@localhost
  SELECT c.`id` AS `comment.id`, c.`post_id` AS `comment.post_id`, c.`user_id` AS `comment.user_id`, c.`comment` AS `comment.comment`, c.`created_at` AS `comment.created_at`, u.`id` AS `user.id`, u.`account_name` AS `user.account_name`, u.`passhash` AS `user.passhash`, u.`authority` AS `user.authority`, u.`del_flg` AS `user.del_flg`, u.`created_at` AS `user.created_at` FROM `comments` AS c JOIN `users` AS u ON c.`user_id` = u.`id` WHERE c.`post_id` = N ORDER BY c.`created_at` DESC

GET /posts で１ページ分に LIMIT
{"pass":true,"score":66329,"success":64202,"fail":0,"messages":[]}

+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
| COUNT | 2XX  |  3XX  | 5XX | METHOD |             URI              |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
|  1686 | 1686 |     0 |   0 | GET    | /                            | 0.016 | 0.292 | 281.171 | 0.167 | 0.256 |
|   601 |  601 |     0 |   0 | GET    | /posts                       | 0.020 | 0.292 | 103.476 | 0.172 | 0.257 |
|  1065 |    0 |  1065 |   0 | POST   | /login                       | 0.004 | 0.216 |  77.330 | 0.073 | 0.176 |
|   398 |  398 |     0 |   0 | GET    | /@\w+                        | 0.020 | 0.376 |  71.466 | 0.180 | 0.316 |
|  2924 | 2924 |     0 |   0 | GET    | /posts/[0-9]+                | 0.004 | 0.068 |  43.213 | 0.015 | 0.048 |
|   112 |    0 |   112 |   0 | POST   | /register                    | 0.016 | 0.200 |  11.244 | 0.100 | 0.196 |
|  4096 | 4096 |     0 |   0 | GET    | /favicon.ico                 | 0.000 | 0.032 |   7.265 | 0.002 | 0.012 |
|  4096 | 4096 |     0 |   0 | GET    | /js/timeago.min.js           | 0.000 | 0.028 |   6.688 | 0.002 | 0.012 |
|  4096 | 4096 |     0 |   0 | GET    | /js/main.js                  | 0.000 | 0.024 |   6.508 | 0.002 | 0.012 |
|  4096 | 4096 |     0 |   0 | GET    | /css/style.css               | 0.000 | 0.048 |   6.273 | 0.002 | 0.012 |
|   208 |    0 |   105 |   0 | POST   | /                            | 0.000 | 0.096 |   5.396 | 0.026 | 0.088 |
|   126 |    0 |   126 |   0 | POST   | /comment                     | 0.008 | 0.052 |   2.260 | 0.018 | 0.052 |
|   415 |  415 |     0 |   0 | GET    | /login                       | 0.000 | 0.028 |   1.672 | 0.004 | 0.016 |
|   112 |    0 |     0 |   0 | GET    | /admin/banned                | 0.004 | 0.024 |   0.840 | 0.008 | 0.024 |
| 40127 | 2709 | 37418 |   0 | GET    | /image/[0-9]+\.(jpg|png|gif) | 0.000 | 0.099 |   0.768 | 0.000 | 0.000 |
|   207 |    0 |   207 |   0 | GET    | /logout                      | 0.000 | 0.024 |   0.696 | 0.003 | 0.016 |
|     1 |    1 |     0 |   0 | GET    | /initialize                  | 0.032 | 0.032 |   0.032 | 0.032 | 0.032 |
+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+

Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 49757  Time=0.00s (33s)  Lock=0.00s (0s)  Rows=1.2 (58014), isuconp[isuconp]@localhost
  SELECT c.`id` AS `comment.id`, c.`post_id` AS `comment.post_id`, c.`user_id` AS `comment.user_id`, c.`comment` AS `comment.comment`, c.`created_at` AS `comment.created_at`, u.`id` AS `user.id`, u.`account_name` AS `user.account_name`, u.`passhash` AS `user.passhash`, u.`authority` AS `user.authority`, u.`del_flg` AS `user.del_flg`, u.`created_at` AS `user.created_at` FROM `comments` AS c JOIN `users` AS u ON c.`user_id` = u.`id` WHERE c.`post_id` = N ORDER BY c.`created_at` DESC LIMIT N

Count: 52681  Time=0.00s (22s)  Lock=0.00s (0s)  Rows=1.0 (52681), isuconp[isuconp]@localhost
  SELECT COUNT(*) AS `count` FROM `comments` WHERE `post_id` = N

Count: 54244  Time=0.00s (20s)  Lock=0.00s (0s)  Rows=1.0 (54244), isuconp[isuconp]@localhost
  SELECT * FROM `users` WHERE `id` = N

Count: 398  Time=0.04s (15s)  Lock=0.00s (0s)  Rows=10.1 (4018), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `user_id` = N ORDER BY `created_at` DESC

Count: 398  Time=0.02s (6s)  Lock=0.00s (0s)  Rows=10.1 (4018), isuconp[isuconp]@localhost
  SELECT `id` FROM `posts` WHERE `user_id` = N

Count: 2924  Time=0.00s (2s)  Lock=0.00s (0s)  Rows=9.7 (28277), isuconp[isuconp]@localhost
  SELECT c.`id` AS `comment.id`, c.`post_id` AS `comment.post_id`, c.`user_id` AS `comment.user_id`, c.`comment` AS `comment.comment`, c.`created_at` AS `comment.created_at`, u.`id` AS `user.id`, u.`account_name` AS `user.account_name`, u.`passhash` AS `user.passhash`, u.`authority` AS `user.authority`, u.`del_flg` AS `user.del_flg`, u.`created_at` AS `user.created_at` FROM `comments` AS c JOIN `users` AS u ON c.`user_id` = u.`id` WHERE c.`post_id` = N ORDER BY c.`created_at` DESC

Count: 1686  Time=0.00s (1s)  Lock=0.00s (0s)  Rows=20.0 (33720), isuconp[isuconp]@localhost
  SELECT p.`id`, p.`user_id`, p.`body`, p.`mime`, p.`created_at` FROM `posts` AS p JOIN `users` AS u ON u.id = p.user_id AND u.del_flg = N ORDER BY p.`created_at` DESC LIMIT N

投稿数、ユーザー一覧を先に取得するようにした
（下がった）
{"pass":true,"score":22552,"success":21625,"fail":0,"messages":[]}

+-------+-----+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
| COUNT | 2XX |  3XX  | 5XX | METHOD |             URI              |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+-------+-----+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
|   736 | 736 |     0 |   0 | GET    | /                            | 0.040 | 0.716 | 317.525 | 0.431 | 0.624 |
|   386 | 386 |     0 |   0 | GET    | /posts/[0-9]+                | 0.032 | 0.500 | 128.284 | 0.332 | 0.484 |
|   260 | 260 |     0 |   0 | GET    | /posts                       | 0.052 | 0.716 | 108.382 | 0.417 | 0.604 |
|    72 |  72 |     0 |   0 | GET    | /@\w+                        | 0.044 | 0.812 |  37.361 | 0.519 | 0.812 |
|   501 |   0 |   501 |   0 | POST   | /login                       | 0.080 | 0.208 |  36.454 | 0.073 | 0.164 |
|    56 |   0 |    56 |   0 | POST   | /register                    | 0.016 | 0.208 |   6.020 | 0.108 | 0.208 |
|   833 | 833 |     0 |   0 | GET    | /favicon.ico                 | 0.000 | 0.076 |   4.176 | 0.005 | 0.036 |
|   833 | 833 |     0 |   0 | GET    | /js/timeago.min.js           | 0.000 | 0.068 |   4.084 | 0.005 | 0.040 |
|    83 |   0 |    42 |   0 | POST   | /                            | 0.000 | 0.120 |   3.280 | 0.040 | 0.120 |
|   833 | 833 |     0 |   0 | GET    | /js/main.js                  | 0.000 | 0.072 |   3.080 | 0.004 | 0.036 |
|   833 | 833 |     0 |   0 | GET    | /css/style.css               | 0.000 | 0.052 |   2.632 | 0.003 | 0.024 |
|   214 | 214 |     0 |   0 | GET    | /login                       | 0.000 | 0.076 |   1.908 | 0.009 | 0.060 |
|    42 |   0 |    42 |   0 | POST   | /comment                     | 0.008 | 0.096 |   1.340 | 0.032 | 0.096 |
|    56 |   0 |     0 |   0 | GET    | /admin/banned                | 0.000 | 0.064 |   0.988 | 0.018 | 0.064 |
|   107 |   0 |   107 |   0 | GET    | /logout                      | 0.000 | 0.068 |   0.780 | 0.007 | 0.048 |
| 15847 | 570 | 15277 |   0 | GET    | /image/[0-9]+\.(jpg|png|gif) | 0.000 | 0.004 |   0.070 | 0.000 | 0.000 |
|     1 |   1 |     0 |   0 | GET    | /initialize                  | 0.020 | 0.020 |   0.020 | 0.020 | 0.020 |
+-------+-----+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+

Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 1454  Time=0.29s (420s)  Lock=0.00s (0s)  Rows=10000.5 (14540718), isuconp[isuconp]@localhost
  SELECT post_id, COUNT(*) AS `count` FROM `comments` GROUP BY `post_id`

Count: 20641  Time=0.00s (15s)  Lock=0.00s (0s)  Rows=1.4 (28046), isuconp[isuconp]@localhost
  SELECT c.`id` AS `comment.id`, c.`post_id` AS `comment.post_id`, c.`user_id` AS `comment.user_id`, c.`comment` AS `comment.comment`, c.`created_at` AS `comment.created_at`, u.`id` AS `user.id`, u.`account_name` AS `user.account_name`, u.`passhash` AS `user.passhash`, u.`authority` AS `user.authority`, u.`del_flg` AS `user.del_flg`, u.`created_at` AS `user.created_at` FROM `comments` AS c JOIN `users` AS u ON c.`user_id` = u.`id` WHERE c.`post_id` = N ORDER BY c.`created_at` DESC LIMIT N

Count: 72  Time=0.07s (4s)  Lock=0.00s (0s)  Rows=10.0 (721), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `user_id` = N ORDER BY `created_at` DESC

Count: 72  Time=0.02s (1s)  Lock=0.00s (0s)  Rows=10.0 (721), isuconp[isuconp]@localhost
  SELECT `id` FROM `posts` WHERE `user_id` = N

Count: 996  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=19.9 (19790), isuconp[isuconp]@localhost
  SELECT * FROM `users` WHERE `id` IN (N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N)

Count: 736  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=20.0 (14720), isuconp[isuconp]@localhost
  SELECT p.`id`, p.`user_id`, p.`body`, p.`mime`, p.`created_at` FROM `posts` AS p JOIN `users` AS u ON u.id = p.user_id AND u.del_flg = N ORDER BY p.`created_at` DESC LIMIT N

Count: 386  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=8.9 (3437), isuconp[isuconp]@localhost
  SELECT c.`id` AS `comment.id`, c.`post_id` AS `comment.post_id`, c.`user_id` AS `comment.user_id`, c.`comment` AS `comment.comment`, c.`created_at` AS `comment.created_at`, u.`id` AS `user.id`, u.`account_name` AS `user.account_name`, u.`passhash` AS `user.passhash`, u.`authority` AS `user.authority`, u.`del_flg` AS `user.del_flg`, u.`created_at` AS `user.created_at` FROM `comments` AS c JOIN `users` AS u ON c.`user_id` = u.`id` WHERE c.`post_id` = N ORDER BY c.`created_at` DESC

投稿数をもとに戻した
{"pass":true,"score":75034,"success":72695,"fail":0,"messages":[]}

+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
| COUNT | 2XX  |  3XX  | 5XX | METHOD |             URI              |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
|  1970 | 1970 |     0 |   0 | GET    | /                            | 0.016 | 0.268 | 251.761 | 0.128 | 0.200 |
|   760 |  760 |     0 |   0 | GET    | /posts                       | 0.012 | 0.260 | 101.503 | 0.134 | 0.204 |
|  1183 |    0 |  1183 |   0 | POST   | /login                       | 0.004 | 0.212 |  94.519 | 0.080 | 0.172 |
|   401 |  401 |     0 |   0 | GET    | /@\w+                        | 0.020 | 0.316 |  62.408 | 0.156 | 0.256 |
|  2840 | 2840 |     0 |   0 | GET    | /posts/[0-9]+                | 0.004 | 0.092 |  48.806 | 0.017 | 0.048 |
|   127 |    0 |   127 |   0 | POST   | /register                    | 0.016 | 0.204 |  13.596 | 0.107 | 0.196 |
|  4201 | 4201 |     0 |   0 | GET    | /favicon.ico                 | 0.000 | 0.028 |   9.340 | 0.002 | 0.012 |
|  4201 | 4201 |     0 |   0 | GET    | /js/timeago.min.js           | 0.000 | 0.032 |   8.924 | 0.002 | 0.012 |
|  4201 | 4201 |     0 |   0 | GET    | /js/main.js                  | 0.000 | 0.036 |   8.250 | 0.002 | 0.012 |
|  4201 | 4201 |     0 |   0 | GET    | /css/style.css               | 0.000 | 0.036 |   8.232 | 0.002 | 0.012 |
|   222 |    0 |   111 |   0 | POST   | /                            | 0.004 | 0.140 |   6.716 | 0.030 | 0.100 |
|   141 |    0 |   141 |   0 | POST   | /comment                     | 0.008 | 0.060 |   2.872 | 0.020 | 0.052 |
|   462 |  462 |     0 |   0 | GET    | /login                       | 0.004 | 0.028 |   2.264 | 0.005 | 0.020 |
|   231 |    0 |   231 |   0 | GET    | /logout                      | 0.000 | 0.036 |   1.164 | 0.005 | 0.024 |
|   127 |    0 |     0 |   0 | GET    | /admin/banned                | 0.004 | 0.036 |   1.088 | 0.009 | 0.036 |
| 47547 | 2448 | 45099 |   0 | GET    | /image/[0-9]+\.(jpg|png|gif) | 0.000 | 0.007 |   0.229 | 0.000 | 0.000 |
|     1 |    1 |     0 |   0 | GET    | /initialize                  | 0.032 | 0.032 |   0.032 | 0.032 | 0.032 |
+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+

Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 58592  Time=0.00s (35s)  Lock=0.00s (0s)  Rows=1.2 (68104), isuconp[isuconp]@localhost
  SELECT c.`id` AS `comment.id`, c.`post_id` AS `comment.post_id`, c.`user_id` AS `comment.user_id`, c.`comment` AS `comment.comment`, c.`created_at` AS `comment.created_at`, u.`id` AS `user.id`, u.`account_name` AS `user.account_name`, u.`passhash` AS `user.passhash`, u.`authority` AS `user.authority`, u.`del_flg` AS `user.del_flg`, u.`created_at` AS `user.created_at` FROM `comments` AS c JOIN `users` AS u ON c.`user_id` = u.`id` WHERE c.`post_id` = N ORDER BY c.`created_at` DESC LIMIT N

Count: 61432  Time=0.00s (23s)  Lock=0.00s (0s)  Rows=1.0 (61432), isuconp[isuconp]@localhost
  SELECT COUNT(*) AS `count` FROM `comments` WHERE `post_id` = N

Count: 401  Time=0.04s (14s)  Lock=0.00s (0s)  Rows=10.0 (3992), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `user_id` = N ORDER BY `created_at` DESC

Count: 401  Time=0.01s (5s)  Lock=0.00s (0s)  Rows=10.0 (3992), isuconp[isuconp]@localhost
  SELECT `id` FROM `posts` WHERE `user_id` = N

Count: 2840  Time=0.00s (2s)  Lock=0.00s (0s)  Rows=9.6 (27294), isuconp[isuconp]@localhost
  SELECT c.`id` AS `comment.id`, c.`post_id` AS `comment.post_id`, c.`user_id` AS `comment.user_id`, c.`comment` AS `comment.comment`, c.`created_at` AS `comment.created_at`, u.`id` AS `user.id`, u.`account_name` AS `user.account_name`, u.`passhash` AS `user.passhash`, u.`authority` AS `user.authority`, u.`del_flg` AS `user.del_flg`, u.`created_at` AS `user.created_at` FROM `comments` AS c JOIN `users` AS u ON c.`user_id` = u.`id` WHERE c.`post_id` = N ORDER BY c.`created_at` DESC

Count: 1970  Time=0.00s (1s)  Lock=0.00s (0s)  Rows=20.0 (39400), isuconp[isuconp]@localhost
  SELECT p.`id`, p.`user_id`, p.`body`, p.`mime`, p.`created_at` FROM `posts` AS p JOIN `users` AS u ON u.id = p.user_id AND u.del_flg = N ORDER BY p.`created_at` DESC LIMIT N

Count: 2731  Time=0.00s (1s)  Lock=0.00s (0s)  Rows=19.8 (54105), isuconp[isuconp]@localhost
  SELECT * FROM `users` WHERE `id` IN (N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N)

MySQL のバッファプールサイズを増やす
（変わらず）
{"pass":true,"score":75232,"success":72917,"fail":0,"messages":[]}

+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
| COUNT | 2XX  |  3XX  | 5XX | METHOD |             URI              |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
|  1963 | 1963 |     0 |   0 | GET    | /                            | 0.012 | 0.300 | 253.652 | 0.129 | 0.200 |
|   750 |  750 |     0 |   0 | GET    | /posts                       | 0.016 | 0.256 | 101.585 | 0.135 | 0.216 |
|  1168 |    0 |  1168 |   0 | POST   | /login                       | 0.004 | 0.232 |  93.601 | 0.080 | 0.192 |
|   405 |  405 |     0 |   0 | GET    | /@\w+                        | 0.024 | 0.312 |  62.759 | 0.155 | 0.268 |
|  2917 | 2917 |     0 |   0 | GET    | /posts/[0-9]+                | 0.004 | 0.192 |  49.293 | 0.017 | 0.048 |
|   126 |    0 |   126 |   0 | POST   | /register                    | 0.016 | 0.192 |  13.633 | 0.108 | 0.192 |
|  4279 | 4279 |     0 |   0 | GET    | /js/timeago.min.js           | 0.000 | 0.040 |   8.860 | 0.002 | 0.012 |
|  4279 | 4279 |     0 |   0 | GET    | /favicon.ico                 | 0.000 | 0.032 |   8.856 | 0.002 | 0.016 |
|  4279 | 4279 |     0 |   0 | GET    | /css/style.css               | 0.000 | 0.040 |   8.161 | 0.002 | 0.012 |
|  4279 | 4279 |     0 |   0 | GET    | /js/main.js                  | 0.000 | 0.036 |   8.092 | 0.002 | 0.012 |
|   222 |    0 |   112 |   0 | POST   | /                            | 0.000 | 0.116 |   6.164 | 0.028 | 0.100 |
|   141 |    0 |   141 |   0 | POST   | /comment                     | 0.008 | 0.052 |   2.756 | 0.020 | 0.048 |
|   454 |  454 |     0 |   0 | GET    | /login                       | 0.000 | 0.028 |   1.988 | 0.004 | 0.020 |
|   126 |    0 |     0 |   0 | GET    | /admin/banned                | 0.012 | 0.040 |   1.188 | 0.009 | 0.036 |
|   227 |    0 |   227 |   0 | GET    | /logout                      | 0.004 | 0.020 |   0.940 | 0.004 | 0.016 |
| 47422 | 2602 | 44820 |   0 | GET    | /image/[0-9]+\.(jpg|png|gif) | 0.000 | 0.010 |   0.226 | 0.000 | 0.000 |
|     1 |    1 |     0 |   0 | GET    | /initialize                  | 0.040 | 0.040 |   0.040 | 0.040 | 0.040 |
+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+

Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 58346  Time=0.00s (35s)  Lock=0.00s (0s)  Rows=1.1 (67077), isuconp[isuconp]@localhost
SELECT c.id AS comment.id, c.post_id AS comment.post_id, c.user_id AS comment.user_id, c.comment AS comment.comment, c.created_at AS comment.created_at, u.id AS user.id, u.account_name AS user.account_name, u.passhash AS user.passhash, u.authority AS user.authority, u.del_flg AS user.del_flg, u.created_at AS user.created_at FROM comments AS c JOIN users AS u ON c.user_id = u.id WHERE c.post_id = N ORDER BY c.created_at DESC LIMIT N
Count: 61263  Time=0.00s (23s)  Lock=0.00s (0s)  Rows=1.0 (61263), isuconp[isuconp]@localhost
SELECT COUNT(*) AS count FROM comments WHERE post_id = N
Count: 405  Time=0.04s (14s)  Lock=0.00s (0s)  Rows=10.1 (4087), isuconp[isuconp]@localhost
SELECT id, user_id, body, mime, created_at FROM posts WHERE user_id = N ORDER BY created_at DESC
Count: 405  Time=0.02s (6s)  Lock=0.00s (0s)  Rows=10.1 (4087), isuconp[isuconp]@localhost
SELECT id FROM posts WHERE user_id = N
Count: 2917  Time=0.00s (2s)  Lock=0.00s (0s)  Rows=9.7 (28255), isuconp[isuconp]@localhost
SELECT c.id AS comment.id, c.post_id AS comment.post_id, c.user_id AS comment.user_id, c.comment AS comment.comment, c.created_at AS comment.created_at, u.id AS user.id, u.account_name AS user.account_name, u.passhash AS user.passhash, u.authority AS user.authority, u.del_flg AS user.del_flg, u.created_at AS user.created_at FROM comments AS c JOIN users AS u ON c.user_id = u.id WHERE c.post_id = N ORDER BY c.created_at DESC
Count: 1963  Time=0.00s (1s)  Lock=0.00s (0s)  Rows=20.0 (39260), isuconp[isuconp]@localhost
SELECT p.id, p.user_id, p.body, p.mime, p.created_at FROM posts AS p JOIN users AS u ON u.id = p.user_id AND u.del_flg = N ORDER BY p.created_at DESC LIMIT N
Count: 2714  Time=0.00s (1s)  Lock=0.00s (0s)  Rows=19.7 (53568), isuconp[isuconp]@localhost
SELECT * FROM users WHERE id IN (N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N)

makePosts の N+1 を潰した
{"pass":true,"score":95005,"success":92362,"fail":0,"messages":[]}

+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
| COUNT | 2XX  |  3XX  | 5XX | METHOD |             URI              |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
|  2550 | 2550 |     0 |   0 | GET    | /                            | 0.008 | 0.172 | 198.907 | 0.078 | 0.132 |
|  1341 |    0 |  1341 |   0 | POST   | /login                       | 0.012 | 0.228 | 124.335 | 0.093 | 0.188 |
|  1140 | 1140 |     0 |   0 | GET    | /posts                       | 0.008 | 0.232 |  97.488 | 0.086 | 0.144 |
|  2726 | 2726 |     0 |   0 | GET    | /posts/[0-9]+                | 0.004 | 0.080 |  55.964 | 0.021 | 0.056 |
|   411 |  411 |     0 |   0 | GET    | /@\w+                        | 0.012 | 0.280 |  49.650 | 0.121 | 0.220 |
|   146 |    0 |   146 |   0 | POST   | /register                    | 0.016 | 0.244 |  18.332 | 0.126 | 0.216 |
|  4531 | 4531 |     0 |   0 | GET    | /favicon.ico                 | 0.000 | 0.028 |  13.573 | 0.003 | 0.016 |
|  4531 | 4531 |     0 |   0 | GET    | /js/timeago.min.js           | 0.000 | 0.032 |  12.228 | 0.003 | 0.016 |
|  4531 | 4531 |     0 |   0 | GET    | /js/main.js                  | 0.000 | 0.056 |  11.913 | 0.003 | 0.016 |
|  4531 | 4531 |     0 |   0 | GET    | /css/style.css               | 0.000 | 0.036 |  11.492 | 0.003 | 0.016 |
|   249 |    0 |   125 |   0 | POST   | /                            | 0.000 | 0.120 |   8.008 | 0.032 | 0.104 |
|   164 |    0 |   164 |   0 | POST   | /comment                     | 0.008 | 0.052 |   3.340 | 0.020 | 0.052 |
|   522 |  522 |     0 |   0 | GET    | /login                       | 0.004 | 0.036 |   2.972 | 0.006 | 0.024 |
|   261 |    0 |   261 |   0 | GET    | /logout                      | 0.004 | 0.028 |   1.516 | 0.006 | 0.024 |
|   146 |    0 |     0 |   0 | GET    | /admin/banned                | 0.004 | 0.044 |   1.504 | 0.010 | 0.032 |
| 64720 | 2461 | 62259 |   0 | GET    | /image/[0-9]+\.(jpg|png|gif) | 0.000 | 0.008 |   0.231 | 0.000 | 0.000 |
|     1 |    1 |     0 |   0 | GET    | /initialize                  | 0.016 | 0.016 |   0.016 | 0.016 | 0.016 |
+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+

Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 80577  Time=0.00s (27s)  Lock=0.00s (0s)  Rows=1.0 (80577), isuconp[isuconp]@localhost
  SELECT COUNT(id) AS `count` FROM `comments` WHERE `post_id` = N

Count: 411  Time=0.03s (13s)  Lock=0.00s (0s)  Rows=9.9 (4051), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `user_id` = N ORDER BY `created_at` DESC

Count: 3692  Time=0.00s (10s)  Lock=0.00s (0s)  Rows=1.4 (5134), isuconp[isuconp]@localhost
  SELECT p.`id` AS `post_id`, c.`id` AS `comment.id`, c.`post_id` AS `comment.post_id`, c.`user_id` AS `comment.user_id`, c.`comment` AS `comment.comment`, c.`created_at` AS `comment.created_at`, u.`id` AS `user.id`, u.`account_name` AS `user.account_name`, u.`passhash` AS `user.passhash`, u.`authority` AS `user.authority`, u.`del_flg` AS `user.del_flg`, u.`created_at` AS `user.created_at` FROM `comments` AS c JOIN `users` AS u ON c.`user_id` = u.`id` JOIN `posts` AS p ON p.`id` = c.`post_id` AND p.`id` IN (N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N) ORDER BY c.`created_at` DESC LIMIT N

Count: 411  Time=0.01s (5s)  Lock=0.00s (0s)  Rows=9.9 (4051), isuconp[isuconp]@localhost
  SELECT `id` FROM `posts` WHERE `user_id` = N

Count: 2726  Time=0.00s (2s)  Lock=0.00s (0s)  Rows=9.6 (26106), isuconp[isuconp]@localhost
  SELECT p.`id` AS `post_id`, c.`id` AS `comment.id`, c.`post_id` AS `comment.post_id`, c.`user_id` AS `comment.user_id`, c.`comment` AS `comment.comment`, c.`created_at` AS `comment.created_at`, u.`id` AS `user.id`, u.`account_name` AS `user.account_name`, u.`passhash` AS `user.passhash`, u.`authority` AS `user.authority`, u.`del_flg` AS `user.del_flg`, u.`created_at` AS `user.created_at` FROM `comments` AS c JOIN `users` AS u ON c.`user_id` = u.`id` JOIN `posts` AS p ON p.`id` = c.`post_id` AND p.`id` IN (N) ORDER BY c.`created_at` DESC

Count: 3692  Time=0.00s (1s)  Lock=0.00s (0s)  Rows=19.7 (72572), isuconp[isuconp]@localhost
  SELECT * FROM `users` WHERE `id` IN (N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N)

Count: 2550  Time=0.00s (1s)  Lock=0.00s (0s)  Rows=20.0 (51000), isuconp[isuconp]@localhost
  SELECT p.`id`, p.`user_id`, p.`body`, p.`mime`, p.`created_at` FROM `posts` AS p JOIN `users` AS u ON u.id = p.user_id AND u.del_flg = N ORDER BY p.`created_at` DESC LIMIT N

コメント数用のテーブルを作った
{"pass":true,"score":118673,"success":115907,"fail":0,"messages":[]}

+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
| COUNT | 2XX  |  3XX  | 5XX | METHOD |             URI              |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
|  1395 |    0 |  1395 |   0 | POST   | /login                       | 0.004 | 0.280 | 142.886 | 0.102 | 0.216 |
|  3072 | 3072 |     0 |   0 | GET    | /                            | 0.004 | 0.152 | 140.321 | 0.046 | 0.108 |
|  1900 | 1900 |     0 |   0 | GET    | /posts                       | 0.008 | 0.144 |  86.445 | 0.045 | 0.112 |
|  2173 | 2173 |     0 |   0 | GET    | /posts/[0-9]+                | 0.004 | 0.096 |  61.257 | 0.028 | 0.076 |
|   365 |  365 |     0 |   0 | GET    | /@\w+                        | 0.016 | 0.248 |  40.196 | 0.110 | 0.240 |
|  4369 | 4369 |     0 |   0 | GET    | /favicon.ico                 | 0.000 | 0.044 |  21.833 | 0.005 | 0.024 |
|   163 |    0 |   163 |   0 | POST   | /register                    | 0.016 | 0.256 |  21.442 | 0.132 | 0.232 |
|  4369 | 4369 |     0 |   0 | GET    | /js/timeago.min.js           | 0.000 | 0.044 |  20.297 | 0.005 | 0.024 |
|  4369 | 4369 |     0 |   0 | GET    | /css/style.css               | 0.000 | 0.044 |  18.732 | 0.004 | 0.024 |
|  4369 | 4369 |     0 |   0 | GET    | /js/main.js                  | 0.000 | 0.044 |  18.216 | 0.004 | 0.024 |
|   258 |    0 |   129 |   0 | POST   | /                            | 0.004 | 0.140 |   9.896 | 0.038 | 0.120 |
|   176 |    0 |   176 |   0 | POST   | /comment                     | 0.004 | 0.076 |   6.092 | 0.035 | 0.076 |
|   532 |  532 |     0 |   0 | GET    | /login                       | 0.004 | 0.032 |   4.536 | 0.009 | 0.032 |
|   163 |    0 |     0 |   0 | GET    | /admin/banned                | 0.004 | 0.056 |   2.336 | 0.014 | 0.048 |
|   266 |    0 |   266 |   0 | GET    | /logout                      | 0.008 | 0.040 |   2.136 | 0.008 | 0.028 |
| 88105 | 2077 | 86028 |   0 | GET    | /image/[0-9]+\.(jpg|png|gif) | 0.000 | 0.012 |   0.244 | 0.000 | 0.000 |
|     1 |    1 |     0 |   0 | GET    | /initialize                  | 0.224 | 0.224 |   0.224 | 0.224 | 0.224 |
+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+

Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 4973  Time=0.01s (27s)  Lock=0.00s (0s)  Rows=8.6 (42936), isuconp[isuconp]@localhost
  SELECT * FROM `comment_count` WHERE `post_id` IN (N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N)

Count: 4973  Time=0.00s (16s)  Lock=0.00s (0s)  Rows=1.5 (7540), isuconp[isuconp]@localhost
  SELECT p.`id` AS `post_id`, c.`id` AS `comment.id`, c.`post_id` AS `comment.post_id`, c.`user_id` AS `comment.user_id`, c.`comment` AS `comment.comment`, c.`created_at` AS `comment.created_at`, u.`id` AS `user.id`, u.`account_name` AS `user.account_name`, u.`passhash` AS `user.passhash`, u.`authority` AS `user.authority`, u.`del_flg` AS `user.del_flg`, u.`created_at` AS `user.created_at` FROM `comments` AS c JOIN `users` AS u ON c.`user_id` = u.`id` JOIN `posts` AS p ON p.`id` = c.`post_id` AND p.`id` IN (N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N) ORDER BY c.`created_at` DESC LIMIT N

Count: 365  Time=0.03s (12s)  Lock=0.00s (0s)  Rows=10.0 (3656), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `user_id` = N ORDER BY `created_at` DESC

Count: 365  Time=0.01s (4s)  Lock=0.00s (0s)  Rows=10.0 (3656), isuconp[isuconp]@localhost
  SELECT `id` FROM `posts` WHERE `user_id` = N

Count: 4973  Time=0.00s (3s)  Lock=0.00s (0s)  Rows=19.5 (97030), isuconp[isuconp]@localhost
  SELECT * FROM `users` WHERE `id` IN (N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N)

Count: 3072  Time=0.00s (2s)  Lock=0.00s (0s)  Rows=20.0 (61440), isuconp[isuconp]@localhost
  SELECT p.`id`, p.`user_id`, p.`body`, p.`mime`, p.`created_at` FROM `posts` AS p JOIN `users` AS u ON u.id = p.user_id AND u.del_flg = N ORDER BY p.`created_at` DESC LIMIT N

Count: 2173  Time=0.00s (1s)  Lock=0.00s (0s)  Rows=9.4 (20525), isuconp[isuconp]@localhost
  SELECT p.`id` AS `post_id`, c.`id` AS `comment.id`, c.`post_id` AS `comment.post_id`, c.`user_id` AS `comment.user_id`, c.`comment` AS `comment.comment`, c.`created_at` AS `comment.created_at`, u.`id` AS `user.id`, u.`account_name` AS `user.account_name`, u.`passhash` AS `user.passhash`, u.`authority` AS `user.authority`, u.`del_flg` AS `user.del_flg`, u.`created_at` AS `user.created_at` FROM `comments` AS c JOIN `users` AS u ON c.`user_id` = u.`id` JOIN `posts` AS p ON p.`id` = c.`post_id` AND p.`id` IN (N) ORDER BY c.`created_at` DESC

post の投稿時に comment_count を更新していなかったのを修正
{"pass":true,"score":129625,"success":126768,"fail":0,"messages":[]}

+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
| COUNT | 2XX  |  3XX  | 5XX | METHOD |             URI              |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
|  1445 |    0 |  1445 |   0 | POST   | /login                       | 0.008 | 0.228 | 146.842 | 0.102 | 0.200 |
|  3304 | 3304 |     0 |   0 | GET    | /                            | 0.004 | 0.156 | 127.313 | 0.039 | 0.104 |
|  2140 | 2140 |     0 |   0 | GET    | /posts                       | 0.004 | 0.180 |  83.267 | 0.039 | 0.096 |
|  2268 | 2268 |     0 |   0 | GET    | /posts/[0-9]+                | 0.000 | 0.092 |  58.653 | 0.026 | 0.072 |
|   383 |  383 |     0 |   0 | GET    | /@\w+                        | 0.016 | 0.296 |  37.537 | 0.098 | 0.236 |
|  4661 | 4661 |     0 |   0 | GET    | /favicon.ico                 | 0.000 | 0.044 |  24.332 | 0.005 | 0.024 |
|   170 |    0 |   170 |   0 | POST   | /register                    | 0.016 | 0.252 |  22.413 | 0.132 | 0.236 |
|  4661 | 4661 |     0 |   0 | GET    | /js/timeago.min.js           | 0.004 | 0.040 |  21.804 | 0.005 | 0.024 |
|  4661 | 4661 |     0 |   0 | GET    | /js/main.js                  | 0.000 | 0.040 |  20.009 | 0.004 | 0.020 |
|  4661 | 4661 |     0 |   0 | GET    | /css/style.css               | 0.000 | 0.056 |  19.907 | 0.004 | 0.024 |
|   264 |    0 |   132 |   0 | POST   | /                            | 0.004 | 0.152 |  11.357 | 0.043 | 0.128 |
|   186 |    0 |   186 |   0 | POST   | /comment                     | 0.008 | 0.080 |   6.068 | 0.033 | 0.080 |
|   550 |  550 |     0 |   0 | GET    | /login                       | 0.004 | 0.044 |   5.044 | 0.009 | 0.032 |
|   170 |    0 |     0 |   0 | GET    | /admin/banned                | 0.000 | 0.052 |   2.424 | 0.014 | 0.048 |
|   275 |    0 |   275 |   0 | GET    | /logout                      | 0.004 | 0.048 |   2.384 | 0.009 | 0.032 |
|     1 |    1 |     0 |   0 | GET    | /initialize                  | 0.272 | 0.272 |   0.272 | 0.272 | 0.272 |
| 97112 | 2114 | 94998 |   0 | GET    | /image/[0-9]+\.(jpg|png|gif) | 0.000 | 0.007 |   0.224 | 0.000 | 0.000 |
+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+

Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 5446  Time=0.00s (16s)  Lock=0.00s (0s)  Rows=1.7 (9042), isuconp[isuconp]@localhost
  SELECT p.`id` AS `post_id`, c.`id` AS `comment.id`, c.`post_id` AS `comment.post_id`, c.`user_id` AS `comment.user_id`, c.`comment` AS `comment.comment`, c.`created_at` AS `comment.created_at`, u.`id` AS `user.id`, u.`account_name` AS `user.account_name`, u.`passhash` AS `user.passhash`, u.`authority` AS `user.authority`, u.`del_flg` AS `user.del_flg`, u.`created_at` AS `user.created_at` FROM `comments` AS c JOIN `users` AS u ON c.`user_id` = u.`id` JOIN `posts` AS p ON p.`id` = c.`post_id` AND p.`id` IN (N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N) ORDER BY c.`created_at` DESC LIMIT N

Count: 5446  Time=0.00s (13s)  Lock=0.00s (0s)  Rows=20.0 (108920), isuconp[isuconp]@localhost
  SELECT * FROM `comment_count` WHERE `post_id` IN (N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N)

Count: 383  Time=0.03s (11s)  Lock=0.00s (0s)  Rows=10.0 (3818), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `user_id` = N ORDER BY `created_at` DESC

Count: 383  Time=0.01s (3s)  Lock=0.00s (0s)  Rows=10.0 (3818), isuconp[isuconp]@localhost
  SELECT `id` FROM `posts` WHERE `user_id` = N

Count: 5446  Time=0.00s (2s)  Lock=0.00s (0s)  Rows=19.8 (107620), isuconp[isuconp]@localhost
  SELECT * FROM `users` WHERE `id` IN (N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N)

Count: 3304  Time=0.00s (2s)  Lock=0.00s (0s)  Rows=20.0 (66080), isuconp[isuconp]@localhost
  SELECT p.`id`, p.`user_id`, p.`body`, p.`mime`, p.`created_at` FROM `posts` AS p JOIN `users` AS u ON u.id = p.user_id AND u.del_flg = N ORDER BY p.`created_at` DESC LIMIT N

Count: 318  Time=0.01s (2s)  Lock=0.00s (0s)  Rows=0.0 (0), isuconp[isuconp]@localhost
  COMMIT

tempalte のコンパイルを最初にやる
（あまり変わらず）
{"pass":true,"score":137106,"success":134243,"fail":0,"messages":[]}

+--------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
| COUNT  | 2XX  |  3XX  | 5XX | METHOD |             URI              |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+--------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
|   1457 |    0 |  1457 |   0 | POST   | /login                       | 0.004 | 0.308 | 153.993 | 0.106 | 0.224 |
|   3479 | 3479 |     0 |   0 | GET    | /                            | 0.004 | 0.152 | 130.590 | 0.038 | 0.104 |
|   2170 | 2170 |     0 |   0 | GET    | /posts                       | 0.004 | 0.140 |  83.929 | 0.039 | 0.104 |
|   2576 | 2576 |     0 |   0 | GET    | /posts/[0-9]+                | 0.004 | 0.096 |  56.170 | 0.022 | 0.064 |
|    404 |  404 |     0 |   0 | GET    | /@\w+                        | 0.016 | 0.252 |  42.148 | 0.104 | 0.232 |
|    171 |    0 |   171 |   0 | POST   | /register                    | 0.016 | 0.244 |  21.949 | 0.128 | 0.236 |
|   5184 | 5184 |     0 |   0 | GET    | /favicon.ico                 | 0.000 | 0.048 |  21.149 | 0.004 | 0.020 |
|   5184 | 5184 |     0 |   0 | GET    | /js/timeago.min.js           | 0.000 | 0.032 |  18.884 | 0.004 | 0.020 |
|   5184 | 5184 |     0 |   0 | GET    | /js/main.js                  | 0.000 | 0.036 |  18.148 | 0.004 | 0.020 |
|   5184 | 5184 |     0 |   0 | GET    | /css/style.css               | 0.004 | 0.040 |  17.404 | 0.003 | 0.020 |
|    264 |    0 |   132 |   0 | POST   | /                            | 0.004 | 0.132 |   9.852 | 0.037 | 0.128 |
|    179 |    0 |   179 |   0 | POST   | /comment                     | 0.008 | 0.080 |   5.584 | 0.031 | 0.080 |
|    562 |  562 |     0 |   0 | GET    | /login                       | 0.000 | 0.052 |   3.608 | 0.006 | 0.028 |
|    171 |    0 |     0 |   0 | GET    | /admin/banned                | 0.004 | 0.048 |   2.084 | 0.012 | 0.040 |
|    281 |    0 |   281 |   0 | GET    | /logout                      | 0.004 | 0.028 |   1.980 | 0.007 | 0.028 |
|      1 |    1 |     0 |   0 | GET    | /initialize                  | 0.272 | 0.272 |   0.272 | 0.272 | 0.272 |
| 101942 | 2332 | 99610 |   0 | GET    | /image/[0-9]+\.(jpg|png|gif) | 0.000 | 0.009 |   0.255 | 0.000 | 0.000 |
+--------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+

Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 5651  Time=0.00s (26s)  Lock=0.00s (0s)  Rows=20.0 (113020), isuconp[isuconp]@localhost
  SELECT * FROM `comment_count` WHERE `post_id` IN (N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N)

Count: 5651  Time=0.00s (19s)  Lock=0.00s (0s)  Rows=1.5 (8703), isuconp[isuconp]@localhost
  SELECT p.`id` AS `post_id`, c.`id` AS `comment.id`, c.`post_id` AS `comment.post_id`, c.`user_id` AS `comment.user_id`, c.`comment` AS `comment.comment`, c.`created_at` AS `comment.created_at`, u.`id` AS `user.id`, u.`account_name` AS `user.account_name`, u.`passhash` AS `user.passhash`, u.`authority` AS `user.authority`, u.`del_flg` AS `user.del_flg`, u.`created_at` AS `user.created_at` FROM `comments` AS c JOIN `users` AS u ON c.`user_id` = u.`id` JOIN `posts` AS p ON p.`id` = c.`post_id` AND p.`id` IN (N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N) ORDER BY c.`created_at` DESC LIMIT N

Count: 404  Time=0.03s (13s)  Lock=0.00s (0s)  Rows=10.0 (4041), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `user_id` = N ORDER BY `created_at` DESC

Count: 404  Time=0.01s (5s)  Lock=0.00s (0s)  Rows=10.0 (4041), isuconp[isuconp]@localhost
  SELECT `id` FROM `posts` WHERE `user_id` = N

Count: 5651  Time=0.00s (3s)  Lock=0.00s (0s)  Rows=19.6 (110526), isuconp[isuconp]@localhost
  SELECT * FROM `users` WHERE `id` IN (N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N)

Count: 3479  Time=0.00s (2s)  Lock=0.00s (0s)  Rows=20.0 (69580), isuconp[isuconp]@localhost
  SELECT p.`id`, p.`user_id`, p.`body`, p.`mime`, p.`created_at` FROM `posts` AS p JOIN `users` AS u ON u.id = p.user_id AND u.del_flg = N ORDER BY p.`created_at` DESC LIMIT N

Count: 311  Time=0.01s (2s)  Lock=0.00s (0s)  Rows=0.0 (0), isuconp[isuconp]@localhost
  COMMIT

getAccountName で LIMIT できるところがあったので LIMIT
{"pass":true,"score":141665,"success":138787,"fail":0,"messages":[]}

+--------+------+--------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
| COUNT  | 2XX  |  3XX   | 5XX | METHOD |             URI              |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+--------+------+--------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
|   1466 |    0 |   1466 |   0 | POST   | /login                       | 0.004 | 0.284 | 153.722 | 0.105 | 0.220 |
|   3609 | 3609 |      0 |   0 | GET    | /                            | 0.004 | 0.136 | 120.970 | 0.034 | 0.096 |
|   2280 | 2280 |      0 |   0 | GET    | /posts                       | 0.004 | 0.124 |  82.579 | 0.036 | 0.096 |
|   2442 | 2442 |      0 |   0 | GET    | /posts/[0-9]+                | 0.000 | 0.096 |  53.329 | 0.022 | 0.068 |
|    390 |  390 |      0 |   0 | GET    | /@\w+                        | 0.020 | 0.352 |  48.856 | 0.125 | 0.272 |
|    174 |    0 |    174 |   0 | POST   | /register                    | 0.016 | 0.236 |  23.260 | 0.134 | 0.228 |
|   5172 | 5172 |      0 |   0 | GET    | /favicon.ico                 | 0.000 | 0.048 |  21.649 | 0.004 | 0.020 |
|   5172 | 5172 |      0 |   0 | GET    | /js/timeago.min.js           | 0.000 | 0.040 |  19.240 | 0.004 | 0.020 |
|   5172 | 5172 |      0 |   0 | GET    | /js/main.js                  | 0.000 | 0.044 |  18.580 | 0.004 | 0.020 |
|   5172 | 5172 |      0 |   0 | GET    | /css/style.css               | 0.000 | 0.032 |  17.592 | 0.003 | 0.020 |
|    266 |    0 |    133 |   0 | POST   | /                            | 0.004 | 0.145 |  10.350 | 0.039 | 0.120 |
|    174 |    0 |    174 |   0 | POST   | /comment                     | 0.004 | 0.080 |   5.164 | 0.030 | 0.072 |
|    568 |  568 |      0 |   0 | GET    | /login                       | 0.000 | 0.036 |   3.632 | 0.006 | 0.028 |
|    174 |    0 |      0 |   0 | GET    | /admin/banned                | 0.004 | 0.044 |   2.164 | 0.012 | 0.036 |
|    284 |    0 |    284 |   0 | GET    | /logout                      | 0.000 | 0.032 |   2.084 | 0.007 | 0.028 |
| 106423 | 2293 | 104130 |   0 | GET    | /image/[0-9]+\.(jpg|png|gif) | 0.000 | 0.008 |   0.278 | 0.000 | 0.000 |
|      1 |    1 |      0 |   0 | GET    | /initialize                  | 0.268 | 0.268 |   0.268 | 0.268 | 0.268 |
+--------+------+--------+-----+--------+------------------------------+-------+-------+---------+-------+-------+

Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 390  Time=0.06s (24s)  Lock=0.00s (0s)  Rows=10.1 (3925), isuconp[isuconp]@localhost
  SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `user_id` = N ORDER BY `created_at` DESC LIMIT N

Count: 5889  Time=0.00s (18s)  Lock=0.00s (0s)  Rows=1.6 (9599), isuconp[isuconp]@localhost
  SELECT p.`id` AS `post_id`, c.`id` AS `comment.id`, c.`post_id` AS `comment.post_id`, c.`user_id` AS `comment.user_id`, c.`comment` AS `comment.comment`, c.`created_at` AS `comment.created_at`, u.`id` AS `user.id`, u.`account_name` AS `user.account_name`, u.`passhash` AS `user.passhash`, u.`authority` AS `user.authority`, u.`del_flg` AS `user.del_flg`, u.`created_at` AS `user.created_at` FROM `comments` AS c JOIN `users` AS u ON c.`user_id` = u.`id` JOIN `posts` AS p ON p.`id` = c.`post_id` AND p.`id` IN (N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N) ORDER BY c.`created_at` DESC LIMIT N

Count: 5889  Time=0.00s (12s)  Lock=0.00s (0s)  Rows=20.0 (117780), isuconp[isuconp]@localhost
  SELECT * FROM `comment_count` WHERE `post_id` IN (N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N)

Count: 390  Time=0.01s (4s)  Lock=0.00s (0s)  Rows=10.1 (3926), isuconp[isuconp]@localhost
  SELECT `id` FROM `posts` WHERE `user_id` = N

Count: 5889  Time=0.00s (3s)  Lock=0.00s (0s)  Rows=19.7 (116003), isuconp[isuconp]@localhost
  SELECT * FROM `users` WHERE `id` IN (N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N)

Count: 3609  Time=0.00s (2s)  Lock=0.00s (0s)  Rows=20.0 (72180), isuconp[isuconp]@localhost
  SELECT p.`id`, p.`user_id`, p.`body`, p.`mime`, p.`created_at` FROM `posts` AS p JOIN `users` AS u ON u.id = p.user_id AND u.del_flg = N ORDER BY p.`created_at` DESC LIMIT N

Count: 307  Time=0.01s (2s)  Lock=0.00s (0s)  Rows=0.0 (0), isuconp[isuconp]@localhost
  COMMIT

posts に user_id と created_at のインデックス追加
（下がった）
{"pass":true,"score":66976,"success":66167,"fail":0,"messages":[]}

+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
| COUNT | 2XX  |  3XX  | 5XX | METHOD |             URI              |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+
|   541 |  541 |     0 |   0 | GET    | /                            | 0.040 | 0.972 | 402.837 | 0.745 | 0.940 |
|   120 |  120 |     0 |   0 | GET    | /posts                       | 0.220 | 1.124 | 110.702 | 0.923 | 1.064 |
|  7368 | 7368 |     0 |   0 | GET    | /posts/[0-9]+                | 0.004 | 0.060 |  53.495 | 0.007 | 0.032 |
|   773 |  773 |     0 |   0 | GET    | /@\w+                        | 0.004 | 0.096 |  21.020 | 0.027 | 0.080 |
|   406 |    0 |   406 |   0 | POST   | /login                       | 0.004 | 0.140 |  13.788 | 0.034 | 0.112 |
|  8288 | 8288 |     0 |   0 | GET    | /js/main.js                  | 0.000 | 0.012 |   4.428 | 0.001 | 0.004 |
|  8288 | 8288 |     0 |   0 | GET    | /js/timeago.min.js           | 0.000 | 0.012 |   4.413 | 0.001 | 0.004 |
|  8288 | 8288 |     0 |   0 | GET    | /favicon.ico                 | 0.000 | 0.012 |   4.360 | 0.001 | 0.004 |
|  8288 | 8288 |     0 |   0 | GET    | /css/style.css               | 0.000 | 0.012 |   4.232 | 0.001 | 0.004 |
|    38 |    0 |    38 |   0 | POST   | /register                    | 0.016 | 0.148 |   2.120 | 0.056 | 0.148 |
|    74 |    0 |    37 |   0 | POST   | /                            | 0.004 | 0.108 |   1.900 | 0.026 | 0.108 |
|    69 |    0 |    69 |   0 | POST   | /comment                     | 0.008 | 0.044 |   1.177 | 0.017 | 0.044 |
|     1 |    1 |     0 |   0 | GET    | /initialize                  | 0.228 | 0.228 |   0.228 | 0.228 | 0.228 |
|   150 |  150 |     0 |   0 | GET    | /login                       | 0.000 | 0.016 |   0.225 | 0.002 | 0.008 |
| 23401 | 5087 | 18314 |   0 | GET    | /image/[0-9]+\.(jpg|png|gif) | 0.000 | 0.005 |   0.187 | 0.000 | 0.000 |
|    38 |    0 |     0 |   0 | GET    | /admin/banned                | 0.000 | 0.012 |   0.148 | 0.004 | 0.012 |
|    75 |    0 |    75 |   0 | GET    | /logout                      | 0.000 | 0.008 |   0.108 | 0.001 | 0.008 |
+-------+------+-------+-----+--------+------------------------------+-------+-------+---------+-------+-------+

Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 541  Time=0.72s (387s)  Lock=0.00s (0s)  Rows=20.0 (10820), isuconp[isuconp]@localhost
  SELECT p.`id`, p.`user_id`, p.`body`, p.`mime`, p.`created_at` FROM `posts` AS p JOIN `users` AS u ON u.id = p.user_id AND u.del_flg = N ORDER BY p.`created_at` DESC LIMIT N

Count: 120  Time=0.87s (104s)  Lock=0.00s (0s)  Rows=20.0 (2400), isuconp[isuconp]@localhost
  SELECT p.`id`, p.`user_id`, p.`body`, p.`mime`, p.`created_at` FROM `posts` AS p JOIN `users` AS u ON u.`id` = p.`user_id` AND u.`del_flg` = N WHERE p.`created_at` <= 'S' ORDER BY p.`created_at` DESC LIMIT N

Count: 7368  Time=0.00s (18s)  Lock=0.00s (0s)  Rows=9.9 (73214), isuconp[isuconp]@localhost
  SELECT p.`id` AS `post_id`, c.`id` AS `comment.id`, c.`post_id` AS `comment.post_id`, c.`user_id` AS `comment.user_id`, c.`comment` AS `comment.comment`, c.`created_at` AS `comment.created_at`, u.`id` AS `user.id`, u.`account_name` AS `user.account_name`, u.`passhash` AS `user.passhash`, u.`authority` AS `user.authority`, u.`del_flg` AS `user.del_flg`, u.`created_at` AS `user.created_at` FROM `comments` AS c JOIN `users` AS u ON c.`user_id` = u.`id` JOIN `posts` AS p ON p.`id` = c.`post_id` AND p.`id` IN (N) ORDER BY c.`created_at` DESC

Count: 666  Time=0.01s (7s)  Lock=0.00s (0s)  Rows=2.1 (1377), isuconp[isuconp]@localhost
  SELECT p.`id` AS `post_id`, c.`id` AS `comment.id`, c.`post_id` AS `comment.post_id`, c.`user_id` AS `comment.user_id`, c.`comment` AS `comment.comment`, c.`created_at` AS `comment.created_at`, u.`id` AS `user.id`, u.`account_name` AS `user.account_name`, u.`passhash` AS `user.passhash`, u.`authority` AS `user.authority`, u.`del_flg` AS `user.del_flg`, u.`created_at` AS `user.created_at` FROM `comments` AS c JOIN `users` AS u ON c.`user_id` = u.`id` JOIN `posts` AS p ON p.`id` = c.`post_id` AND p.`id` IN (N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N) ORDER BY c.`created_at` DESC LIMIT N

Count: 7368  Time=0.00s (4s)  Lock=0.00s (0s)  Rows=1.0 (7368), isuconp[isuconp]@localhost
  SELECT * FROM `posts` WHERE `id` = N

Count: 7368  Time=0.00s (4s)  Lock=0.00s (0s)  Rows=1.0 (7368), isuconp[isuconp]@localhost
  SELECT * FROM `users` WHERE `id` IN (N)

Count: 7368  Time=0.00s (3s)  Lock=0.00s (0s)  Rows=1.0 (7368), isuconp[isuconp]@localhost
  SELECT * FROM `comment_count` WHERE `post_id` IN (N)

ギブアップ
ログを止めた
{"pass":true,"score":147671,"success":144715,"fail":0,"messages":[]}

ISUCON本を読んだあとのネタバレ

コメント数の取得などは memcached などでキャッシュすると良かった
https://github.com/youdofoo/private-isu-study/issues/1#issuecomment-1146779117 で下がったのは正しくインデックスを使えていなかったため。FORCE INDEX を指定すればよかった
ハッシュ化は言語のライブラリを使えばよかった
binログを無効化したりして INSERT 負荷を低減


RealmObject equals are probably not correct

When reading objects from Realm, we use their default equals implementation, which compares by memory reference. This means that the following behavior can be observed:
realm.writeBlocking {
            val result = copyToRealm(sample)
            val obj1 = result.nullableObject
            val obj2 = result.nullableObject
            assertNotEquals(obj1, obj2) // Managed objects use default `equals`, i.e. compare mem ref.
}

This is probably not what you would expect, and we should consider if managed objects should have their own equals implementation that compare <ClassKey,ObjectKey,Version> instead. It would probably have to be implemented in the Compiler Plugin so we can avoid generating it if users have their own equals method.

Any update on this? Is currently the only option is to compare value by value aka deepEquals?

@cmelchior tagging you as reporter

It appears this issue fell through the cracks and should be fixed soon.


Add nethack-console package

Does not require any X11 deps and verified in a clean debian:jessie Docker container
root@bb558527e74a:/# apt-cache depends nethack-console
nethack-console
  Depends: nethack-common
  Depends: libc6
  Depends: libncurses5
  Depends: libtinfo5

You might have to pin it to stretch, because of weechat pulling in versions of libncurses and libtinfo from it.
@lrvick The weechat pins don't feel so clever anymore; I would be in favor of building jessie-backport versions (or even better, prod Debian into doing it) ...

nethack-console is already installed.


Authentication: SAML Integration Support

Describe the feature
The solution currently only supports OIDC authentication. Please support SAML.
Use Case
One of my customer is using SAML for authentication.
Proposed Solution
No response
Other Information
No response
Solution version used
latest

Thanks, we will review and add to our backlog if appropriate.


adding additional resources to Store commerce article

:x: Organization membership check failed
Members of the MicrosoftDocs organization should use the private repo. Please move your changes to https://github.com/MicrosoftDocs/Dynamics-365-Operations, and close this pull request.


[stubs] include unistd.h to repair swift-threading-package=none build

syscall and read were missing when swift-threading-package=none since https://github.com/apple/swift/pull/59287/ has been merged.
It results build failure with such configuration: e.g. https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-20.04-webassembly/407/console
/home/buildbot/jenkins/workspace/oss-swift-RA-linux-ubuntu-20.04-webassembly/swift/stdlib/public/stubs/Random.cpp:93:9: error: use of undeclared identifier 'syscall'
      !(syscall(__NR_getrandom, nullptr, 0, 0) == -1 && errno == ENOSYS);
        ^
/home/buildbot/jenkins/workspace/oss-swift-RA-linux-ubuntu-20.04-webassembly/swift/stdlib/public/stubs/Random.cpp:96:35: error: use of undeclared identifier 'syscall'
      actual_nbytes = WHILE_EINTR(syscall(__NR_getrandom, buf, nbytes, 0));
                                  ^
/home/buildbot/jenkins/workspace/oss-swift-RA-linux-ubuntu-20.04-webassembly/swift/stdlib/public/stubs/Random.cpp:96:35: error: use of undeclared identifier 'syscall'
/home/buildbot/jenkins/workspace/oss-swift-RA-linux-ubuntu-20.04-webassembly/swift/stdlib/public/stubs/Random.cpp:96:35: error: use of undeclared identifier 'syscall'
/home/buildbot/jenkins/workspace/oss-swift-RA-linux-ubuntu-20.04-webassembly/swift/stdlib/public/stubs/Random.cpp:114:39: error: use of undeclared identifier 'read'; did you mean '_IO_cookie_io_functions_t::read'?
          actual_nbytes = WHILE_EINTR(read(fd, buf, nbytes));
                                      ^~~~
                                      _IO_cookie_io_functions_t::read

@swift-ci Please smoke test

preset=buildbot_incremental_linux_crosscompile_wasm
@swift-ci Please test with preset Linux Platform

FTR, this is also required for swift-threading-package=pthreads.

I think maybe the threading unit tests need a tweak in this case too (it looks like maybe std::atomic<> isn't defined?)

Yeah, I'll tweak the test later (I don't have enough time right now sorry)

Thank you @al45tair !


feat: rename cache client from SimpleCacheClient to CacheClient

feat: rename SimpleCacheClient to CacheClient
docs: update documentation to use CacheClient

We will update the examples post release. The issue tracking this is here.
Closes #300

Note: I just renamed the cache client. We do not have a SimpleCacheClient alias.


Followers does not work with scope

The following test fails:
  describe "scopes" do
    it 'should correctly provide a list of followers with a scoped call' do
      Amico.follow(1, 11, 'project')
      Amico.following?(1, 11, 'project').should be_true
      Amico.following(1, {:page_size => Amico.page_size, :page => 1}, 'project').should eql(["11"])
      Amico.followers(11, 'project').count.should be(1)
      Amico.followers(11, 'project').should =~ ["1"]
    end
  end

Took me a while to figure out what was going on. Looks like nothing I do will get Amico.followers() to work with a scope. I'll look into it and see about getting a fix in the queue.

For the record, the actual failure message is:
  1) Amico::Relationships scope should correctly provide a list of followers with a scoped call
     Failure/Error: Amico.followers(11, 'project').count.should be(1)
     TypeError:
       can't convert String into Hash
     # ./lib/amico/relationships.rb:520:in `merge!'
     # ./lib/amico/relationships.rb:520:in `members'
     # ./lib/amico/relationships.rb:315:in `followers'
     # ./spec/amico/relationships_spec.rb:429:in `block (3 levels) in <top (required)>'

Ahh, I see it. Amico.followers(11, scope='project') fails too, because you're using named parameters. Ruby doesn't have named parameters. Common paradigm from my Python days, so just to be sure, I even asked on StackOverflow. That's why you see hashes everywhere in method signatures I guess. Somewhat surprised that a language so elegant wouldn't allow named parameters, actually. Still, difficult to build on the library if I can't count on it to honor my parameter set. Good to know, I'll have to work around it.


Fix canary install

Fix install script for non-latest version
Fix where porter is built and published

Merge like releases are borked and I wanna release tonight. 😇


MenuItem doesn't support the checkable property

I have a ContextMenu where the MenuItem's are specified as isCheckable = true.  When I click them using this API call
fun HasMenuItems._clickItemWithCaption(caption: String)  the menu item is selected, however the MenuItem.isChecked property does not toggle as expected.
I am aware of this issue (https://github.com/mvysny/karibu-testing/issues/20) with ContextMenu testing and worked around that by maintaining a reference to the ContextMenu from an associated Button subclass that I use as it's trigger.  This seems to be a separate issue with ContextMenu support of checked tracking.

Let me investigate please. Maybe Karibu can detect that a menu-item is checkable, and emulate vaadin behavior by toggling the "checked" state.


Adding noexcept to void return Cython functions as required by Cython 3.x upgrade

Follow up from #37917 to add noexcept to multiple Cython functions using nogil with a void return type.
Below are the performance hints that were encountered as part of the Cython translation which are solved by this PR:

The below performance hint still exists, and is not resolved.

This is because noexcept expects that the function doesn't raise an exception, or a raised exception is just displayed as a warning and not propagated. But _poll raises an AssertionError at QUEUE_TIMEOUT, and hence cannot use noexcept with _poll.
As PR 37917 and this PR now solves the Cython Asyncio test timeouts caused by Cython upgrade, this PR also reverts the Bazel Cython downgrade PR #37884
Testing for timeout
Tested using bazel test -c dbg --runs_per_test=3000 --test_timeout=10 "//examples/python/auth:_auth_example_test"
//examples/python/auth:_auth_example_test                                PASSED in 4.6s
  Stats over 3000 runs: max = 4.6s, min = 2.6s, avg = 3.2s, dev = 0.2s

@sreenithi Should this PR be backport to v1.67.x? Seems like there's a potential for deadlocks in the latest patch release.

Sure makes sense. But not just this one, Xuan's PR #37917 also needs to be backported as it has the addition of noexcept to the _unified_socket_write function which was the original fix to the deadlock. Let me backport them both.


Support arguments to bios process

My bios script is just
#!/usr/bin/env bash
ob internal export-some-stuff > "$HIE_BIOS_OUTPUT"

It would be nicer if I could just inline this into hie.yaml directly with something like
cradle: { bios: { program: 'bash -c "ob internal export-some-stuff > \"$HIE_BIOS_OUTPUT\""' } }

This ought to work in windows as well, right?
Possible implementation via shell

I think you could call cmd like bash

Proposed yaml:
cradle:
  bios:
    shell: 'bash -c "ob internal export-some-stuff > \"$HIE_BIOS_OUTPUT\""'

Maybe we can even ditch the OS dependant part and use just:
cradle:
  bios:
    shell: 'ob internal export-some-stuff > \"$HIE_BIOS_OUTPUT\"'

Sounds sensible to me.

Not sure how can work that for windows and linux, using the same cradle config. One soution could be to have two files hie,yaml.linux and hie.yaml.windows and uncomment the desired one, but it is not ideal.
It happens too for the program case.
What about
cradle:
  bios:
    posix:
      shell: 'bash -c "ob internal export-some-stuff > \"$HIE_BIOS_OUTPUT\""'
    windows:
       shell: 'cmd /c "ob internal export-some-stuff > "%HIE_BIOS_OUTPUT%""

or
cradle:
  bios:
    posix:
      program: "./hadrian/hie-bios"
    windows:
      program: ".\\hadrian\hie-bios.cmd"

Maybe we can even ditch the OS dependant part and use just:

We will not let the use of other shells like zsh in linux or cmd vs. powershell in windows, no?

We will not let the use of other shells like zsh in linux or cmd vs. powershell in windows, no?

If the user choose to, with bash -c etc, then there is no reason against it.

cradle:
  bios:
    posix:
      program: "./hadrian/hie-bios"
    windows:
      program: ".\\hadrian\\hie-bios.cmd"

I kind of dislike the idea.
It is not a matter of posix vs windows. It is rather non-windows vs windows.
I think, the feature we actually think about here is some way of passing conditional flags, in this case conditional on the OS type.
However, implementing real conditionals is out of scope for this project in my opinion.
If you absolutely need to support multiple OS, I suggest that there is a disptach within the program, you specified in the hie.yaml.
Does that make sense? Or is that additional effort in the ConfigType worthwhile?

BTW, I forgot, the program receives a filepath to load. The command should be able to receive that as well. How should the shell API support that?

If you absolutely need to support multiple OS, I suggest that there is a dispatch within the program, you specified in the hie.yaml.

Mmm so hie-bios would choose one file or another for each os? looking for a file with the name and a executble extension?
Not sure if that solution will cover some corner cases but it could work

Mmm so hie-bios would choose one file or another for each os? looking for a file with the name and a executble extension?

Not sure how that works, but arent we doing something comparable in HIE?
hie-cabal-install exists with and without extension, and the shell picks up the right version? Also, the script could be a Haskell or python script, which would avoid the problem entirely.

hie-cabal-install exists with and without extension, and the shell picks up the right file

the shell executes .bat and .cmd so if we use the shell to execute it may work (findExecutable does not i think)
but if the linux script is script.sh (or whateve extension) we would need a script.sh.bat 🤔

Regarding

BTW, I forgot, the program receives a filepath to load. The command should be able to receive that as well. How should the shell API support that?

I have two ideas:
Either we interpolate the string, e.g.
cradle:
  bios:
    shell: 'bash -c \"produceFlags $HIE_ARG\" > \"$HIE_BIOS_OUTPUT\""'

and replace the string "$HIE_ARG" with the filepath name or we turn "$HIE_ARG" into an environment variable that you can use like in the example above or read in the script.

What's wrong with program: [ 'bash', '-c', 'produceFlags "$@" > "$HIE_BIOS_OUTPUT"']?
I'm not sure hie-bios needs to do anything but simply exec into the given program, just make sure it calls programs with their arguments, anything else can be solved by that program.
Cross platform functionality in hie-bios seems pretty orthogonal with a lot of added complexity - hie-bios is not necessarily in a better place to solve that than any other part of the pipeline - maybe a task like that is better suited to be solved by individual projects according to their requirements and by runtimes that are already intended to work cross-platform, prime among them GHC:
program: [ 'runhaskell', 'Flags.hs' ].

program: [ 'bash', '-c', 'produceFlags "$@" > "$HIE_BIOS_OUTPUT"']

This looks good! Does the part $@ capture the filepath input parameter for the script?

Cross platform functionality in hie-bios seems pretty orthogonal with a lot of added complexity hie-bios is not necessarily in a better place to solve that than any other part of the pipeline.

I agree with that.

This looks good! Does the part $@ capture the filepath input parameter for the script?

Yes, it captures any argument to bash -c after the command string.
Notably it should generally be in quotes so it doesn't merge them into a single one.


Speed up render by storing compiled templates

We had an attempt to speed up the render of the templates by storing it in persistent_term here, but it was not working as expected, as related in #135.  Maybe a module that holds an ETS table could be implemented to keep them in memory.
The current flow is:

The client requests a page
The module of the route is called to render a template
That template is scanned, parsed, compiled, and, finally, rendered
The client connects to the server via WebSocket
The WebSocket requests the same template to be rendered
That template again is scanned, parsed, compiled, and, finally, rendered
The client receives the metadata and, finally, is good to go

In steps 3 and 6, we should be able to just fetch and render the compiled template.
Suggestions welcome.

Another option is to compile the template into a new module via the Erlang compile module. Zotonic uses this approach in its template_compiler.

Another one is to use ct_expand, which expands the result at the compile time.


Convert ending "ｎ" into "ん"

Otherwise MS-IME does not properly match inputs and readings.
E.g. ∈ \in: ❌「いｎ」✅「いん」

Fixed by commit 7f3c444883c2f70afb942feb8cf1a0431c3adfb7.


BulkForceClient "CSV data type requests / responses" Support

First of all Thanks a lot for adding Bulk API Support, it will help us a lot !
but most of the time users need to upload Bulk data using CSVs, so is there any plans to support it soon ?

See PR https://github.com/developerforce/Force.com-Toolkit-for-NET/pull/248


Place Inspector Button behind compilation flags

Fix https://github.com/LudiKha/Graphene/issues/6

Thanks a lot for picking this up!


Invalid rune at byte offset _; rune offeset _

I'm trying to render the following diagram:
+-----------------------+
|UBS-A                  |
|-----------------------+
| +-------------------+ |
| |Crianças           | |
| |----------+--------| |
| |Masculino |10 anos | |
| |----------+--------| |
| |Feminino  |8 anos  | |
| +----------+--------+ |
+-----------------------+

$ a2s -i diagram.txt -o diagram.svg
a2s: invalid rune at byte offset 26; rune offset 25

I suspect the error has to do with the ç character, because the error goes away if I replace it with a c. The README says there's native UTF-8 support though.

There should be. Are you sure the ç character is being input as UTF-8 rather than some other character set like ISO-8859-1? I'll also try to take a look in the nearish future.

Are you sure the ç character is being input as UTF-8 rather than some other character set like ISO-8859-1?

I believe so. How could I confirm that? I've tryed the folling on a python shell:
>>> hex(ord('ç'))
0xe7

Indeed, the UTF8 code point for 'ç' is 0xe7. Also, I've noticed character with latin diacritics (such as á or õ) cause the same issue.


Add ability to disable protobuf integration and remove vendor BUILD.bazel files

This PR adds new flags to rules_vendor that provide the option of:

disabling gazelle protobuf integration entirely (--proto disable_global).
removing BUILD.bazel files that are already in the vendor folder before running gazelle.

Both are disabled by default.
We have found both of these options necessary for our particular set up and thought it might be useful for others.

closing this very old PR


Model behavior changes after saving and restoring!

Hi there,
My tf version is 1.2.1.
It's Okay if I feed the test data after model training, to get an accuracy of 98%.
But after I save and restore the model. The accuracy will only be around 10%. What happened...
Besides, I think the accuracy from the test data should be a constant given that weights and biases won't be updated after training, but each time the accuracy is slightly different. Say, 0.1012, 0.9982, things like that...
Any help?

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce

It has been 14 days with no activity and the awaiting response label was assigned. Is this still an issue?

It has been 29 days with no activity and the awaiting response label was assigned. Is this still an issue?

It has been 14 days with no activity and the awaiting response label was assigned. Is this still an issue?

Closing this issue because the issues template was not filled out.


Daniil Manokhin: Watch procvaustralia.com

Daniil Manokhin requests the watch of the watch_keyword procvaustralia\.com. See the MS search here and the Stack Exchange search here.

procvaustralia\.com has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by Eliah Kagan in Charcoal HQ

Approved by Shree in Charcoal HQ