{"id":3818,"date":"2020-09-15T02:28:39","date_gmt":"2020-09-14T17:28:39","guid":{"rendered":"https:\/\/tech.akat.info\/?p=3818"},"modified":"2020-09-15T02:28:39","modified_gmt":"2020-09-14T17:28:39","slug":"isucon10-%e3%81%ab%e5%8f%82%e5%8a%a0%e3%81%97%e3%81%a6%e6%83%a8%e6%95%97%e3%81%97%e3%81%9f%e3%80%82%e3%81%9d%e3%81%97%e3%81%a6%e7%9f%a5%e3%82%89%e3%81%aa%e3%81%8b%e3%81%a3%e3%81%9f%e3%81%93%e3%81%a8","status":"publish","type":"post","link":"https:\/\/tech.akat.info\/?p=3818","title":{"rendered":"ISUCON10 \u306b\u53c2\u52a0\u3057\u3066\u60e8\u6557\u3057\u305f\u3002\u305d\u3057\u3066\u77e5\u3089\u306a\u304b\u3063\u305f\u3053\u3068\u307e\u3068\u3081 &#8211; DB\u7de8 &#8211;"},"content":{"rendered":"<p>ISUCON10\u306b\u53c2\u52a0\u3057\u3066\u60e8\u6557\u3057\u305f\u3002\u305d\u306e\u5f8c\u306eDiscord\u3084\u53c2\u52a0\u8005\u8a18\u4e8b\u3067\u77e5\u3089\u306a\u304b\u3063\u305f\u3053\u3068\u306a\u3069\u3092\u8abf\u3079\u305f\u308a\u8a66\u3057\u3066\u307f\u305f\u3002<\/p>\n<h2>MySQL\u306e\u30af\u30a8\u30ea\u30ad\u30e3\u30c3\u30b7\u30e5<\/h2>\n<p>\u305d\u3082\u305d\u3082\u30af\u30a8\u30ea\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6709\u52b9\u306b\u3057\u3066\u306a\u304b\u3063\u305forz<br \/>\n\u30ad\u30e3\u30c3\u30b7\u30e5\u30d2\u30c3\u30c8\u7387\u306fQcache_hits \/ ( Qcache_hits + Qcache_inserts + Qcache_not_cached ) \u3067\u7b97\u51fa\u53ef\u80fd\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# vi \/etc\/mysql\/my.cnf\r\nquery_cache_type = 1 \u3092\u8ffd\u52a0\r\n\r\n# mysql -uroot -p\r\n\r\nmysql&gt; SHOW VARIABLES LIKE '%query_cache_%';\r\n+------------------------------+----------+\r\n| Variable_name                | Value    |\r\n+------------------------------+----------+\r\n| query_cache_limit            | 1048576  |\r\n| query_cache_min_res_unit     | 4096     |\r\n| query_cache_size             | 16777216 |\r\n| query_cache_type             | ON       |\r\n| query_cache_wlock_invalidate | OFF      |\r\n+------------------------------+----------+\r\n5 rows in set (0.00 sec)\r\n\r\nmysql&gt; SHOW STATUS LIKE 'Qcache%';\r\n+-------------------------+----------+\r\n| Variable_name           | Value    |\r\n+-------------------------+----------+\r\n| Qcache_free_blocks      | 1        | # \u30af\u30a8\u30ea\u30ad\u30e3\u30c3\u30b7\u30e5\u5185\u306e\u7a7a\u304d\u30e1\u30e2\u30ea\u30d6\u30ed\u30c3\u30af\u6570\r\n| Qcache_free_memory      | 16601384 | # \u30af\u30a8\u30ea\u30ad\u30e3\u30c3\u30b7\u30e5\u7528\u306e\u7a7a\u304d\u30e1\u30e2\u30ea\u91cf\r\n| Qcache_hits             | 7        | # \u30af\u30a8\u30ea\u30ad\u30e3\u30c3\u30b7\u30e5\u30d2\u30c3\u30c8\u6570\r\n| Qcache_inserts          | 9        | # \u30af\u30a8\u30ea\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u8ffd\u52a0\u3055\u308c\u308b\u30af\u30a8\u30ea\u6570\r\n| Qcache_lowmem_prunes    | 0        | # \u30e1\u30e2\u30ea\u4e0d\u8db3\u3067\u30af\u30a8\u30ea\u30fc\u30ad\u30e3\u30c3\u30b7\u30e5\u304b\u3089\u524a\u9664\u3055\u308c\u305f\u30af\u30a8\u30ea\u6570\r\n| Qcache_not_cached       | 231      | # \u975e\u30ad\u30e3\u30c3\u30b7\u30e5\u30af\u30a8\u30ea\u6570\r\n| Qcache_queries_in_cache | 9        | # \u30af\u30a8\u30ea\u30ad\u30e3\u30c3\u30b7\u30e5\u5185\u306b\u767b\u9332\u3055\u308c\u305f\u30af\u30a8\u30ea\u6570\r\n| Qcache_total_blocks     | 21       | # \u30af\u30a8\u30ea\u30ad\u30e3\u30c3\u30b7\u30e5\u5185\u306e\u30d6\u30ed\u30c3\u30af\u5408\u8a08\u6570\r\n+-------------------------+----------+\r\n8 rows in set (0.00 sec)\r\n<\/pre>\n<h2>pt-query-digest<\/h2>\n<p>\u30fb\u30b9\u30ed\u30fc\u30ed\u30b0\u3092\u30ce\u30fc\u30de\u30e9\u30a4\u30ba\u30fb\u96c6\u8a08\u3057\u3001\u4eba\u9593\u304c\u5224\u65ad\u3057\u3084\u3059\u3044\u5f62\u5f0f\u3067\u51fa\u529b\u3055\u305b\u308b\u3053\u3068\u304c\u53ef\u80fd\u3002<br \/>\n\u30fbPercona\u793e\u304c\u958b\u767a\u30fb\u914d\u5e03\u3059\u308bMySQL\u7528\u306e\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u30fc\u30ad\u30c3\u30c8\u3067\u300cPercona Toolkit\u300d\u306e1\u3064\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# apt install percona-toolkit\r\n...\r\n# pt-query-digest slow.log\r\n\r\n# 400ms user time, 20ms system time, 29.04M rss, 84.09M vsz\r\n# Current date: Mon Sep 14 11:49:22 2020\r\n# Hostname: team135-003\r\n# Files: slow.log\r\n# Overall: 705 total, 21 unique, 0.01 QPS, 0.00x concurrency _____________\r\n# Time range: 2020-09-13T16:35:35 to 2020-09-14T06:25:01\r\n# Attribute          total     min     max     avg     95%  stddev  median\r\n# ============     ======= ======= ======= ======= ======= ======= =======\r\n# Exec time             8s     2us      3s    11ms     3ms   170ms   152us\r\n# Lock time           57ms       0     5ms    81us   204us   181us    57us\r\n# Rows sent          1.75k       0     301    2.55   19.46   14.58    0.99\r\n# Rows examine     876.54k       0  36.11k   1.24k 1012.63   5.66k    0.99\r\n# Query size       351.14k      26     683  510.03  652.75  251.53  621.67\r\n\r\n# Profile\r\n# Rank Query ID           Response time Calls R\/Call V\/M   Item\r\n# ==== ================== ============= ===== ====== ===== =============\r\n#    1 0xF418F8958C3A84C3  3.3505 41.5%     6 0.5584  2.53 SELECT estate\r\n#    2 0xD5E8472C4FDAEE41  3.1777 39.4%     9 0.3531  2.58 SELECT chair\r\n#    3 0x85DF0F23BB694539  0.9487 11.7%     2 0.4743  0.92 SELECT estate\r\n#    4 0x4F5BBA6F46285FBC  0.1663  2.1%     9 0.0185  0.00 SELECT chair\r\n#    5 0xBB5556170BADF35E  0.0871  1.1%   531 0.0002  0.00 SELECT estate\r\n# MISC 0xMISC              0.3442  4.3%   148 0.0023   0.0 &lt;16 ITEMS&gt;\r\n\r\n# Query 1: 0.50 QPS, 0.28x concurrency, ID 0xF418F8958C3A84C3 at byte 492810\r\n# Scores: V\/M = 2.53\r\n# Time range: 2020-09-13T18:01:19 to 2020-09-13T18:01:31\r\n# Attribute    pct   total     min     max     avg     95%  stddev  median\r\n# ============ === ======= ======= ======= ======= ======= ======= =======\r\n# Count          0       6\r\n# Exec time     41      3s    36us      3s   558ms      3s      1s    21ms\r\n# Lock time      0   445us       0   205us    74us   204us    80us   116us\r\n# Rows sent      3      60       0      20      10   19.46    9.73   19.46\r\n# Rows examine  10  88.05k       0  29.39k  14.67k  28.66k  14.33k  28.66k\r\n# Query size     0     700     116     117  116.67  112.70    0.00  112.70\r\n# String:\r\n# Databases    isuumo\r\n# Hosts        10.161.35.101\r\n# Users        isucon\r\n# Query_time distribution\r\n#   1us\r\n#  10us  ################################################################\r\n# 100us\r\n#   1ms\r\n#  10ms  ##########################################\r\n# 100ms\r\n#    1s  #####################\r\n#  10s+\r\n# Tables\r\n#    SHOW TABLE STATUS FROM `isuumo` LIKE 'estate'\\G\r\n#    SHOW CREATE TABLE `isuumo`.`estate`\\G\r\n# EXPLAIN \/*!50100 PARTITIONS*\/\r\nSELECT * FROM estate WHERE door_width &gt;= 110 AND door_width &lt; 150 ORDER BY popularity DESC, id ASC LIMIT 20 OFFSET 0\\G\r\n\r\n# Query 2: 0.01 QPS, 0.00x concurrency, ID 0xD5E8472C4FDAEE41 at byte 281849\r\n# Scores: V\/M = 2.58\r\n# Time range: 2020-09-13T17:22:12 to 2020-09-13T17:43:56\r\n# Attribute    pct   total     min     max     avg     95%  stddev  median\r\n# ============ === ======= ======= ======= ======= ======= ======= =======\r\n# Count          1       9\r\n# Exec time     39      3s    51us      3s   353ms      3s   954ms    17ms\r\n# Lock time      2     1ms       0   225us   146us   224us    79us   159us\r\n# Rows sent      0       7       0       1    0.78    0.99    0.41    0.99\r\n# Rows examine  23 205.08k       0  29.30k  22.79k  28.66k  11.91k  28.66k\r\n# Query size     0     675      75      75      75      75       0      75\r\n# String:\r\n# Databases    isuumo\r\n# Hosts        10.161.35.101\r\n# Users        isucon\r\n# Query_time distribution\r\n#   1us\r\n#  10us  #####################\r\n# 100us\r\n#   1ms\r\n#  10ms  ################################################################\r\n# 100ms\r\n#    1s  ##########\r\n#  10s+\r\n# Tables\r\n#    SHOW TABLE STATUS FROM `isuumo` LIKE 'chair'\\G\r\n#    SHOW CREATE TABLE `isuumo`.`chair`\\G\r\n# EXPLAIN \/*!50100 PARTITIONS*\/\r\nSELECT COUNT(*) FROM chair WHERE width &gt;= 110 AND width &lt; 150 AND stock &gt; 0\\G\r\n\r\n# Query 3: 0.00 QPS, 0.00x concurrency, ID 0x85DF0F23BB694539 at byte 287070\r\n# Scores: V\/M = 0.92\r\n# Time range: 2020-09-13T16:38:01 to 2020-09-13T17:44:13\r\n# Attribute    pct   total     min     max     avg     95%  stddev  median\r\n# ============ === ======= ======= ======= ======= ======= ======= =======\r\n# Count          0       2\r\n# Exec time     11   949ms     7ms   941ms   474ms   941ms   660ms   474ms\r\n# Lock time      0   492us   176us   316us   246us   316us    98us   246us\r\n# Rows sent     29     531     230     301  265.50     301   50.20  265.50\r\n# Rows examine   0   1.04k     460     602     531     602  100.41     531\r\n# Query size     0     383     190     193  191.50     193    2.12  191.50\r\n# String:\r\n# Databases    isuumo\r\n# Hosts        10.161.35.101\r\n# Users        isucon\r\n# Query_time distribution\r\n#   1us\r\n#  10us\r\n# 100us\r\n#   1ms  ################################################################\r\n#  10ms\r\n# 100ms  ################################################################\r\n#    1s\r\n#  10s+\r\n# Tables\r\n#    SHOW TABLE STATUS FROM `isuumo` LIKE 'estate'\\G\r\n#    SHOW CREATE TABLE `isuumo`.`estate`\\G\r\n# EXPLAIN \/*!50100 PARTITIONS*\/\r\nSELECT * FROM estate WHERE latitude &lt;= '35.926868653041' AND latitude &gt;= '35.733136223134' AND longitude &lt;= '139.64172363281' AND longitude &gt;= '139.31488037109' ORDER BY popularity DESC, id ASC\\G\r\n\r\n# Query 4: 0.01 QPS, 0.00x concurrency, ID 0x4F5BBA6F46285FBC at byte 283764\r\n# Scores: V\/M = 0.00\r\n# Time range: 2020-09-13T17:22:12 to 2020-09-13T17:43:56\r\n# Attribute    pct   total     min     max     avg     95%  stddev  median\r\n# ============ === ======= ======= ======= ======= ======= ======= =======\r\n# Count          1       9\r\n# Exec time      2   166ms    36us    21ms    18ms    21ms     6ms    20ms\r\n# Lock time      2     1ms       0   243us   142us   236us    59us   138us\r\n# Rows sent      8     160       0      20   17.78   19.46    6.12   19.46\r\n# Rows examine  26 234.63k       0  29.38k  26.07k  28.66k   9.01k  28.66k\r\n# Query size     0   1.05k     119     120  119.22  118.34       0  118.34\r\n# String:\r\n# Databases    isuumo\r\n# Hosts        10.161.35.101\r\n# Users        isucon\r\n# Query_time distribution\r\n#   1us\r\n#  10us  ########\r\n# 100us\r\n#   1ms\r\n#  10ms  ################################################################\r\n# 100ms\r\n#    1s\r\n#  10s+\r\n# Tables\r\n#    SHOW TABLE STATUS FROM `isuumo` LIKE 'chair'\\G\r\n#    SHOW CREATE TABLE `isuumo`.`chair`\\G\r\n# EXPLAIN \/*!50100 PARTITIONS*\/\r\nSELECT * FROM chair WHERE width &gt;= 110 AND width &lt; 150 AND stock &gt; 0 ORDER BY popularity DESC, id ASC LIMIT 20 OFFSET 40\\G\r\n\r\n# Query 5: 0.13 QPS, 0.00x concurrency, ID 0xBB5556170BADF35E at byte 13203\r\n# Scores: V\/M = 0.00\r\n# Time range: 2020-09-13T16:38:01 to 2020-09-13T17:44:13\r\n# Attribute    pct   total     min     max     avg     95%  stddev  median\r\n# ============ === ======= ======= ======= ======= ======= ======= =======\r\n# Count         75     531\r\n# Exec time      1    87ms    98us   453us   163us   214us    38us   152us\r\n# Lock time     60    35ms    47us   214us    65us    80us    15us    57us\r\n# Rows sent     20     370       0       1    0.70    0.99    0.46    0.99\r\n# Rows examine   0     370       0       1    0.70    0.99    0.46    0.99\r\n# Query size    97 341.63k     638     683  658.82  652.75   15.40  621.67\r\n# String:\r\n# Databases    isuumo\r\n# Hosts        10.161.35.101\r\n# Users        isucon\r\n# Query_time distribution\r\n#   1us\r\n#  10us  #\r\n# 100us  ################################################################\r\n#   1ms\r\n#  10ms\r\n# 100ms\r\n#    1s\r\n#  10s+\r\n# Tables\r\n#    SHOW TABLE STATUS FROM `1` LIKE 'estate'\\G\r\n#    SHOW CREATE TABLE `1`.`estate`\\G\r\n# EXPLAIN \/*!50100 PARTITIONS*\/\r\nSELECT * FROM estate WHERE id = '27762' AND ST_Contains(ST_PolygonFromText('POLYGON((35.750970 139.498901,35.750970 139.586792,35.753199 139.630737,35.757657 139.671936,35.773258 139.710388,35.782171 139.729614,35.920196 139.644470,35.944659 139.627991,35.953553 139.614258,35.960223 139.595032,35.960223 139.551086,35.951330 139.512634,35.949106 139.504395,35.940212 139.487915,35.924645 139.471436,35.902400 139.449463,35.860118 139.408264,35.842308 139.400024,35.826721 139.394531,35.784399 139.394531,35.764343 139.411011,35.757657 139.441223,35.753199 139.463196,35.750970 139.498901))'), ST_GeomFromText('POINT(35.801034 139.625385)'))\\G\r\n<\/pre>\n<p>\u30ce\u30fc\u30de\u30e9\u30a4\u30ba\u3055\u308c\u305f\u4e0a\u3067\u30b9\u30ed\u30fc\u30ed\u30b0\u304c\u5206\u6790\u3055\u308c\u308b\u304c\u3001[EXPLAIN]\u9805\u76ee\u306f\u305d\u306e\u307e\u307eEXPLAIN\u3067\u304d\u308b\u3088\u3046\u306b\u51fa\u529b\u3055\u308c\u3066\u3044\u308b\u3002<br \/>\n\u305d\u306e\u63d0\u6848\u3092\u3082\u3068\u306b\u6539\u5584\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# mysql -uroot -p\r\nEnter password:\r\nWelcome to the MySQL monitor.  Commands end with ; or \\g.\r\nYour MySQL connection id is 28\r\nServer version: 5.7.31-0ubuntu0.18.04.1-log (Ubuntu)\r\n\r\nmysql&gt; use isuumo\r\n\r\nmysql&gt; explain SELECT * FROM estate WHERE door_width &gt;= 110 AND door_width &lt; 150 ORDER BY popularity DESC, id ASC LIMIT 20 OFFSET 0\\G\r\n*************************** 1. row ***************************\r\n           id: 1\r\n  select_type: SIMPLE\r\n        table: estate\r\n   partitions: NULL\r\n         type: ALL\r\npossible_keys: index_estate_width_height,index_estate_width_height_order\r\n          key: NULL\r\n      key_len: NULL\r\n          ref: NULL\r\n         rows: 28688\r\n     filtered: 44.07\r\n        Extra: Using where; Using filesort\r\n1 row in set, 1 warning (0.00 sec)\r\n<\/pre>\n<h2>MySQLTuner<\/h2>\n<p>\u30fb\u30b5\u30fc\u30d0\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u6982\u89b3\u3092\u8868\u793a\u3057\u3001\u63a8\u5968\u8a2d\u5b9a\u3092\u63d0\u793a\u3057\u3066\u304f\u308c\u308b\u30c4\u30fc\u30eb<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# apt install mysqltuner\r\n...\r\n# mysqltuner\r\n &gt;&gt;  MySQLTuner 1.7.2 - Major Hayden &lt;major@mhtx.net&gt;\r\n &gt;&gt;  Bug reports, feature requests, and downloads at http:\/\/mysqltuner.com\/\r\n &gt;&gt;  Run with '--help' for additional options and output filtering\r\n\r\n&#x5B;--] Skipped version check for MySQLTuner script\r\n&#x5B;OK] Logged in using credentials from debian maintenance account.\r\n&#x5B;OK] Currently running supported MySQL version 5.7.31-0ubuntu0.18.04.1-log\r\n&#x5B;OK] Operating on 64-bit architecture\r\n\r\n-------- Log file Recommendations ------------------------------------------------------------------\r\n&#x5B;--] Log file: \/var\/log\/mysql\/error.log(782B)\r\n&#x5B;OK] Log file \/var\/log\/mysql\/error.log exists\r\n&#x5B;OK] Log file \/var\/log\/mysql\/error.log is readable.\r\n&#x5B;OK] Log file \/var\/log\/mysql\/error.log is not empty\r\n&#x5B;OK] Log file \/var\/log\/mysql\/error.log is smaller than 32 Mb\r\n&#x5B;OK] \/var\/log\/mysql\/error.log doesn't contain any warning.\r\n&#x5B;!!] \/var\/log\/mysql\/error.log contains 5 error(s).\r\n&#x5B;--] 0 start(s) detected in \/var\/log\/mysql\/error.log\r\n&#x5B;--] 0 shutdown(s) detected in \/var\/log\/mysql\/error.log\r\n\r\n-------- Storage Engine Statistics -----------------------------------------------------------------\r\n&#x5B;--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MEMORY +MRG_MYISAM +MyISAM +PERFORMANCE_SCHEMA\r\n&#x5B;--] Data in InnoDB tables: 51M (Tables: 7)\r\n&#x5B;OK] Total fragmented tables: 0\r\n\r\n-------- Security Recommendations ------------------------------------------------------------------\r\n&#x5B;OK] There are no anonymous accounts for any database users\r\n&#x5B;!!] User 'root@localhost' has no password set.\r\n&#x5B;!!] User 'isucon@%' has user name as password.\r\n&#x5B;!!] User 'isucon@localhost' has user name as password.\r\n&#x5B;!!] User 'isucon@%' hasn't specific host restriction.\r\n&#x5B;--] There are 612 basic passwords in the list.\r\n\r\n-------- CVE Security Recommendations --------------------------------------------------------------\r\n&#x5B;OK] NO SECURITY CVE FOUND FOR YOUR VERSION\r\n\r\n-------- Performance Metrics -----------------------------------------------------------------------\r\n&#x5B;--] Up for: 23h 10m 5s (1K q &#x5B;0.014 qps], 49 conn, TX: 1M, RX: 551K)\r\n&#x5B;--] Reads \/ Writes: 100% \/ 0%\r\n&#x5B;--] Binary logging is disabled\r\n&#x5B;--] Physical Memory     : 1.9G\r\n&#x5B;--] Max MySQL memory    : 4.1G\r\n&#x5B;--] Other process memory: 98.4M\r\n&#x5B;--] Total buffers: 2.1G global + 4.2M per thread (500 max threads)\r\n&#x5B;--] P_S Max memory usage: 72B\r\n&#x5B;--] Galera GCache Max memory usage: 0B\r\n&#x5B;!!] Maximum reached memory usage: 2.1G (107.19% of installed RAM)\r\n&#x5B;!!] Maximum possible memory usage: 4.1G (211.82% of installed RAM)\r\n&#x5B;!!] Overall possible memory usage with other process exceeded memory\r\n&#x5B;!!] Slow queries: 100% (1K\/1K)\r\n&#x5B;OK] Highest usage of available connections: 0% (2\/500)\r\n&#x5B;OK] Aborted connections: 0.00%  (0\/49)\r\n&#x5B;!!] Query cache may be disabled by default due to mutex contention.\r\n&#x5B;!!] Query cache efficiency: 3.3% (34 cached \/ 1K selects)\r\n&#x5B;OK] Query cache prunes per day: 0\r\n&#x5B;OK] Sorts requiring temporary tables: 0% (0 temp sorts \/ 13 sorts)\r\n&#x5B;OK] No joins without indexes\r\n&#x5B;OK] Temporary tables created on disk: 0% (0 on disk \/ 27 total)\r\n&#x5B;OK] Thread cache hit rate: 95% (2 created \/ 49 connections)\r\n&#x5B;OK] Table cache hit rate: 60% (97 open \/ 160 opened)\r\n&#x5B;OK] Open file limit used: 0% (7\/5K)\r\n&#x5B;OK] Table locks acquired immediately: 100% (110 immediate \/ 110 locks)\r\n\r\n-------- Performance schema ------------------------------------------------------------------------\r\n&#x5B;--] Memory used by P_S: 72B\r\n&#x5B;--] Sys schema is installed.\r\n\r\n-------- ThreadPool Metrics ------------------------------------------------------------------------\r\n&#x5B;--] ThreadPool stat is disabled.\r\n\r\n-------- MyISAM Metrics ----------------------------------------------------------------------------\r\n&#x5B;!!] Key buffer used: 18.2% (3M used \/ 16M cache)\r\n&#x5B;OK] Key buffer size \/ total MyISAM indexes: 16.0M\/43.0K\r\n&#x5B;!!] Read Key buffer hit rate: 50.0% (6 cached \/ 3 reads)\r\n\r\n-------- InnoDB Metrics ----------------------------------------------------------------------------\r\n&#x5B;--] InnoDB is enabled.\r\n&#x5B;--] InnoDB Thread Concurrency: 0\r\n&#x5B;OK] InnoDB File per table is activated\r\n&#x5B;OK] InnoDB buffer pool \/ data size: 2.0G\/51.3M\r\n&#x5B;!!] Ratio InnoDB log file size \/ InnoDB Buffer pool size (150 %): 1.5G * 2\/2.0G should be equal 25%\r\n&#x5B;!!] InnoDB buffer pool instances: 8\r\n&#x5B;--] Number of InnoDB Buffer Pool Chunk : 16 for 8 Buffer Pool Instance(s)\r\n&#x5B;OK] Innodb_buffer_pool_size aligned with Innodb_buffer_pool_chunk_size &amp; Innodb_buffer_pool_instances\r\n&#x5B;OK] InnoDB Read buffer efficiency: 96.79% (68237 hits\/ 70499 total)\r\n&#x5B;!!] InnoDB Write Log efficiency: 0% (2 hits\/ 0 total)\r\n&#x5B;OK] InnoDB log waits: 0.00% (0 waits \/ 2 writes)\r\n\r\n-------- AriaDB Metrics ----------------------------------------------------------------------------\r\n&#x5B;--] AriaDB is disabled.\r\n\r\n-------- TokuDB Metrics ----------------------------------------------------------------------------\r\n&#x5B;--] TokuDB is disabled.\r\n\r\n-------- XtraDB Metrics ----------------------------------------------------------------------------\r\n&#x5B;--] XtraDB is disabled.\r\n\r\n-------- RocksDB Metrics ---------------------------------------------------------------------------\r\n&#x5B;--] RocksDB is disabled.\r\n\r\n-------- Spider Metrics ----------------------------------------------------------------------------\r\n&#x5B;--] Spider is disabled.\r\n\r\n-------- Connect Metrics ---------------------------------------------------------------------------\r\n&#x5B;--] Connect is disabled.\r\n\r\n-------- Galera Metrics ----------------------------------------------------------------------------\r\n&#x5B;--] Galera is disabled.\r\n\r\n-------- Replication Metrics -----------------------------------------------------------------------\r\n&#x5B;--] Galera Synchronous replication: NO\r\n&#x5B;--] No replication slave(s) for this server.\r\n&#x5B;--] This is a standalone server.\r\n\r\n-------- Recommendations ---------------------------------------------------------------------------\r\nGeneral recommendations:\r\n    Control error line(s) into \/var\/log\/mysql\/error.log file\r\n    Set up a Password for user with the following SQL statement ( SET PASSWORD FOR 'user'@'SpecificDNSorIp' = PASSWORD('secure_password'); )\r\n    Set up a Secure Password for user@host ( SET PASSWORD FOR 'user'@'SpecificDNSorIp' = PASSWORD('secure_password'); )\r\n    Restrict Host for user@% to user@SpecificDNSorIp\r\n    MySQL started within last 24 hours - recommendations may be inaccurate\r\n    Reduce your overall MySQL memory footprint for system stability\r\n    Dedicate this server to your database for highest performance.\r\nVariables to adjust:\r\n  *** MySQL's maximum memory usage is dangerously high ***\r\n  *** Add RAM before increasing MySQL buffer variables ***\r\n    query_cache_size (=0)\r\n    query_cache_type (=0)\r\n    query_cache_limit (&gt; 1M, or use smaller result sets)\r\n    innodb_log_file_size * innodb_log_files_in_group should be equal to 1\/4 of buffer pool size (=1G) if possible.\r\n    innodb_buffer_pool_instances(=2)\r\n<\/pre>\n<h2>\u53c2\u8003<\/h2>\n<p>\u30fb<a href=\"https:\/\/weblabo.oscasierra.net\/mysql-query-cache\/\">MySQL \u30af\u30a8\u30ea\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u6982\u8981\u3068\u5c0e\u5165\u30fb\u8a55\u4fa1\u65b9\u6cd5<\/a><br \/>\n\u30fb<a href=\"https:\/\/thinkit.co.jp\/article\/9617\">\u30b9\u30ed\u30fc\u30ed\u30b0\u306e\u96c6\u8a08\u306b\u4fbf\u5229\u306a\u300cpt-query-digest\u300d\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ISUCON10\u306b\u53c2\u52a0\u3057\u3066\u60e8\u6557\u3057\u305f\u3002\u305d\u306e\u5f8c\u306eDiscord\u3084\u53c2\u52a0\u8005\u8a18\u4e8b\u3067\u77e5\u3089\u306a\u304b\u3063\u305f\u3053\u3068\u306a\u3069\u3092\u8abf\u3079\u305f\u308a\u8a66\u3057\u3066\u307f\u305f\u3002 MySQL\u306e\u30af\u30a8\u30ea\u30ad\u30e3\u30c3\u30b7\u30e5 \u305d\u3082\u305d\u3082\u30af\u30a8\u30ea\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6709\u52b9\u306b\u3057\u3066\u306a\u304b\u3063\u305forz \u30ad\u30e3\u30c3\u30b7\u30e5\u30d2\u30c3\u30c8\u7387\u306fQ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[14],"tags":[],"_links":{"self":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/3818"}],"collection":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3818"}],"version-history":[{"count":1,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/3818\/revisions"}],"predecessor-version":[{"id":3819,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/3818\/revisions\/3819"}],"wp:attachment":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3818"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3818"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3818"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}