{"id":2666,"date":"2010-11-01T19:36:29","date_gmt":"2010-11-01T11:36:29","guid":{"rendered":"http:\/\/www.orczhou.com\/?p=2666"},"modified":"2024-04-01T19:36:44","modified_gmt":"2024-04-01T11:36:44","slug":"about-innodb-variables-innodb_thread_concurrency","status":"publish","type":"post","link":"https:\/\/www.orczhou.com\/index.php\/2010\/11\/about-innodb-variables-innodb_thread_concurrency\/","title":{"rendered":"\u5173\u4e8eInnoDB\u53c2\u6570innodb_thread_concurrency"},"content":{"rendered":"<p><a href=\"http:\/\/www.google.com\/search?sclient=psy&#038;hl=en&#038;site=&#038;source=hp&#038;q=innodb_thread_concurrency&#038;btnG=Google+Search\">\u5f88\u591a\u4eba<\/a>\u90fd\u8ba8\u8bba\u4e86\u8fd9\u4e2a\u95ee\u9898\uff0c\u53c2\u6570<a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.1\/en\/innodb-parameters.html#sysvar_innodb_thread_concurrency\">innodb_thread_concurrency<\/a>\u9650\u5236\u4e86InnoDB\u5185\u90e8\u7ebf\u7a0b\u7684\u6570\u91cf\u3002\u4f8b\u5982\u5f53\u6709query\u9700\u8981InnoDB\u5904\u7406\u65f6\uff0cInnoDB\u9996\u5148\u4f1a\u68c0\u67e5\u4e00\u4e0b\u5f53\u524d\u7684\u5185\u90e8\u7ebf\u7a0b\u6570\u662f\u4e0d\u662f\u8d85\u8fc7\u4e86<a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.1\/en\/innodb-parameters.html#sysvar_innodb_thread_concurrency\">innodb_thread_concurrency<\/a>\u7684\u9650\u5236\uff0c\u5982\u679c\u8d85\u51fa\u5219\u4f1a\u8ba9\u5f53\u524d\u7ebf\u7a0bsleep\u4e00\u4f1a\u513f\uff0c\u518d\u8bd5\uff0c\u5982\u679c\u8fd8\u662f\u53d7\u9650\uff0c\u5219\u4f1a\u8fdb\u5165\u4e00\u4e2aFIFO\u7684\u961f\u5217\u3002\u5982\u679cinnodb_thread_concurrency\u8bbe\u7f6e\u62100\u8868\u793a\uff0c\u5185\u90e8\u7ebf\u7a0b\u6570\u91cf\u5c06\u4e0d\u53d7\u9650\u5236\uff08\u6ce8\uff1a<a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.1\/en\/innodb-parameters.html#sysvar_innodb_thread_concurrency\">innodb_thread_concurrency<\/a>\u503c\u5728<a href=\"http:\/\/www.mysqlperformanceblog.com\/2006\/05\/12\/mess-with-innodb_thread_concurrency\/\">\u4e0d\u540c\u7684\u7248\u672c\u610f\u4e49\u7565\u6709\u4e0d\u540c<\/a>\uff09\u3002<\/p>\n<div class=\"myt1\">1. \u8be5\u53c2\u6570\u8bbe\u7f6e\u6210\u591a\u5c11\u5408\u9002\uff1f<\/div>\n<p>\u6211\u4e0d\u77e5\u9053\u591a\u5927\u5408\u9002\u3002\u6211\u7684\u7ecf\u9a8c\u503c\u8bbe\u7f6e\u621064\u5c31\u591f\u4e86\uff0c\u6b63\u5e38\u60c5\u51b5\uff0c\u5e94\u7528\u5e76\u53d1\u4e0d\u4f1a\u8d85\u8fc7\u8fd9\u4e2a\u503c\u3002<\/p>\n<p>\u5982\u679c\u8bbe\u7f6e\u62100\uff0c\u4f1a\u8ba9InnoDB\u7684\u5185\u90e8\u7ebf\u7a0b\u4e0d\u53d7\u9650\u5236\uff0c\u5982\u679c\u4f60\u9ad8\u5e76\u53d1\u7684IO-bound\u7684\u5e94\u7528\uff0c\u5f88\u53ef\u80fd\u5728InnoDB\u5185\u90e8\u7d2f\u8ba1\u5f88\u591a\u7684\u5e76\u53d1\u7b49\u5f85IO\u7684\u7ebf\u7a0b\uff0c\u4e3b\u673a\u7684Load\u4f1a\u5f88\u9ad8\uff0c\u4f46\u662f\u6570\u636e\u5e93\u4f9d\u7136\u4f1a\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<p>\u4ece5.1.11\u5f00\u59cb\u8fd9\u4e2a\u503c\u7684\u9ed8\u8ba4\u503c\u662f8\uff0c\u610f\u5473\u7740\uff0cInnoDB\u4f1a\u9650\u5236\u5185\u90e8\u7ebf\u7a0b\u6570\u4e0d\u8d85\u8fc78\u3002\u5982\u679c\u662f\u9ad8\u5e76\u53d1\u7684\u5e94\u7528\uff0c\u4f60\u7684MySQL\u80fd\u529b\u53ef\u80fd\u4f1a\u53d7\u5230\u8fd9\u4e2a\u53c2\u6570\u7684\u9650\u5236\u3002\u5bf9\u4e8e\u5f88\u591a\u60c5\u51b5\u8fd9\u4e2a\u503c\u6709\u504f\u5c0f\u7684\uff0c\u5e76\u53d1\u91cf\u53ef\u80fd\u4f1a\u6bd48\u5927\uff0c\u8fd9\u65f6\u53c2\u6570<a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.1\/en\/innodb-parameters.html#sysvar_innodb_thread_concurrency\">innodb_thread_concurrency<\/a>\u5c31\u4f1a\u6210\u4e3aInnoDB\u7684\u74f6\u9888\u3002\u5bf9\u4e8e\u4e00\u4e2a16\u6838\u7684\u7cfb\u7edf\uff0c\u5904\u7406\u7684\u5e76\u53d1\u5f88\u591a\u65f6\u5019\u90fd\u4f1a\u5927\u4e8e8\uff0c\u800c\u53d7cpu\u6838\u6570\u9650\u5236\uff0c\u592a\u591a\u7684\u7ebf\u7a0b\u4f1a\u5728CPU\u5207\u6362\u4e0a\u6d88\u8017\u8fc7\u591a\u8d44\u6e90\u3002<\/p>\n<p>\u4f46\u662f\u5982\u679c\u4f60\u7cfb\u7edf\u5e76\u53d1\u91cf\u59cb\u7ec8\u90fd\u662f\u5c0f\u4e8e8\u7684\uff0c\u90a3\u4e48\u8bbe\u7f6e\u6210\u4e00\u4e2a\u5927\u4e8e8\u7684\u503c\u5e76\u6ca1\u6709\u610f\u4e49\u3002<\/p>\n<div class=\"myt1\">2. \u9ad8\u5e76\u53d1\u4e0b\u5b9e\u9a8c<\/div>\n<p>\u901a\u8fc7supersmack\u6a21\u62df\u4e86128\u4e2a\u7ebf\u7a0b\u5e76\u53d1\uff0c\u505a\u4e865\u7ec4\u5bf9\u6bd4\u6d4b\u8bd5\uff1a<\/p>\n<p><a href=\"http:\/\/www.flickr.com\/photos\/26825745@N06\/5158509698\/\" title=\"innodb_thread_concurrency by orczhou, on Flickr\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/farm2.static.flickr.com\/1129\/5158509698_5580cd05f5.jpg\" width=\"386\" height=\"344\" alt=\"innodb_thread_concurrency\" \/><\/a><\/p>\n<p>\u6700\u540e\uff0c\u63d0\u4e00\u4e0b\uff0c\u6ca1\u4e8b\u4e0d\u8981\u5728\u751f\u4ea7\u73af\u5883\u52a8\u6001\u66f4\u6539<a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.1\/en\/innodb-parameters.html#sysvar_innodb_thread_concurrency\">innodb_thread_concurrency<\/a>\uff0c\u5f88\u5371\u9669\uff1a<a href=\"http:\/\/bugs.mysql.com\/bug.php?id=40760\">Bug 40760<\/a>\u3002<\/p>\n<p>\u53c2\u8003\uff1a<\/p>\n<p>1. MySQL Manual<\/p>\n<p>2. <a href=\"http:\/\/peter-zaitsev.livejournal.com\/9138.html\">MySQL: innodb_thread_concurrency beast<\/a><\/p>\n<p>3. <a href=\"http:\/\/mysqlha.blogspot.com\/2010\/03\/do-we-still-need-innodbthreadconcurrenc.html\">do we still need innodb_thread_concurrency<\/a><\/p>\n<p>4. <a href=\"http:\/\/www.mysqlperformanceblog.com\/2006\/05\/12\/mess-with-innodb_thread_concurrency\/\">Mess with innodb_thread_concurrency<\/a><\/p>\n<p>5. <a href=\"http:\/\/www.ningoo.net\/html\/2009\/about_innodb_thread_concurrency.html\">InnoDB\u7ebf\u7a0b\u5e76\u53d1\u68c0\u67e5\u673a\u5236<\/a><\/p>\n<p>6. <a href=\"http:\/\/bugs.mysql.com\/bug.php?id=40760\">MySQL Bugs<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5f88\u591a\u4eba\u90fd\u8ba8\u8bba\u4e86\u8fd9\u4e2a\u95ee\u9898\uff0c\u53c2\u6570innodb_thread_concurrency\u9650\u5236\u4e86InnoDB\u5185\u90e8\u7ebf\u7a0b\u7684\u6570\u91cf\u3002\u4f8b\u5982\u5f53\u6709query\u9700\u8981InnoDB\u5904\u7406\u65f6\uff0cInnoDB\u9996\u5148\u4f1a\u68c0\u67e5\u4e00\u4e0b\u5f53\u524d\u7684\u5185\u90e8\u7ebf\u7a0b\u6570\u662f\u4e0d\u662f\u8d85\u8fc7\u4e86innodb_thread_concurrency\u7684\u9650\u5236\uff0c\u5982\u679c\u8d85\u51fa\u5219\u4f1a\u8ba9\u5f53\u524d\u7ebf\u7a0bsleep\u4e00\u4f1a\u513f\uff0c\u518d\u8bd5\uff0c\u5982\u679c\u8fd8\u662f\u53d7\u9650\uff0c\u5219\u4f1a\u8fdb\u5165\u4e00\u4e2aFIFO\u7684\u961f\u5217\u3002\u5982\u679cinnodb_thread_concurrency\u8bbe\u7f6e\u62100\u8868\u793a\uff0c\u5185\u90e8\u7ebf\u7a0b\u6570\u91cf\u5c06\u4e0d\u53d7\u9650\u5236\uff08\u6ce8\uff1ainnodb_thread_concurrency\u503c\u5728\u4e0d\u540c\u7684\u7248\u672c\u610f\u4e49\u7565\u6709\u4e0d\u540c\uff09\u3002 1. \u8be5\u53c2\u6570\u8bbe\u7f6e\u6210\u591a\u5c11\u5408\u9002\uff1f \u6211\u4e0d\u77e5\u9053\u591a\u5927\u5408\u9002\u3002\u6211\u7684\u7ecf\u9a8c\u503c\u8bbe\u7f6e\u621064\u5c31\u591f\u4e86\uff0c\u6b63\u5e38\u60c5\u51b5\uff0c\u5e94\u7528\u5e76\u53d1\u4e0d\u4f1a\u8d85\u8fc7\u8fd9\u4e2a\u503c\u3002 \u5982\u679c\u8bbe\u7f6e\u62100\uff0c\u4f1a\u8ba9InnoDB\u7684\u5185\u90e8\u7ebf\u7a0b\u4e0d\u53d7\u9650\u5236\uff0c\u5982\u679c\u4f60\u9ad8\u5e76\u53d1\u7684IO-bound\u7684\u5e94\u7528\uff0c\u5f88\u53ef\u80fd\u5728InnoDB\u5185\u90e8\u7d2f\u8ba1\u5f88\u591a\u7684\u5e76\u53d1\u7b49\u5f85IO\u7684\u7ebf\u7a0b\uff0c\u4e3b\u673a\u7684Load\u4f1a\u5f88\u9ad8\uff0c\u4f46\u662f\u6570\u636e\u5e93\u4f9d\u7136\u4f1a\u6b63\u5e38\u8fd0\u884c\u3002 \u4ece5.1.11\u5f00\u59cb\u8fd9\u4e2a\u503c\u7684\u9ed8\u8ba4\u503c\u662f8\uff0c\u610f\u5473\u7740\uff0cInnoDB\u4f1a\u9650\u5236\u5185\u90e8\u7ebf\u7a0b\u6570\u4e0d\u8d85\u8fc78\u3002\u5982\u679c\u662f\u9ad8\u5e76\u53d1\u7684\u5e94\u7528\uff0c\u4f60\u7684MySQL\u80fd\u529b\u53ef\u80fd\u4f1a\u53d7\u5230\u8fd9\u4e2a\u53c2\u6570\u7684\u9650\u5236\u3002\u5bf9\u4e8e\u5f88\u591a\u60c5\u51b5\u8fd9\u4e2a\u503c\u6709\u504f\u5c0f\u7684\uff0c\u5e76\u53d1\u91cf\u53ef\u80fd\u4f1a\u6bd48\u5927\uff0c\u8fd9\u65f6\u53c2\u6570innodb_thread_concurrency\u5c31\u4f1a\u6210\u4e3aInnoDB\u7684\u74f6\u9888\u3002\u5bf9\u4e8e\u4e00\u4e2a16\u6838\u7684\u7cfb\u7edf\uff0c\u5904\u7406\u7684\u5e76\u53d1\u5f88\u591a\u65f6\u5019\u90fd\u4f1a\u5927\u4e8e8\uff0c\u800c\u53d7cpu\u6838\u6570\u9650\u5236\uff0c\u592a\u591a\u7684\u7ebf\u7a0b\u4f1a\u5728CPU\u5207\u6362\u4e0a\u6d88\u8017\u8fc7\u591a\u8d44\u6e90\u3002 \u4f46\u662f\u5982\u679c\u4f60\u7cfb\u7edf\u5e76\u53d1\u91cf\u59cb\u7ec8\u90fd\u662f\u5c0f\u4e8e8\u7684\uff0c\u90a3\u4e48\u8bbe\u7f6e\u6210\u4e00\u4e2a\u5927\u4e8e8\u7684\u503c\u5e76\u6ca1\u6709\u610f\u4e49\u3002 2. \u9ad8\u5e76\u53d1\u4e0b\u5b9e\u9a8c \u901a\u8fc7supersmack\u6a21\u62df\u4e86128\u4e2a\u7ebf\u7a0b\u5e76\u53d1\uff0c\u505a\u4e865\u7ec4\u5bf9\u6bd4\u6d4b\u8bd5\uff1a \u6700\u540e\uff0c\u63d0\u4e00\u4e0b\uff0c\u6ca1\u4e8b\u4e0d\u8981\u5728\u751f\u4ea7\u73af\u5883\u52a8\u6001\u66f4\u6539innodb_thread_concurrency\uff0c\u5f88\u5371\u9669\uff1aBug 40760\u3002 \u53c2\u8003\uff1a 1. MySQL Manual 2. MySQL: innodb_thread_concurrency beast 3. do we still need innodb_thread_concurrency 4. Mess with innodb_thread_concurrency 5. InnoDB\u7ebf\u7a0b\u5e76\u53d1\u68c0\u67e5\u673a\u5236 6. MySQL Bugs<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","inline_featured_image":false,"_tocer_settings":[],"footnotes":""},"categories":[6],"tags":[120],"class_list":["post-2666","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-innodb"],"_links":{"self":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/2666","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/comments?post=2666"}],"version-history":[{"count":10,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/2666\/revisions"}],"predecessor-version":[{"id":2682,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/2666\/revisions\/2682"}],"wp:attachment":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/media?parent=2666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/categories?post=2666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/tags?post=2666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}