{"id":1832,"date":"2010-04-16T17:43:44","date_gmt":"2010-04-16T09:43:44","guid":{"rendered":"http:\/\/www.orczhou.com\/?p=1832"},"modified":"2010-04-17T19:10:30","modified_gmt":"2010-04-17T11:10:30","slug":"innodb-plugin-faster-recovery","status":"publish","type":"post","link":"https:\/\/www.orczhou.com\/index.php\/2010\/04\/innodb-plugin-faster-recovery\/","title":{"rendered":"Faster Recovery of InnoDB Plugin 1.0.7GA"},"content":{"rendered":"<p>\u8fd9\u4e24\u5929\u662f<a href=\"http:\/\/en.oreilly.com\/mysql2010\/\">O&#8217;Reilly MySQL Conference &#038; Expo<\/a>\uff0c\u671f\u95f4\u6709\u5f88\u591a\u5173\u4e8eMySQL\u7684\u76f8\u5173\u8bdd\u9898\u7684\u4ecb\u7ecd\uff0c\u5305\u62ecMySQL\u3001PBXT\u3001Drizzle\u3001MariaDB\u3001XtraDB\u7b49\u7b49\uff0c\u4e0d\u8fc7\u6700\u62a2\u98ce\u5934\u7684\u5e94\u8be5\u662fInnoDB1.0.7GA\uff08with MySQL-5.5\uff09\u7684\u65b0\u7279\u6027\uff0c\u56de\u5934\u60f3\u60f3\uff0cOracle\/InnoDB\u4e5f\u915d\u917f\u4e86\u5f88\u4e45\u7684\u5427\u3002<\/p>\n<p>\u65e0\u8bba\u5982\u4f55\uff0c\u8fd9\u4e9b\u65b0\u7279\u6027\u4e2d\u6700\u5438\u5f15\u6211\u7684\u662fInnoDB\u7684Faster Recovery\u3002<\/p>\n<p>\u4e00\u822c\u5730\uff0cMySQL\/InnoDB\u90fd\u662f\u8fd0\u884c\u5728\u666e\u901a\u7684PC Server + Linux\uff08Unix\uff09\uff0c\u867d\u7136\u4e0d\u671f\u5f85\u5c0f\u578b\u673a+AIX\u7684\u9ad8\u53ef\u7528\uff0c\u4f46\u60f3\u5c3d\u4e00\u5207\u529e\u6cd5\u7f29\u77edMySQL\u7684\u4e0d\u53ef\u7528\u65f6\u95f4\uff0c\u4ecd\u7136\u662fDBA\u7684\u76ee\u6807\u3002\u6839\u636e\u7ecf\u9a8c\uff0c\u4e3b\u673aOS\u5d29\u6e83\u3001\u786c\u4ef6\u6545\u969c\uff0c\u4ecd\u7136\u662f\u5f71\u54cdMySQL\u53ef\u7528\u6027\u7684\u6700\u4e3b\u8981\u56e0\u7d20\uff0c\u5f53\u8fd9\u4e9b\u6545\u969c\uff08OS\u3001\u786c\u4ef6\uff09\u6062\u590d\u540e\uff0c\u53e6\u4e00\u4e2a<strong>\u975e\u5e38\u8017\u65f6<\/strong>\u7684\u6062\u590d\u5c31\u662fInnoDB\u81ea\u5df1\u7684\u6062\u590d\u65f6\u95f4\u3002\u4e00\u822c\u4e3b\u673a\u53d1\u751f\u4e00\u6b21\u91cd\u542f\uff0c\u6b63\u5e38\u5927\u7ea6<5\u5206\u949f\uff0c\u800c\u8fd9\u65f6InnoDB\u6062\u590d\u53ef\u80fd\u9700\u898140\u5206\u949f\u6216\u8005\u66f4\u4e45\uff08\u8fd9\u4f9d\u8d56\u4e8eBuffer Pool\u3001\u810f\u9875\u9762\u6bd4\u4f8b\u3001TPS\u7b49\u56e0\u7d20\uff09\u3002<!--more--><\/p>\n<p>\u8bd5\u60f3\uff0c\u5982\u679c\u6bcf\u6b21\u80fd\u591f\u628a\u6545\u969c\u65f6\u95f4\u63a7\u5236\u572810\u5206\u949f\u4e4b\u5185\uff0c\u90a3\u4e48\u901a\u8fc7\u5e94\u7528\u5bb9\u9519\u3001Cache\u652f\u6301\u7b49\u529e\u6cd5\uff0c\u7528\u6237\u4f53\u9a8c\u548c\u53ef\u7528\u65f6\u95f4\u90fd\u5c06\u6709\u8fdb\u4e00\u6b65\u7684\u63d0\u5347\u3002<\/p>\n<p>\u8fd9\u6b21Plugin1.0.7GA\u901a\u8fc7\u7b97\u6cd5\u548c\u5185\u5b58\u7ba1\u7406\u4e0a\u7684\u6539\u8fdb\uff0c\u5c06\u6062\u590d\u65f6\u95f4<a href=\"http:\/\/blogs.innodb.com\/wp\/2010\/04\/innodb-performance-recovery\/\">\u5927\u5927\u7f29\u77ed<\/a>\u3002<\/p>\n<p><font color=\"red\">\u5b9e\u9a8c\uff1a<\/font><\/p>\n<p>\u5728InnoDB Blog\u4e2d\uff0c\u7ed9\u51fa\u4e86\u4e00\u4e2a<a href=\"http:\/\/blogs.innodb.com\/wp\/2010\/04\/innodb-performance-recovery\/\">\u6d4b\u8bd5<\/a>\uff1aPlugin1.0.6\u82b1\u8d397\u5c0f\u65f638\u5206\u949f\u6062\u590d\u7684\u8fc7\u7a0b\uff0c\u4f7f\u7528Plugin1.0.7\u5219\u4ec5\u4ec5\u82b1\u4e8613\u520656\u79d2\uff0c\u603b\u5171\u5feb\u4e8632\u500d\uff0c\u5176\u4e2d\u626b\u63cfRedo\u9636\u6bb5\u5feb\u4e8616\u500d\uff0c\u5e94\u7528\u65e5\u5fd7\u9636\u6bb5\u5feb\u4e8635\u500d\u3002\uff08\u5b9e\u9a8c\u4e2dBuffer Pool\u662f18G\uff09<\/p>\n<p>\u73b0\u5728\uff0cMySQL-5.5.4-m3\u81ea\u5e26\u7684\u662fInnoDB-1.1\uff0c\u4e5f\u53ef\u4ee5\u81ea\u5df1\u6d4b\u8bd5\u4e00\u4e0b\u3002<\/p>\n<pre><div class=\"mycode\">root@(none) 05:33:03>select version(),@@innodb_version;\r\n+--------------+------------------+\r\n| version()    | @@innodb_version |\r\n+--------------+------------------+\r\n| 5.5.4-m3-log | 1.1.0            |\r\n+--------------+------------------+\r\n<\/div><\/pre>\n<p><font color=\"red\">\u539f\u7406\uff1a<\/font><\/p>\n<p>\u5d29\u6e83\u6062\u590d\uff08Crash recovery\uff09\u53ef\u4ee5\u770b\u6210\u4e24\u4e2a\u9636\u6bb5\uff0c\u7b2c\u4e00\u9636\u6bb5\u79f0\u4e3a\u626b\u63cf\u91cd\u505a\u65e5\u5fd7\uff08Redo scan\uff09\uff0c\u8fd9\u65f6InnoDB\u8bfb\u53d6\u78c1\u76d8\u4e0a\u7684Redo Log\uff0c\u5e76\u5c06\u5176\u5b58\u653e\u5230\u4e00\u4e2aHash\u8868\u4e2d\uff1b\u7b2c\u4e8c\u9636\u6bb5\u5e94\u7528\u8fd9\u4e9bRedo Log\uff0c\u5c06\u8fd9\u4e9b\u65e5\u5fd7\u5e94\u7528\u5230Data Page\u4e0a\u3002<\/p>\n<p>\u5728\u5c06Redo Log\u8bfb\u53d6\u5230Buffer Pool\u7684Hash\u8868\u7684\u8fc7\u7a0b\u4e2d\uff0cInnoDB\u5728\u9700\u8981\u7684\u65f6\u5019\u5206\u914d16K\u7684Block\u7528\u6765\u5b58\u50a8\u8fd9\u4e2a\u8fd9\u4e9bRedo\u3002\u4e3a\u4e86\u786e\u4fddBuffer Pool\u4e2d\u6709\u8db3\u591f\u5269\u4f59\u7a7a\u95f4\u6765\u5b58\u50a8\u6570\u636e\u9875\uff08Data Page\uff09\uff0c\u8fd9\u6837\u5982\u679cRedo\u5f88\u5927\u7684\u8bdd\uff0c\u8fd9\u4e2aBlock heap\u4e5f\u4f1a\u5f88\u5927\u3002\u8fd9\u91ccInnoDB\u505a\u4e86\u4e00\u4ef6\u5f882\u7684\u4e8b\u60c5\uff0c\u6bcf\u6b21\u8bfb\u53d6\u4e00\u4e2aRedo\u7684\u65f6\u5019\uff0c\u90fd\u4f1a\u904d\u5386\u4e00\u6b21\u524d\u9762\u7684Heap\u6765\u786e\u4fdd\uff0c\u6ca1\u6709\u5360\u7528\u592a\u591a\u7684\u7a7a\u95f4\u3002\u6240\u4ee5\uff0c\u5982\u679c\u5d29\u6e83\u524dInnoDB\u7684Buffer Pool\u5f88\u5927\uff0cDirty Page\u5f88\u591a\uff0c\u8fd9\u4e2aHeap\u53ef\u80fd\u5f88\u5927\uff0c\u6bcf\u6b21\u904d\u5386\u5c31\u4f1a\u5927\u5927\u964d\u4f4e\u6062\u590d\u65f6\u7684\u6548\u7387\u3002<\/p>\n<p>InnoDB\u901a\u8fc7\u7ed9\u8fd9\u4e2aHeap\u589e\u52a0\u4e00\u4e2aheader\u6765\u5b58\u50a8\u8fd9\u4e9b\u4fe1\u606f\uff0c\u89e3\u51b3\u4e86\u4e0a\u9762\u7684\u95ee\u9898\u3002<\/p>\n<p>\u6062\u590d\u8fc7\u7a0b\u4e2d\uff0c\u53e6\u4e00\u4e2a\u8017\u65f6\u7684\u64cd\u4f5c\u662f\u53d1\u751f\u5728\u5e94\u7528Redo\u7684\u9636\u6bb5\u3002\u6bcf\u4e00\u4e2a\u5e94\u7528\u4e86Redo Log\u7684Data Page\u90fd\u4f1a\u88ab\u653e\u5230\u4e00\u4e2a\u53ebFlush_list\u7684\u94fe\u8868\u4e2d\u7b49\u5f85Flush\uff0c\u800c\u8fd9\u4e2a\u94fe\u8868\u4e2d\u7684Data Page\u662f\u4e25\u683c\u5b89\u88c5\u5176<a href=\"http:\/\/www.mysqlperformanceblog.com\/2007\/12\/19\/mvcc-transaction-ids-log-sequence-numbers-and-snapshots\/\">LSN<\/a>\u987a\u5e8f\u6392\u5217\u7684\uff0c\u5728InnoDB\u6b63\u5e38\u5de5\u4f5c\u7684\u65f6\u5019\uff0c\u8fd9\u603b\u662f\u6ca1\u6709\u95ee\u9898\u7684\uff0c\u56e0\u4e3aData Page\u7684LSN\u503c\u603b\u662f\u5355\u8c03\u589e\u52a0\u7684\u3002\u4f46\u662f\u5728\u6062\u590d\u9636\u6bb5\uff0cInnoDB\u5219\u9700\u8981\u4e0d\u65ad\u7684\u626b\u63cf\u8fd9\u6574\u4e2a\u94fe\u8868\u6765\u786e\u5b9a\u4e00\u4e2aData Page\u7684\u4f4d\u7f6e\u3002<\/p>\n<p>\u8fd9\u4e2a\u95ee\u9898\u7531\u6765\u5df2\u4e45\uff08<a href=\"http:\/\/bugs.mysql.com\/bug.php?id=29847\">Bug<\/a>\uff0c<a href=\"http:\/\/www.mysqlperformanceblog.com\/2007\/07\/17\/innodb-recovery-is-large-buffer-pool-always-better\/\">Improving InnoDB recovery time<\/a>\uff09\uff0c\u6700\u7ec8\uff0c\u5728\u793e\u533a\u7ed9\u51faPatch\u4e4b\u540e\uff0cInnoDB\u7ec8\u4e8e\u4fee\u590d\u4e86\u8fd9\u4e2a\u95ee\u9898\u3002<\/p>\n<p>InnoDB\u5728\u6062\u590d\u9636\u6bb5\uff0c\u901a\u8fc7\u4e00\u68f5\u8f85\u52a9\u7684<a href=\"http:\/\/en.wikipedia.org\/wiki\/Red-black_tree\">\u7ea2\u9ed1\u6811<\/a>\uff08Red-Black Tree\uff09\u6765\u5b58\u50a8\u8fd9\u4e9bPage\uff0c\u501f\u6b64\u6765\u907f\u514d\u5355\u7eaf\u7684\u626b\u63cf\u3002\u5728\u6062\u590d\u9636\u6bb5\u7ed3\u675f\u540e\uff0c\u8fd9\u68f5\u7ea2\u9ed1\u6811\u5c06\u88ab\u5220\u9664\uff0cFlush_list\u4ecd\u7136\u4fdd\u6301\u539f\u6765\u7684\u7ed3\u6784\u3002<\/p>\n<p><font color=\"red\">\u6700\u540e\uff1a<\/font><\/p>\n<p>\u5982\u679c\u8fd9\u4e2a\u7279\u6027\u7a33\u5b9a\uff0c\u90a3\u4e48\uff0c\u4ee5\u540eBuffer Pool\u5c31\u53ef\u4ee5\u66f4\u653e\u5fc3\u7684\u8c03\u5927\u4e9b\u4e86\u3002<\/p>\n<p>\u53c2\u8003\u6587\u732e\uff1a<\/p>\n<ol>\n<li><a href=\"http:\/\/dev.mysql.com\/doc\/innodb-plugin\/1.1\/en\/innodb-changes-107.html\"> Changes in InnoDB Plugin 1.0.7<\/a><\/li>\n<li><a href=\"http:\/\/dev.mysql.com\/tech-resources\/articles\/introduction-to-mysql-55.html\">Introduction to MySQL 5.5<\/a><\/li>\n<li><a href=\"http:\/\/blogs.innodb.com\/wp\/2010\/04\/innodb-performance-recovery\/\">InnoDB recovery is now faster\u2026much faster<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u4e24\u5929\u662fO&#8217;Reilly MySQL Conference &#038; Expo\uff0c\u671f\u95f4\u6709\u5f88\u591a\u5173\u4e8eMySQL\u7684\u76f8\u5173\u8bdd\u9898\u7684\u4ecb\u7ecd\uff0c\u5305\u62ecMySQL\u3001PBXT\u3001Drizzle\u3001MariaDB\u3001XtraDB\u7b49\u7b49\uff0c\u4e0d\u8fc7\u6700\u62a2\u98ce\u5934\u7684\u5e94\u8be5\u662fInnoDB1.0.7GA\uff08with MySQL-5.5\uff09\u7684\u65b0\u7279\u6027\uff0c\u56de\u5934\u60f3\u60f3\uff0cOracle\/InnoDB\u4e5f\u915d\u917f\u4e86\u5f88\u4e45\u7684\u5427\u3002 \u65e0\u8bba\u5982\u4f55\uff0c\u8fd9\u4e9b\u65b0\u7279\u6027\u4e2d\u6700\u5438\u5f15\u6211\u7684\u662fInnoDB\u7684Faster Recovery\u3002 \u4e00\u822c\u5730\uff0cMySQL\/InnoDB\u90fd\u662f\u8fd0\u884c\u5728\u666e\u901a\u7684PC Server + Linux\uff08Unix\uff09\uff0c\u867d\u7136\u4e0d\u671f\u5f85\u5c0f\u578b\u673a+AIX\u7684\u9ad8\u53ef\u7528\uff0c\u4f46\u60f3\u5c3d\u4e00\u5207\u529e\u6cd5\u7f29\u77edMySQL\u7684\u4e0d\u53ef\u7528\u65f6\u95f4\uff0c\u4ecd\u7136\u662fDBA\u7684\u76ee\u6807\u3002\u6839\u636e\u7ecf\u9a8c\uff0c\u4e3b\u673aOS\u5d29\u6e83\u3001\u786c\u4ef6\u6545\u969c\uff0c\u4ecd\u7136\u662f\u5f71\u54cdMySQL\u53ef\u7528\u6027\u7684\u6700\u4e3b\u8981\u56e0\u7d20\uff0c\u5f53\u8fd9\u4e9b\u6545\u969c\uff08OS\u3001\u786c\u4ef6\uff09\u6062\u590d\u540e\uff0c\u53e6\u4e00\u4e2a\u975e\u5e38\u8017\u65f6\u7684\u6062\u590d\u5c31\u662fInnoDB\u81ea\u5df1\u7684\u6062\u590d\u65f6\u95f4\u3002\u4e00\u822c\u4e3b\u673a\u53d1\u751f\u4e00\u6b21\u91cd\u542f\uff0c\u6b63\u5e38\u5927\u7ea6&lt;5\u5206\u949f\uff0c\u800c\u8fd9\u65f6InnoDB\u6062\u590d\u53ef\u80fd\u9700\u898140\u5206\u949f\u6216\u8005\u66f4\u4e45\uff08\u8fd9\u4f9d\u8d56\u4e8eBuffer Pool\u3001\u810f\u9875\u9762\u6bd4\u4f8b\u3001TPS\u7b49\u56e0\u7d20\uff09\u3002<\/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,52],"class_list":["post-1832","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-innodb","tag-innodb-plugin"],"_links":{"self":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/1832","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=1832"}],"version-history":[{"count":16,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/1832\/revisions"}],"predecessor-version":[{"id":1857,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/1832\/revisions\/1857"}],"wp:attachment":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/media?parent=1832"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/categories?post=1832"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/tags?post=1832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}