{"id":34390,"date":"2023-09-03T11:50:16","date_gmt":"2023-07-19T21:09:11","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ndb%e9%9b%86%e7%be%a4%e5%9c%a8%e7%a3%81%e7%9b%98%e4%b8%8a%e6%93%8d%e4%bd%9c\/"},"modified":"2024-04-30T21:22:19","modified_gmt":"2024-04-30T13:22:19","slug":"%e4%bd%bf%e7%94%a8ndb%e9%9b%86%e7%be%a4%e5%9c%a8%e7%a3%81%e7%9b%98%e4%b8%8a%e6%93%8d%e4%bd%9c","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ndb%e9%9b%86%e7%be%a4%e5%9c%a8%e7%a3%81%e7%9b%98%e4%b8%8a%e6%93%8d%e4%bd%9c\/","title":{"rendered":"\u4f7f\u7528NDB\u96c6\u7fa4\u5728\u78c1\u76d8\u4e0a\u64cd\u4f5c"},"content":{"rendered":"<p>\u5c3d\u7ba1NDB Cluster\u5bb9\u6613\u88ab\u8bef\u89e3\uff0c\u4f46\u5b83\u5177\u5907\u4ee5\u4e0b\u7279\u6027\uff1a\u53ef\u4ee5\u5c06\u6570\u636e\u4fdd\u5b58\u5728SSD\u4e2d\uff08\u6027\u80fd\u4e3a\u4f20\u7edf\u786c\u76d8\u76841\/10\uff09\uff0c\u5e76\u4e14\u53ef\u4ee5\u901a\u8fc7Memcache API\u8bbf\u95eememcached\u3002<\/p>\n<p>\u8fd9\u6b21\u6211\u4eec\u5c06\u6267\u884c\u524d\u8005\u3002<br \/>\n\u4e8b\u5b9e\u4e0a\uff0c\u57fa\u4e8e\u78c1\u76d8\u7684NDB Cluster\u5728\u8fc7\u53bb10\u5e74\u4e2d\u6ca1\u6709\u53d8\u5316\u3002<br \/>\n\u56e0\u6b64\uff0c\u6211\u4eec\u5c06\u6309\u7167\u8fd9\u4efd\u8d44\u6599\u7684\u65b9\u5f0f\u8fdb\u884c\u64cd\u4f5c\u3002<br \/>\nhttp:\/\/d.hatena.ne.jp\/shibainu55\/20081123\/1225206847<\/p>\n<p>\u6027\u80fd\u4e3a10\u5206\u4e4b\u4e00\u662f\u6839\u636e\u60e0\u666e\u516c\u53f8\u7684\u8d44\u6599\u786e\u5b9a\u7684\u3002\u5982\u679cNVDIMM\u548c3D XPoint\uff08Optane SSD\uff09\u80fd\u591f\u53d1\u6325\u5176\u6027\u80fd\uff0c\u90a3\u4e48\u6027\u80fd\u5dee\u53ef\u80fd\u4f1a\u7f29\u5c0f\u3002<\/p>\n<p>\u4eceSQL\u8282\u70b9\u6267\u884c\u3002<\/p>\n<pre class=\"post-pre\"><code>mysql&gt; create logfile group lg_1 add undofile 'undo_1.dat' engine ndb;\r\nQuery OK, 0 rows affected (1.98 sec)\r\nmysql&gt; create tablespace ts_1 add datafile 'data_1.dat' \\\r\n    -&gt; use logfile group lg_1 engine ndb;\r\nQuery OK, 0 rows affected (1.93 sec)\r\n\u5f8c\u306fcreate table\u3067\r\ntablespace ts_1 storage disk ENGINE = ndbcluster;\r\n\u3068\u6700\u5f8c\u306b\u3064\u3051\u308b\u3060\u3051\u306b\u306a\u308a\u307e\u3059\u3002\r\n<\/code><\/pre>\n<p>\u4fdd\u5b58\u7684\u4f4d\u7f6e\u5c06\u4f4d\u4e8e\u6570\u636e\u8282\u70b9\u7684\u6570\u636e\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6\u5939\u4e2d\u3002<\/p>\n<pre class=\"post-pre\"><code>$cd \/var\/lib\/mysql-cluster\r\n\u30ce\u30fc\u30c91\r\n$ sudo ls ndb_4_fs\r\nD1  D10  D11  D2  D8  D9  data_1.dat  LCP  undo_1.dat\r\n\u30ce\u30fc\u30c92\r\n$ sudo ls ndb_5_fs\r\nD1  D10  D11  D2  D8  D9  data_1.dat  LCP  undo_1.dat\r\n\u6a19\u6e96\u3067\u306f128MB\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u3088\u3046\u3067\u3059\u3002\r\n$ sudo ls -l ndb_4_fs\r\ntotal 262236\r\ndrwxr-x--- 4 root root      4096 Dec 23 08:52 D1\r\ndrwxr-x--- 3 root root      4096 Dec 23 08:52 D10\r\ndrwxr-x--- 3 root root      4096 Dec 23 08:52 D11\r\ndrwxr-x--- 4 root root      4096 Dec 23 08:52 D2\r\ndrwxr-x--- 3 root root      4096 Dec 23 08:52 D8\r\ndrwxr-x--- 3 root root      4096 Dec 23 08:52 D9\r\n-rw-r--r-- 1 root root 134283264 Dec 23 09:10 data_1.dat\r\ndrwxr-x--- 3 root root      4096 Dec 23 08:52 LCP\r\n-rw-r--r-- 1 root root 134217728 Dec 23 09:05 undo_1.dat\r\n<\/code><\/pre>\n<p>\u5c06memcache\u63d2\u4ef6\u6539\u4e3a\u57fa\u4e8e\u78c1\u76d8\u4f7f\u7528\u3002<br \/>\n\u7f16\u8f91\/usr\/share\/mysql\/memcache-api\/ndb_memcache_metadata.sql\u6587\u4ef6\u3002<br \/>\n\u4f7f\u7528sed\u547d\u4ee4\u5c06&#8221;ENGINE&#8221;\u66ff\u6362\u4e3a&#8221;tablespace ts_1 storage disk ENGINE&#8221;\u3002<br \/>\n\u4eceSQL\u8282\u70b9\u5bfc\u5165\u3002<br \/>\n\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u542f\u52a8memache\u63d2\u4ef6\uff1acat \/usr\/share\/mysql\/memcache-api\/ndb_memcache_metadata.sql | mysql -uroot -p\u3002<\/p>\n<p>\u6839\u636e\u6211\u7684\u9a8c\u8bc1\uff0c\u5f53\u6240\u6709\u6570\u636e\u8282\u70b9\u90fd\u91cd\u65b0\u542f\u52a8\u65f6\uff0c\u5373\u4f7f\u4f7f\u7528\u57fa\u4e8e\u78c1\u76d8\u7684MySQL\uff0c\u4e5f\u4e0d\u50cf\u539f\u751f\u7684MySQL\u90a3\u6837\u5bb9\u6613\u4f7f\u7528\u3002\u6211\u5e0c\u671b\u80fd\u591f\u4ed4\u7ec6\u5b66\u4e60\u5e76\u80fd\u591f\u89e3\u91ca\u5176\u884c\u4e3a\u3002\u5bf9\u4e8e\u57fa\u4e8e\u78c1\u76d8\u7684memcache\uff0c\u4e5f\u53ef\u4ee5\u8f7b\u677e\u6784\u5efa\uff0c\u5982\u679c\u4f60\u611f\u5174\u8da3\u7684\u8bdd\uff0c\u53ef\u4ee5\u8bd5\u7740\u64cd\u4f5c\u4e00\u4e0b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5c3d\u7ba1NDB Cluster\u5bb9\u6613\u88ab\u8bef\u89e3\uff0c\u4f46\u5b83\u5177\u5907\u4ee5\u4e0b\u7279\u6027\uff1a\u53ef\u4ee5\u5c06\u6570\u636e\u4fdd\u5b58\u5728SSD\u4e2d\uff08\u6027\u80fd\u4e3a\u4f20\u7edf\u786c\u76d8\u76841\/10\uff09\uff0c [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-34390","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528NDB\u96c6\u7fa4\u5728\u78c1\u76d8\u4e0a\u64cd\u4f5c - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528ndb\u96c6\u7fa4\u5728\u78c1\u76d8\u4e0a\u64cd\u4f5c\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528NDB\u96c6\u7fa4\u5728\u78c1\u76d8\u4e0a\u64cd\u4f5c\" \/>\n<meta property=\"og:description\" content=\"\u5c3d\u7ba1NDB Cluster\u5bb9\u6613\u88ab\u8bef\u89e3\uff0c\u4f46\u5b83\u5177\u5907\u4ee5\u4e0b\u7279\u6027\uff1a\u53ef\u4ee5\u5c06\u6570\u636e\u4fdd\u5b58\u5728SSD\u4e2d\uff08\u6027\u80fd\u4e3a\u4f20\u7edf\u786c\u76d8\u76841\/10\uff09\uff0c [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528ndb\u96c6\u7fa4\u5728\u78c1\u76d8\u4e0a\u64cd\u4f5c\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-19T21:09:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-30T13:22:19+00:00\" \/>\n<meta name=\"author\" content=\"\u65b0, \u97f5\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u65b0, \u97f5\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ndb%e9%9b%86%e7%be%a4%e5%9c%a8%e7%a3%81%e7%9b%98%e4%b8%8a%e6%93%8d%e4%bd%9c\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ndb%e9%9b%86%e7%be%a4%e5%9c%a8%e7%a3%81%e7%9b%98%e4%b8%8a%e6%93%8d%e4%bd%9c\/\",\"name\":\"\u4f7f\u7528NDB\u96c6\u7fa4\u5728\u78c1\u76d8\u4e0a\u64cd\u4f5c - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-07-19T21:09:11+00:00\",\"dateModified\":\"2024-04-30T13:22:19+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ndb%e9%9b%86%e7%be%a4%e5%9c%a8%e7%a3%81%e7%9b%98%e4%b8%8a%e6%93%8d%e4%bd%9c\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ndb%e9%9b%86%e7%be%a4%e5%9c%a8%e7%a3%81%e7%9b%98%e4%b8%8a%e6%93%8d%e4%bd%9c\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ndb%e9%9b%86%e7%be%a4%e5%9c%a8%e7%a3%81%e7%9b%98%e4%b8%8a%e6%93%8d%e4%bd%9c\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528NDB\u96c6\u7fa4\u5728\u78c1\u76d8\u4e0a\u64cd\u4f5c\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\",\"name\":\"\u65b0, \u97f5\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"caption\":\"\u65b0, \u97f5\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ndb%e9%9b%86%e7%be%a4%e5%9c%a8%e7%a3%81%e7%9b%98%e4%b8%8a%e6%93%8d%e4%bd%9c\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528NDB\u96c6\u7fa4\u5728\u78c1\u76d8\u4e0a\u64cd\u4f5c - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528ndb\u96c6\u7fa4\u5728\u78c1\u76d8\u4e0a\u64cd\u4f5c\/","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528NDB\u96c6\u7fa4\u5728\u78c1\u76d8\u4e0a\u64cd\u4f5c","og_description":"\u5c3d\u7ba1NDB Cluster\u5bb9\u6613\u88ab\u8bef\u89e3\uff0c\u4f46\u5b83\u5177\u5907\u4ee5\u4e0b\u7279\u6027\uff1a\u53ef\u4ee5\u5c06\u6570\u636e\u4fdd\u5b58\u5728SSD\u4e2d\uff08\u6027\u80fd\u4e3a\u4f20\u7edf\u786c\u76d8\u76841\/10\uff09\uff0c [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528ndb\u96c6\u7fa4\u5728\u78c1\u76d8\u4e0a\u64cd\u4f5c\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-07-19T21:09:11+00:00","article_modified_time":"2024-04-30T13:22:19+00:00","author":"\u65b0, \u97f5","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u65b0, \u97f5","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ndb%e9%9b%86%e7%be%a4%e5%9c%a8%e7%a3%81%e7%9b%98%e4%b8%8a%e6%93%8d%e4%bd%9c\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ndb%e9%9b%86%e7%be%a4%e5%9c%a8%e7%a3%81%e7%9b%98%e4%b8%8a%e6%93%8d%e4%bd%9c\/","name":"\u4f7f\u7528NDB\u96c6\u7fa4\u5728\u78c1\u76d8\u4e0a\u64cd\u4f5c - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-07-19T21:09:11+00:00","dateModified":"2024-04-30T13:22:19+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ndb%e9%9b%86%e7%be%a4%e5%9c%a8%e7%a3%81%e7%9b%98%e4%b8%8a%e6%93%8d%e4%bd%9c\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ndb%e9%9b%86%e7%be%a4%e5%9c%a8%e7%a3%81%e7%9b%98%e4%b8%8a%e6%93%8d%e4%bd%9c\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ndb%e9%9b%86%e7%be%a4%e5%9c%a8%e7%a3%81%e7%9b%98%e4%b8%8a%e6%93%8d%e4%bd%9c\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528NDB\u96c6\u7fa4\u5728\u78c1\u76d8\u4e0a\u64cd\u4f5c"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9","name":"\u65b0, \u97f5","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","caption":"\u65b0, \u97f5"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ndb%e9%9b%86%e7%be%a4%e5%9c%a8%e7%a3%81%e7%9b%98%e4%b8%8a%e6%93%8d%e4%bd%9c\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=34390"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34390\/revisions"}],"predecessor-version":[{"id":94372,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34390\/revisions\/94372"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=34390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=34390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=34390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}