{"id":16962,"date":"2018-06-26T14:15:32","date_gmt":"2018-06-26T05:15:32","guid":{"rendered":"http:\/\/labs.gree.jp\/blog\/?p=16962"},"modified":"2021-10-08T19:08:32","modified_gmt":"2021-10-08T10:08:32","slug":"post16962","status":"publish","type":"post","link":"https:\/\/labs.gree.jp\/blog\/2018\/06\/16962\/","title":{"rendered":"MySQL\u306emetric\u306b\u95a2\u3059\u308b\u8a71"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u308f\u3002\u305b\u3058\u307e\u3067\u3059\u3002\u3055\u3044\u304d\u3093\u3001\u30b8\u30e0\u7528\u306b\u5de6\u53f3\u72ec\u7acb\u578b\u30b9\u30dd\u30fc\u30c4\u30e2\u30c7\u30eb\u306eBluetooth\u30a4\u30e4\u30db\u30f3\u8cb7\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u3042\u307e\u308a\u306e\u5feb\u9069\u3055\u306b\u3001\u30b8\u30e0\u306b\u901a\u3046\u30e2\u30c1\u30d9\u30fc\u30b7\u30e7\u30f3\u304c\uff15\u5272\u5897\u3057\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h2>\u306f\u3058\u3081\u306b<\/h2>\n<p>innodb_thread_concurrency \u306b\u3064\u3044\u3066\u66f8\u3053\u3046\u304b\u3068\u601d\u3063\u305f\u3093\u3067\u3059\u304c\u3001\u307e\u305a\u306f\u305d\u306e\u524d\u306b MySQL \u306e metric \u306e\u8a71\u304b\u3089\u5165\u3063\u305f\u307b\u3046\u304c\u826f\u3044\u304b\u306a\u3041\u3068\u601d\u3063\u305f\u306e\u3067\u3001\u4eca\u56de\u306f metric \u306e\u8a71\u3092\u66f8\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002\u306f\u3058\u3081\u306b\u304a\u65ad\u308a\u3057\u3066\u304a\u304d\u307e\u3059\u304c\u9577\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u5f0a\u793e\u3067\u306f\uff17\u5e74\u4ee5\u4e0a\u524d\u304b\u3089\u3001 MySQL\u306e\u30b5\u30fc\u30d0\u4e00\u53f0\u3042\u305f\u308a\uff08OS\u5074\u306e\u3082\u542b\u3081\u308b\u3068\uff09200-300 \u4ee5\u4e0a\u306e metric \u3092 \u3060\u3044\u305f\u304415\u79d2\u9593\u9694\u3067\u8a18\u9332\u3057\u3066\u3044\u307e\u3059\u3002\u6700\u8fd1\u306fSSD\u306a\u3069\u3082\u4f7f\u3063\u3066\u307e\u3059\u304c\u3001\u3080\u304b\u3057\u306fHDD\u306bmetric\u3092\u4fdd\u5b58\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u4f8b\u3048\u3070MySQL\u306e\u30b5\u30fc\u30d0\u4e00\u53f0\u5206\u306emetric\u8868\u793a\u3057\u305f\u753b\u9762\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u3059\u308b\u3068\u3001\u6b21\u306e\u3088\u3046\u306a\u611f\u3058\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2018\/06\/5181567-84bb1760751178e67f9be456e29c56dae08636fe.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2018\/06\/5181567-84bb1760751178e67f9be456e29c56dae08636fe-132x400.png\" alt=\"\" width=\"132\" height=\"400\" class=\"alignnone size-medium wp-image-16976\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2018\/06\/5181567-84bb1760751178e67f9be456e29c56dae08636fe-132x400.png 132w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2018\/06\/5181567-84bb1760751178e67f9be456e29c56dae08636fe-66x200.png 66w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2018\/06\/5181567-84bb1760751178e67f9be456e29c56dae08636fe-337x1024.png 337w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2018\/06\/5181567-84bb1760751178e67f9be456e29c56dae08636fe.png 441w\" sizes=\"auto, (max-width: 132px) 100vw, 132px\" \/><\/a><\/p>\n<p>\u203b\u753b\u50cf\u306f\u7e2e\u5c0f\u3057\u3066\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u306a\u3093\u3067\u305d\u3093\u306a\u306b\u305f\u304f\u3055\u3093\u53d6\u3063\u3066\u3044\u308b\u304b\u3068\u3044\u3046\u3068\u3001\u5358\u7d14\u306b\u898b\u305f\u304b\u3063\u305f\u3068\u3044\u3046\u306e\u3068\u3001disk i\/o \u304c\u597d\u304d\u306a\u306e\u3067rrdcached\u306e\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3057\u3066\u305f\u3089\u53d6\u308c\u305f\u304b\u3089\u3067\u3059\u3002\u307e\u305f\u3001\u5e38\u6642\u3044\u308d\u3044\u308d\u306a metric \u3092\u53d6\u5f97\u3057\u7d9a\u3051\u3066\u3044\u308b\u3068\u3001 MySQL\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u8aad\u3093\u3060\u5f8c\u3001\u300c\u305d\u306e\u7406\u89e3\u304c\u6b63\u3057\u3044\u304b\u3069\u3046\u304b\u3001\u3044\u307e\u307e\u3067\u53d6\u5f97\u3057\u7d9a\u3051\u3066\u3044\u305f metric \u3092\u307f\u3066\u78ba\u8a8d\u3059\u308b\u300d\u3068\u3044\u3063\u305f\u4f7f\u3044\u65b9\u3082\u3067\u304d\u308b\u306e\u3067\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001\u305d\u3046\u3044\u3063\u305f metric\u7fa4\u306e\u4e00\u90e8\u304b\u3089\u3001\u6bd4\u8f03\u7684\u6709\u76ca\u306a\u3082\u306e\u3001\u5c02\u9580\u7684\u306a\u77e5\u8b58\u304c\u5fc5\u8981\u3068\u3055\u308c\u308b\u3051\u3069\u6709\u76ca\u305d\u3046\u306a\u3082\u306e\u306a\u3069\u3092\u629c\u7c8b\u3057\u3001\u5217\u6319\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u307b\u3068\u3093\u3069\u306emetric\u306f\u3001InnoDB\u3092\u4e3b\u306b\u4f7f\u3063\u3066\u3044\u308b\u7d20\u306eMySQL\u3092\u60f3\u5b9a\u3057\u3066\u8a18\u8ff0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u57fa\u672c\u7684\u306b\u306f<\/h2>\n<p>\u5f0a\u793e\u3067\u306f\u3001ganglia \u306e gmond \u3068\u3044\u3046 agent \u5411\u3051\u306b python module \u3092\u66f8\u3044\u3066<\/p>\n<ul>\n<li>SHOW GLOBAL STATUS<\/li>\n<li>SHOW VARIABLES<\/li>\n<li>SHOW ENGINE INNODB STATUS<\/li>\n<li>SHOW ENGINE PERFORMANCE_SCHEMA STATUS<\/li>\n<li>SHOW SLAVE STATUS<\/li>\n<\/ul>\n<p>\u3092\u53e9\u3044\u3066\u51fa\u529b\u7d50\u679c\u3092\u30d1\u30fc\u30b9\u3057\u3066\u3044\u307e\u3059\u3002 MySQL \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u4e0a\u304c\u308b\u5ea6\u306b SHOW ENGINE INNODB STATUS \u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u304c\u30d3\u30df\u30e7\u30a6\u306b\u5909\u308f\u308a\u7d9a\u3051\u308b\u306e\u3067\u3001\u771f\u5fc3\u8fbc\u3081\u3066\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002 ganglia \u4f7f\u308f\u308c\u3066\u308b\u65b9\u306f\u305d\u308c\u307b\u3069\u591a\u304f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3089\u3001\u300c\u3069\u3046\u3044\u3063\u305f metric \u3092\u3069\u3046\u3044\u3063\u305f\u89b3\u70b9\u3067\u898b\u3066\u3044\u308b\u304b\u300d\u3068\u3044\u3063\u305f\u3053\u3068\u3092\u3001\u3053\u308c\u304b\u3089\u8a18\u8ff0\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\nSHOW ENGINE INNODB STATUS \u3092\u30d1\u30fc\u30b9\u3059\u308b\u306e\u306f\u624b\u9593\u3067\u3057\u3087\u3046\u304b\u3089\u3001\u69d8\u3005\u306a\u76e3\u8996\u30c4\u30fc\u30eb\u304c\u3059\u3067\u306b\u53d6\u5f97\u3057\u3066\u3044\u308b\u3067\u3042\u308d\u3046\u3001 SHOW GLOBAL STATUS \u304b\u3089\u53d6\u5f97\u3067\u304d\u308b\u3082\u306e\u3092\u512a\u5148\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\nSHOW ENGINE INNODB STATUS \u3067\u306f\u306a\u304f Information Schema \u304b\u3089\u53d6\u5f97\u3067\u304d\u308b\u5834\u5408\u3082\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u3044\u307e\u306e\u3068\u3053\u308d SHOW ENGINE INNODB STATUS \u3092\u53c2\u7167\u3057\u306a\u3044\u3068\u53d6\u308c\u306a\u3044 metric \u3082\u3042\u308b\u306e\u3067\u3001 Information Schema \u3088\u308a SHOW ENGINE INNODB STATUS \u304b\u3089\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u4ee5\u4e0b\u3001 metric \u306b\u3064\u3044\u3066<\/h2>\n<h3>\u3060\u3044\u305f\u3044\u306e\u4eba\u304c\u898b\u3066\u5f79\u306b\u7acb\u3061\u305d\u3046\u306a\u3082\u306e<\/h3>\n<h4>\u00a0<a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Innodb_rows_read\">Innodb_rows_read<\/a><\/h4>\n<p>\u3068\u3066\u3082\u3056\u3063\u304f\u308a\u8003\u3048\u308b\u3068\u3001<\/p>\n<p><code>Innodb_rows_read\/sec = \u4e00\u79d2\u9593\u3042\u305f\u308a\u306eRows_examined\u306e\u7dcf\u91cf<\/code><\/p>\n<p>\u3068\u6349\u3048\u308b\u3068\u3001 EXPLAIN \u53e9\u3044\u3066\u8abf\u3079\u308b\u4eba\u306b\u306f\u3001\u300c\u3042\u3042\u898b\u3068\u3044\u305f\u307b\u3046\u304c\u826f\u3044\u306e\u304b\u3082\u300d\u3068\u5f97\u5fc3\u304c\u884c\u304f\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<br \/>\nMySQL\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u4e0a\u3052\u3066\u5b9f\u884c\u8a08\u753b\u5909\u308f\u3063\u305f\u308a\u30b2\u30fc\u30e0\u306e\u65b0\u3057\u3044\u30a4\u30d9\u30f3\u30c8\u304c\u306f\u3058\u307e\u3063\u305f\u3093\u3060\u3051\u3069INDEX\u304c\u3046\u307e\u304f\u52b9\u3044\u3066\u306a\u304b\u3063\u305f\u308a\u3059\u308b\u3068\u3001\u3046\u306a\u304e\u306e\u307c\u308a\u3067\u4e0a\u304c\u3063\u3066\u3044\u3063\u3066CPU\u4f7f\u3044\u5207\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u4e88\u5146\u3068\u3057\u3066\u898b\u3066\u304a\u304f\u3068\u826f\u3044\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<br \/>\ntable \u304c\u307e\u3060\u5c0f\u3055\u3044\u6bb5\u968e\u3067\u3042\u308c\u3070\u3001\u5f37\u3044\u610f\u5fd7\u3092\u6301\u3063\u3066\u30aa\u30f3\u30e9\u30a4\u30f3\u3067 ADD INDEX \u3057\u3066\u52a9\u304b\u308b\u30b1\u30fc\u30b9\u3082\u3042\u308a\u307e\u3059\u3002\uff08\u6700\u8fd1\u306e MySQL \u306f\u3001 Online DDL \u304c\u6539\u5584\u3057\u3066\u3044\u308b\u306e\u3067\u3053\u3046\u3044\u3046\u3068\u304d\u52a9\u304b\u308a\u307e\u3059\u3002\uff09<br \/>\n\u6cb9\u65ad\u3067\u304d\u306a\u3044\u306e\u306f\u3001\u6642\u9593\u306e\u7d4c\u904e\u306b\u6bd4\u4f8b\u3057\u3066\u30c7\u30fc\u30bf\u304c\u84c4\u7a4d\u3057\u3066\u3044\u304f\u30b1\u30fc\u30b9\u3067\u3059\u3002\u9577\u671f\u306b\u6e21\u3063\u3066\u904b\u55b6\u3057\u3066\u3044\u308b\u30b5\u30fc\u30d3\u30b9\u3084\u3001\u30b2\u30fc\u30e0\u306e\u30a4\u30d9\u30f3\u30c8\u65e5\u7a0b\u5f8c\u534a\u3067\u3001\u5927\u91cf\u306e\u30ec\u30b3\u30fc\u30c9\u3092\u8aad\u3080\u3088\u3046\u306b\u306a\u3063\u3066DB\u304c\u523a\u3055\u308b\u3001\u3042\u308b\u3044\u306f\u30d0\u30c3\u30c1\u30b8\u30e7\u30d6\u306a\u3069\u3067\u5de8\u5927\u306a\u914d\u5217\u3092\u6271\u3046\u3088\u3046\u306b\u306a\u3063\u3066\u30d0\u30c3\u30c1\u30b5\u30fc\u30d0\u3067 Out Of Memory \u304c\u767a\u751f\u3059\u308b\u306a\u3069\u306e\u554f\u984c\u304c\u751f\u3058\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h4><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/show-slave-status.html\">Seconds_Behind_Master<\/a>, Read_Master_Log_Pos, Exec_Master_Log_Pos<\/h4>\n<p>\u6b8b\u5ff5\u306a\u304c\u3089 <a href=\"https:\/\/dev.mysql.com\/worklog\/task\/?id=7374\">WL#7374: Performance schema tables to monitor replication lags and queue<\/a> \u306b\u3001\u529b\u5f37\u304f<\/p>\n<blockquote><p>\n  The current concept of SECONDS BEHIND MASTER is buggy and not meeting the present needs.\n<\/p><\/blockquote>\n<p>\u3068\u66f8\u3044\u3066\u3042\u308a\u307e\u3059\u304c\u3001\u73fe\u6642\u70b9\u3067 Seconds_Behind_Master \u306f\u308f\u304b\u308a\u3084\u3059\u304f\u3066\u305d\u3053\u305d\u3053\u6a5f\u80fd\u3059\u308b\u76e3\u8996\u9805\u76ee\u3067\u3059\u3002<br \/>\n<a href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/replication-administration-status.html\">MySQL8.0\u306eSeconds_Behind_Master<\/a>\u306b\u95a2\u3059\u308b\u8a18\u8ff0\u306b\u3042\u308b\u3088\u3046\u306b\u3001Seconds_Behind_Master\u304c\u5e38\u306b\u6b63\u78ba\u306a\u5024\u3092\u793a\u305b\u308b\u308f\u3051\u3067\u3082\u3042\u308a\u307e\u305b\u3093\u3002\u307e\u305f\u3001\u7cbe\u5ea6\u304c\u79d2\u5358\u4f4d\u3067\u3057\u304b\u3042\u308a\u307e\u305b\u3093\u3002\u305d\u3046\u3044\u3063\u305f\u3068\u304d\u306f Read_Master_Log_Pos \u3068 Exec_Master_Log_Pos \u306e\u5dee\u5206\u3092\u6c42\u3081\u3066\u3001 slave \u304c\u3069\u308c\u304f\u3089\u3044\u9045\u5ef6\u3057\u3066\u3044\u308b\u304b\u3001\u88dc\u5b8c\u7684\u306b\u898b\u3066\u3082\u826f\u3044\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>MySQL8.0 \u304b\u3089\u306f\u30de\u30a4\u30af\u30ed\u79d2\u5358\u4f4d\u3067 replication \u306e\u9045\u5ef6\u3092\u76e3\u8996\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306b\u3001\u4e0a\u8a18\u306e WorkLog#7374 \u306e\u5bfe\u5fdc\u304c\u306a\u3055\u308c\u3001 binary log \u3084 performance schema \u306b\u4fee\u6b63\u304c\u5165\u308a\u307e\u3057\u305f\u3002\u8208\u5473\u306e\u3042\u308b\u65b9\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u306a\u3069\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/dev.mysql.com\/blog-archive\/new-monitoring-replication-features-and-more\/\">New monitoring replication features and more!<\/a><\/li>\n<li><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/replication-connection-status-table.html\">25.11.11.2 The replication_connection_status Table<\/a><\/li>\n<\/ul>\n<h4><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/server-status-variables.html#statvar_Com_xxx\">Com_change_db<\/a>, Com_delete, Com_insert, Com_insert_select, Com_replace, Com_replace_select, Com_select, Com_truncate, Com_update, Com_update_multi, <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Questions\">Questions<\/a><\/h4>\n<p>Com_xxx \u30b7\u30ea\u30fc\u30ba\u306f\u5927\u91cf\u306b\u3042\u308b\u306e\u3067\u3001\u5168\u90e8\u8a18\u9332\u3059\u308b\u306e\u306f\u306a\u304b\u306a\u304b\u5927\u5909\u304b\u3068\u601d\u3044\u307e\u3059\u3002\u3053\u306e\u3042\u305f\u308a\u306e\u3081\u307c\u3057\u3044\u3082\u306e\u3092\u53d6\u3063\u3066\u304a\u304d\u3064\u3064\u3001 Questions \u3082\u5408\u308f\u305b\u3066\u53d6\u308b\u3053\u3068\u3067\u300c\u6b8b\u308a\u306e Com_xxx \u304c\u3069\u308c\u304f\u3089\u3044\u98db\u3093\u3067\u304d\u3066\u308b\u3060\u308d\u3046\u304b\uff1f\u300d\u3068\u3044\u3063\u305f\u78ba\u8a8d\u304c\u3067\u304d\u308c\u3070\u826f\u3044\u304b\u306a\u3041\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h4><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Connections\">Connections<\/a>, <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Threads_connected\">Threads_connected<\/a>, <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-system-variables.html#sysvar_max_connections\">max_connections<\/a>, <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Max_used_connections\">Max_used_connections<\/a>, <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Connection_errors_max_connections\">Connection_errors_max_connections<\/a><\/h4>\n<p>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u6027\u8cea\u3084\u8a2d\u8a08\u306b\u3082\u3088\u308b\u3068\u601d\u3046\u306e\u3067\u3059\u304c\u3001\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u30d7\u30fc\u30ea\u30f3\u30b0\u3057\u306b\u304f\u3044\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u5834\u5408\u3001MySQL\u306e Too many connections \u306f\u907f\u3051\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044 error \u3067\u3059\u3002\u666e\u6bb5\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u304b\u3089DB\u306b\u5bfe\u3057\u3066\u3069\u308c\u304f\u3089\u3044 connection \u304c\u5f35\u3089\u308c\u3066\u3044\u308b\u304b\u8a18\u9332\u3057\u3066\u304a\u304f\u306e\u306f\u3001\u3068\u3066\u3082\u826f\u3044\u3053\u3068\u3060\u3068\u601d\u3044\u307e\u3059\u3002\u307e\u305f\u3001\u77ac\u65ad\u306a\u3044\u3057fail over\u306a\u3069\u304c\u767a\u751f\u3057\u305f\u969b\u3001\u3069\u306eDB\u306b\u3069\u308c\u304f\u3089\u3044 connection \u304c\u6ede\u7559\u3057\u3066\u3044\u305f\u304b\u3001\u3053\u308c\u3089\u306e metric \u3092\u8a18\u9332\u3057\u3066\u304a\u304f\u3053\u3068\u3067\u3001\u300c\u77ac\u65ad\u304c\u767a\u751f\u3057\u305f\u3068\u3057\u3066\u3082\u3001mysqld\u306eslave\u3092\u3042\u3068\u4f55\u53f0\u304b\u8db3\u3057\u3066\u304a\u3051\u3070\u3001 Too many connections \u306f\u907f\u3051\u3089\u308c\u305d\u3046\u3060\u300d\u3068\u3044\u3063\u305f\u632f\u308a\u8fd4\u308a\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\nmax_connections \u3068 Max_used_connections \u3092\u30bb\u30c3\u30c8\u3067\u8a18\u9332\u3059\u308b\u306e\u306f\u3001 max_connections \u304c SET GLOBAL \u3067\u3044\u3064\u3067\u3082\u5897\u3084\u305b\u308b\u3053\u3068\u3092\u8003\u616e\u3057\u3066\u3001\u3067\u3059\u306d\u3002<br \/>\nConnection_errors_xxx \u3082\u3044\u308d\u3044\u308d\u3042\u308b\u306e\u3067\u3059\u304c\u3001Too many connections \u304c\u767a\u751f\u3057\u305f\u304b\u3069\u3046\u304b\u3092\u5f8c\u304b\u3089\u632f\u308a\u8fd4\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3001 Connection_errors_max_connections \u306f\u5730\u5473\u306b\u826f\u3044\u306e\u3067\u306f\u3001\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h4><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Slow_queries\">Slow_queries<\/a>, <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Innodb_row_lock_time\">Innodb_row_lock_time<\/a>, <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Innodb_row_lock_waits\">Innodb_row_lock_waits<\/a><\/h4>\n<p>\u3053\u306e\u3042\u305f\u308a\u8a00\u308f\u305a\u3082\u304c\u306a\u304b\u306a\u3001\u3068\u601d\u3044\u307e\u3059<\/p>\n<h4><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Handler_rollback\">Handler_rollback<\/a><\/h4>\n<p>\u3053\u308c\u306f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u8a2d\u8a08\u306b\u3088\u308b\u3068\u601d\u3046\u306e\u3067\u3059\u304c\u3001\u5f0a\u793e\u306e\u5834\u5408\u3001InnoDB \u3067 Handler_rollback\u306e\u5024\u304c\u9ad8\u3059\u304e\u308b\u3068\u304d\u306f\u3001SQL\u306a\u3069\u306b\u6539\u5584\u306e\u4f59\u5730\u304c\u3042\u308b\u306e\u3067\u306f\uff1f\u3068\u898b\u76f4\u3057\u3066\u3044\u307e\u3059\u3002 InnoDB \u3067 Handler_rollback \u304c\u5897\u3048\u3066\u3044\u308b\u3068\u304d\u3001 UNIQUE INDEX \u306e duplicate \u3084\u3001 query \u306e\u30ad\u30e3\u30f3\u30bb\u30eb\u304c\u767a\u751f\u3057\u3066\u3044\u308b\u5834\u5408\u304c\u3042\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n<h3>\u5c02\u9580\u77e5\u8b58\u304c\u3042\u308b\u7a0b\u5ea6\u3042\u308b\u4eba\u306f\u3001\u898b\u3066\u3082\u826f\u3044\u3068\u601d\u3046\u3082\u306e<\/h3>\n<p>\u307e\u305a<\/p>\n<ul>\n<li>SHOW ENGINE INNODB STATUS \u306e Buffer pool hit rate<\/li>\n<li><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Innodb_rows_deleted\">Innodb_rows_deleted<\/a>, <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Innodb_rows_inserted\">Innodb_rows_inserted<\/a>, <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Innodb_rows_updated\">Innodb_rows_updated<\/a><\/li>\n<\/ul>\n<p>\u3042\u305f\u308a\u306f\u898b\u3066\u3082\u826f\u3044\u3068\u601d\u3046\u306e\u3067\u3059\u304c\u3001<br \/>\n\u3053\u308c\u3089\u4ee5\u5916\u306b\u7279\u7b46\u3059\u3079\u304d\u3082\u306e\u3092\u5217\u6319\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h4>SHOW ENGINE INNODB STATUS \u306e Log Sequence Number - Last checkpoint at<\/h4>\n<p>\u3068\u3066\u3082\u3056\u3063\u304f\u308a\u8a00\u3044\u307e\u3059\u3068\u3001 InnoDB \u306f background \u3067 dirty page \u3092\u5c11\u3057\u305a\u3064 flush \u3059\u308b\u306e\u3067\u3059\u304c\u3001\u305d\u306e flush \u306e\u983b\u5ea6\u306e\u57fa\u6e96\u3068\u306a\u308b\u3082\u306e\u306e\u4e00\u3064\u304c\u3001 REDO Log \u306e\u4f7f\u7528\u7387\u3001Log Sequence Number \u3068 Last checkpoint at \u306e\u5dee\u5206\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>InnoDB Adaptive Flushing \u306b\u8208\u5473\u306e\u3042\u308b\u65b9\u306f\u3001\u3053\u3061\u3089\u306e\u30b9\u30e9\u30a4\u30c9\u306a\u3069\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/www.slideshare.net\/takanorisejima\/innodb-adaptive-flushing\">\u3055\u3044\u304d\u3093\u306e InnoDB Adaptive Flushing \uff08\u4eee\uff09<\/a><\/li>\n<\/ul>\n<h4><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Innodb_log_write_requests\">Innodb_log_write_requests<\/a>, <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Innodb_log_writes\">Innodb_log_writes<\/a><\/h4>\n<p>innodb_flush_log_at_trx_commit \u3092\u5909\u66f4\u3059\u308b\u3088\u3046\u306a\u4eba\u306f\u3001\u3053\u306e\u3042\u305f\u308a\u306e\u5909\u5316\u91cf\u3082\u898b\u3066\u826f\u3044\u6c17\u306f\u3057\u307e\u3059\u3002<\/p>\n<h4>SHOW ENGINE INNODB STATUS \u306e History list length<\/h4>\n<p>\u3053\u3061\u3089\u306f InnoDB \u306e purge \u306b\u95a2\u3059\u308b metric \u3067\u3059\u3002\u3056\u3063\u304f\u308a\u3044\u3046\u3068 UNDO Log \u304c\u3069\u308c\u304f\u3089\u3044\u6e9c\u307e\u3063\u3066\u308b\u304b\u3092\u793a\u3059\u3082\u306e\u3067\u3059\u3002 srv0srv.cc \u306b\u306f <a href=\"https:\/\/github.com\/mysql\/mysql-server\/blob\/4f1d7cf5fcb11a3f84cff27e37100d7295e7d5ca\/storage\/innobase\/srv\/srv0srv.cc#L2831-L2839\">\u300c5000 \u3088\u308a\u5c0f\u3055\u3044\u306a\u3089\u6562\u3048\u3066\u6e9c\u3081\u8fbc\u3082\u3046\u300d\u7684\u306a\u30b3\u30fc\u30c9<\/a> \u3082\u5165\u3063\u3066\u308b\u3093\u3067\u3001\u3042\u3093\u307e\u308a\u9ad8\u304f\u306a\u3044\u306a\u3089\u307b\u3063\u3068\u3051\u3070\u3044\u3044\u3068\u601d\u3046\u3093\u3067\u3059\u304c\u3001\u9ad8\u304f\u306a\u3063\u3066\u304f\u308b\u3068 ibdata1 \u306a\u3069\u304c\u80a5\u5927\u5316\u3057\u305f\u308a purge \u304c\u91cd\u304f\u306a\u3063\u3066\u304d\u305f\u308a\u3059\u308b\u306e\u3067\u3001\u307b\u3069\u307b\u3069\u306b\u898b\u3066\u304a\u3044\u305f\u307b\u3046\u304c\u826f\u3044\u611f\u3058\u3067\u3059\u3002<\/p>\n<h4><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Innodb_buffer_pool_pages_data\">Innodb_buffer_pool_pages_data<\/a>, <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Innodb_buffer_pool_pages_dirty\">Innodb_buffer_pool_pages_dirty<\/a>, <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Innodb_buffer_pool_pages_flushed\">Innodb_buffer_pool_pages_flushed<\/a>, <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Innodb_buffer_pool_pages_free\">Innodb_buffer_pool_pages_free<\/a>,<\/h4>\n<p>\u7279\u7b46\u3059\u3079\u304d\u306f Innodb_buffer_pool_pages_free \u3067\u3059\u3002 MySQL5.6\u4ee5\u964d\u306eInnoDB Adaptive Flushing\u306f\u3001buffer pool instance \u3054\u3068\u306b innodb_lru_scan_depth \u3067\u6307\u5b9a\u3057\u305f\u3060\u3051 free page \u3092\u78ba\u4fdd\u3057\u3088\u3046\u3068\u3059\u308b\u306e\u3067\u3001\u66f4\u65b0\u51e6\u7406\u304c\u767a\u751f\u3057\u3066\u3044\u308b\u306e\u306b free page \u304c\u67af\u6e07\u3057\u3066\u3044\u308b\u3068\u3044\u3046\u72b6\u6cc1\u3060\u3068\u3001 dirty page \u306e flush \u304c\u8ffd\u3044\u3064\u3044\u3066\u3044\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u3001 single page flush \u304c\u767a\u751f\u3057\u3066\u3057\u307e\u3046\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<br \/>\nInnoDB Adaptive Flushing\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001\u524d\u8ff0\u3057\u305f\u30b9\u30e9\u30a4\u30c9\u306a\u3069\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h4>InnoDB \u306e OS Waits \u306a\u3069<\/h4>\n<p>\u4ee5\u524d <a href=\"http:\/\/labs.gree.jp\/blog\/2015\/12\/15043\/\">InnoDB \u306e mutex \u306e\u8a71\uff08\u5165\u9580\u7de8\uff09<\/a> \u3067\u66f8\u304b\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u304c\u3001 InnoDB \u306e mutex \u307e\u308f\u308a\u306e metric \u3067\u3059\u3002\u3060\u3044\u305f\u3044\u306e\u30b1\u30fc\u30b9\u3067\u306f spin rounds, spin waits, os waits \u3060\u3051\u3067\u3082\u826f\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u3053\u308c\u3089\u306f\u6b21\u306e\u3088\u3046\u306b\u3057\u3066 information_schema \u304b\u3089\u3082\u53d6\u5f97\u3067\u304d\u307e\u3059\u306d\u3002<\/p>\n<pre><code class=\"language-sql\">SELECT * FROM information_schema.INNODB_METRICS WHERE NAME LIKE 'innodb%lock%s';\n<\/code><\/pre>\n<p>\u5f0a\u793e\u3067\u306f\u3001SHOW ENGINE INNNODB STATUS \u304b\u3089\u3001\u4ee5\u4e0b\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u4e2d\u306eread lock\u3084write lock\u306a\u3069\u3082\u3001metric\u3068\u3057\u3066\u8a18\u9332\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>btr0sea.cc<\/li>\n<li>buf0buf.cc<\/li>\n<li>row0{ins,upd,sel}.cc<\/li>\n<li>trx0rseg.cc<\/li>\n<\/ul>\n<h4>Handler_rollback \u4ee5\u5916\u306e Handler_xxx\uff08Handler_read_prev, Handler_read_rnd_next\u306a\u3069\uff09<\/h4>\n<p>\u6163\u308c\u3066\u304f\u308b\u3068 Handler \u95a2\u9023\u306e metric \u898b\u305f\u3060\u3051\u3067\u300c\u4eca\u65e5\u306f ORDER BY ... DESC \u591a\u3044\u306a\u3041\u300d\u306a\u3069\u3001\u3069\u3046\u3044\u3046SQL\u98db\u3093\u3067\u304d\u3066\u3044\u308b\u304b\u5bdf\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u306e\u3067\u30aa\u30b9\u30b9\u30e1\u3067\u3059\u3002\u5148\u305a\u306f Innodb_rows_read \u3092\u898b\u3066\u3001\u591a\u3044\u3068\u601d\u3063\u305f\u3089 Handler \u95a2\u9023\u306e metric \u3067\u5f53\u305f\u308a\u3092\u3064\u3051\u3066\u304b\u3089\u3001\u6539\u5584\u306e\u4f59\u5730\u304c\u3042\u308a\u305d\u3046\u306aSQL\u63a2\u3057\u3066\u3044\u304f\u3068\u3044\u3046\u6d41\u308c\u3067\u3059\u3002<\/p>\n<h3>\u5c02\u9580\u77e5\u8b58\u304c\u3042\u3063\u3066\u3082\u3001\u305f\u307e\u306b\u632f\u308a\u8fd4\u308b\u304f\u3089\u3044\u3067\u826f\u3055\u305d\u3046\u306a\u3082\u306e<\/h3>\n<p>\u300c\u3044\u3064\u304b\u30d1\u30e9\u30e1\u30fc\u30bf\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3059\u308b\u65e5\u304c\u6765\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u300d\u3068\u3044\u3046\u5099\u3048\u3068\u3057\u3066\u3001\u3044\u304f\u3064\u304bmetric\u3092\u8a18\u9332\u3057\u7d9a\u3051\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Sort_merge_passes\">Sort_merge_passes<\/a><\/h3>\n<p>\u304b\u3064\u3066\u5f0a\u793e\u306f\u3001 sort_buffer_size \u3092\u6e1b\u3089\u3059\u3068\u3044\u3046\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3092\u5b9f\u65bd\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u5f0a\u793e\u3067\u306f\u3001\u4ee5\u524dsort_buffer_size\u306b\u304b\u306a\u308a\u5927\u304d\u306a\u5024\u3092\u5272\u308a\u5f53\u3066\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u305d\u308c\u306f\u79d8\u4f1d\u306e\u30bf\u30ec\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3057\u305f\u3002\u73fe\u4ee3\u306b\u304a\u3044\u3066\u3082\u305d\u306e\u5024\u304c\u59a5\u5f53\u306a\u306e\u304b\u3069\u3046\u304b\u3001\u305d\u306e\u5224\u65ad\u306b\u4f7f\u3063\u305f\u306e\u304c Sort_merge_passes\u3067\u3059\u3002<br \/>\n\u82e5\u8005\u306bsort_buffer_size \u306e\u5272\u5f53\u3092\u6e1b\u3089\u3057\u305f slave \u306e DB \u3092\u6295\u5165\u3057\u3066\u3082\u3089\u3046\u969b\u3001 Sort_merge_passes \u306b\u3069\u308c\u307b\u3069\u306e\u5909\u5316\u304c\u3067\u308b\u304b\u6bd4\u8f03\u3057\u3066\u3082\u3089\u3044\u307e\u3057\u305f\u3002\u307e\u305a\u3001Sort_merge_passes\u304c\u307b\u3068\u3093\u3069\u5897\u3048\u308b\u3053\u3068\u3082\u306a\u304f\u3001\u30b5\u30fc\u30d3\u30b9\u306e response time \u304c\u60aa\u5316\u3057\u306a\u3044\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3057\u305f\u3002\u305d\u308c\u304b\u3089\u3001 sort_buffer_size\u3092\u6e1b\u3089\u3057\u305f\u8a2d\u5b9a\u3092\u4ed6\u306e\u30b5\u30fc\u30d0\u306b\u3082\u5c55\u958b\u3057\u3066\u3044\u3063\u305f\u5f8c\u3001\u300csort_buffer_size\u3092\u6e1b\u3089\u3057\u305f\u306e\u3067\u3001 mysqld \u306e 1conneciton \u3042\u305f\u308a\u306e\u30e1\u30e2\u30ea\u6d88\u8cbb\u91cf\u306e\u30ef\u30fc\u30b9\u30c8\u30b1\u30fc\u30b9\u306f\u5b89\u5168\u306b\u6e1b\u3089\u305b\u305f\u300d\u3068\u3044\u3046\u5224\u65ad\u3092\u3057\u3001 max_connections \u306e\u5f15\u304d\u4e0a\u3052\u3092\u5b9f\u65bd\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u5c06\u6765\u307e\u305f sort_buffer_size \u3092\u6e1b\u3089\u3059\u3053\u3068\u306b\u306a\u3063\u305f\u3068\u3057\u305f\u3089\u3001\u6b21\u56de\u3082\u304a\u305d\u3089\u304fSort_merge_passes\u3092\u78ba\u8a8d\u3059\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<h4>SHOW ENGINE INNODB STATUS \u306e Ibuf: size \u3042\u305f\u308a\u3084\u3001 SHOW ENGINE INNODB STATUS \u306e delete mark \u3042\u305f\u308a<\/h4>\n<p>\u3080\u304b\u3057 InnoDB \u306e\u5143\u958b\u767a\u8005\u306e\u65b9\u306b\u300cinnodb_change_buffer_max_size\u306f 1 \u3067\u3082\u826f\u3044\u3093\u3058\u3083\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u300d\u3068\u6559\u308f\u308a\u307e\u3057\u305f\u3002\u5b9f\u969b\u3001 1 \u3067\u554f\u984c\u306a\u3044\u30b1\u30fc\u30b9\u306f\u591a\u3005\u898b\u53d7\u3051\u3089\u308c\u307e\u3059\u3002\u305f\u3060\u3001\u305f\u307e\u306b\u30d0\u30c3\u30c1\u66f4\u65b0\u3055\u308c\u3066\u3044\u308bDB\u306a\u3069\u3067 change buffer \u306e size \u304c 1 \u3092\u8d85\u3048\u308b\u306a\u3069\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u300c\u3044\u3064\u304binnodb_change_buffer_max_size=1\u3068\u3044\u3046\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3092\u3059\u308b\u65e5\u304c\u6765\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u306e\u3067\u3001\u65e2\u5b58\u306emysqld\u3067change buffer\u306e\u4f7f\u3044\u65b9\u3092monitoring\u3057\u3066\u304a\u304f\u300d\u3068\u3044\u3063\u305f\u4f7f\u3044\u65b9\u3092\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>innodb_change_buffer_max_size\u306b\u3064\u3044\u3066\u8a00\u53ca\u3055\u308c\u3066\u3044\u308b\u6728\u4e0b\u3055\u3093\u306e\u30b9\u30e9\u30a4\u30c9\u306f\u3053\u3061\u3089\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/www.slideshare.net\/yasufumikinoshita10\/inno-db-deeptalk2\/37\">Innodb Deep Talk #2 \u3067\u304a\u8a71\u3057\u305f\u30b9\u30e9\u30a4\u30c9<\/a><\/li>\n<\/ul>\n<h4>SHOW ENGINE INNODB STATUS \u306e hash searches\/s \u3084 non-hash searches\/s<\/h4>\n<p>InnoDB Adaptive Hash Index \u306f\u300c\u3044\u307e\u306fdefault\u3067\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u3051\u308c\u3069\u3001\u4eca\u65e5\u3067\u306f\u7121\u52b9\u306b\u3057\u305f\u65b9\u304c\u3088\u3044\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3082\u3042\u308b\u300d\u3068\u3001\u4f55\u5e74\u3082\u524d\u304b\u3089MySQL\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u8a00\u53ca\u3055\u308c\u3066\u3044\u308b\u6a5f\u80fd\u3067\u3059\u3002<\/p>\n<p>CPU\u306b\u305d\u308c\u307b\u3069\u591a\u304f\u306eCore\u304c\u7a4d\u307e\u308c\u3066\u3044\u306a\u3051\u308c\u3070\u6c17\u306b\u3059\u308b\u3053\u3068\u3082\u306a\u3044\u304b\u306a\u3068\u601d\u3063\u305f\u308a\u3001MySQL5.7\u3067innodb_adaptive_hash_index_parts\u304c\u8ffd\u52a0\u3055\u308c\u3066mutex\u306e\u7af6\u5408\u304c\u6539\u5584\u3057\u3066\u3044\u305f\u308a\u3001 \u5f0a\u793e\u306finnodb_thread_concurrency\u306e\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3092\u5b9f\u65bd\u3057\u3066\u3044\u308b\u306e\u3067\u3001Adaptive Hash Index\u306b\u3088\u308bmutex\u306e\u7af6\u5408\u3063\u3066\u3001\u3044\u307e\u306e\u3068\u3053\u308d\u6c17\u306b\u3059\u308b\u307e\u3067\u3082\u306a\u3044\u306e\u304b\u306a\uff1f\u3068\u611f\u3058\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3046\u3044\u3063\u305f\u8af8\u3005\u306e\u3053\u3068\u3092\u8e0f\u307e\u3048\u3064\u3064\u3001\u73fe\u6642\u70b9\u3067 SHOW ENGINE INNODB STATUS \u3067 btr0sea.cc \u306e\u7af6\u5408\u3092 monitoring \u3059\u308b\u9650\u308a\u3001\u5b9f\u969b\u306b\u5bfe\u3057\u3066\u7af6\u5408\u3057\u3066\u306a\u3044\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u5c06\u6765\u306e\u5099\u3048\u3068\u3057\u3066\u3001\u3069\u308c\u304f\u3089\u3044 hash search \u3068 non-hash search \u304c\u884c\u308f\u308c\u3066\u3044\u308b\u306e\u304b\u3001\u8a18\u9332\u3068\u3057\u3066\u53d6\u5f97\u3057\u7d9a\u3051\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>innodb_thread_concurrency \u3092\u5909\u66f4\u3057\u3066\u3044\u308b\u4eba\u306f\u898b\u3066\u3082\u826f\u3044\u3082\u306e<\/h3>\n<p>\u6b21\u306e\u3082\u306e\u306b\u3064\u3044\u3066\u306f\u3001\u5f8c\u65e5\u307e\u305f innodb_thread_concurrency \u306b\u3064\u3044\u3066\u89e3\u8aac\u3059\u308b\u969b\u306b\u8ff0\u3079\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/server-status-variables.html#statvar_Threads_running\">Threads_running<\/a><\/li>\n<li>SHOW ENGINE INNODB STATUS \u306e queries inside InnoDB \u3068 queries in queue<\/li>\n<li><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/innodb-parameters.html#sysvar_innodb_adaptive_max_sleep_delay\">innodb_adaptive_max_sleep_delay<\/a>, <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/innodb-parameters.html#sysvar_innodb_thread_sleep_delay\">innodb_thread_sleep_delay<\/a><\/li>\n<\/ul>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>\u4ed6\u306b\u3082\u307e\u3060\u3044\u308d\u3044\u308d metric \u3092\u53d6\u5f97\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u7d9a\u304d\u306f\u307e\u305f\u5225\u306e\u6a5f\u4f1a\u306b\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u6b21\u56de\u306f innodb_thread_concurrency \u306b\u3064\u3044\u3066\u304a\u8a71\u3067\u304d\u308b\u3068\u826f\u3044\u304b\u306a\u3041\u3068\u601d\u3046\u306a\u3069\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u308f\u3002\u305b\u3058\u307e\u3067\u3059\u3002\u3055\u3044\u304d\u3093\u3001\u30b8\u30e0\u7528\u306b\u5de6\u53f3\u72ec\u7acb\u578b\u30b9\u30dd\u30fc\u30c4\u30e2\u30c7\u30eb\u306eBluetooth\u30a4\u30e4\u30db\u30f3\u8cb7\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u3042\u307e\u308a\u306e\u5feb\u9069\u3055\u306b\u3001\u30b8\u30e0\u306b\u901a\u3046\u30e2\u30c1\u30d9\u30fc\u30b7\u30e7\u30f3\u304c\uff15\u5272\u5897\u3057\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u306f\u3058\u3081\u306b innodb_thread_co [&hellip;]<\/p>\n","protected":false},"author":137,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[17],"class_list":["post-16962","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-info","tag-mysql"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/16962","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/users\/137"}],"replies":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/comments?post=16962"}],"version-history":[{"count":3,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/16962\/revisions"}],"predecessor-version":[{"id":21459,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/16962\/revisions\/21459"}],"wp:attachment":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/media?parent=16962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/categories?post=16962"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/tags?post=16962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}