{"id":48162,"date":"2025-07-30T10:57:35","date_gmt":"2025-07-30T02:57:35","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/48162.html"},"modified":"2025-07-30T10:57:35","modified_gmt":"2025-07-30T02:57:35","slug":"%e3%80%90%e5%ad%98%e5%82%a8%e3%80%91%e5%ad%98%e5%82%a8%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/48162.html","title":{"rendered":"\u3010\u5b58\u50a8\u3011\u5b58\u50a8\u670d\u52a1\u5668"},"content":{"rendered":"<h2>\u4e00\u3001\u5b58\u50a8<\/h2>\n<h3>1.1 \u5b58\u50a8\u670d\u52a1\u5668<\/h3>\n<p>\u5b58\u50a8\u670d\u52a1\u5668\u662f\u4f01\u4e1a\u7ea7\u6570\u636e\u5b58\u50a8\u7684\u6838\u5fc3\u57fa\u7840\u8bbe\u65bd&#xff0c;\u5176\u8bbe\u8ba1\u878d\u5408\u4e86\u786c\u4ef6\u5de5\u7a0b\u3001\u8f6f\u4ef6\u7b97\u6cd5\u548c\u7f51\u7edc\u6280\u672f\u7684\u5c16\u7aef\u6210\u679c\u3002\u4ee5\u4e0b\u662f\u5b58\u50a8\u670d\u52a1\u5668\u7684\u6838\u5fc3\u6280\u672f\u3001\u6838\u5fc3\u90e8\u4ef6\u53ca\u4e3b\u6d41\u5382\u5546\u7684\u8bbe\u8ba1\u65b9\u6cd5\u8bba\u89e3\u6790&#xff1a;<\/p>\n<hr \/>\n<h4>\u00a0\u200b1.1.1\u3001\u5b58\u50a8\u670d\u52a1\u5668\u6838\u5fc3\u6280\u672f\u200b<\/h4>\n<h5>1. \u200b\u5b58\u50a8\u534f\u8bae\u6808\u200b<\/h5>\n<table>\n<tr>\u200b\u534f\u8bae\u5c42\u200b\u200b\u4ee3\u8868\u6280\u672f\u200b\u200b\u5e94\u7528\u573a\u666f\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u5757\u5b58\u50a8\u534f\u8bae<\/td>\n<td>iSCSI, NVMe-oF, FC<\/td>\n<td>\u6570\u636e\u5e93\/\u865a\u62df\u673a\u7b49\u4f4e\u5ef6\u8fdf\u573a\u666f<\/td>\n<\/tr>\n<tr>\n<td>\u6587\u4ef6\u5b58\u50a8\u534f\u8bae<\/td>\n<td>NFS, SMB\/CIFS, pNFS<\/td>\n<td>\u4f01\u4e1a\u6587\u4ef6\u5171\u4eab\/\u5a92\u4f53\u7f16\u8f91<\/td>\n<\/tr>\n<tr>\n<td>\u5bf9\u8c61\u5b58\u50a8\u534f\u8bae<\/td>\n<td>S3, Swift<\/td>\n<td>\u4e91\u5b58\u50a8\/\u5927\u6570\u636e\u6e56<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>2. \u200b\u6570\u636e\u4fdd\u62a4\u6280\u672f\u200b<\/h5>\n<ul>\n<li>\u200bRAID\u8fdb\u5316\u200b&#xff1a;\n<ul>\n<li>RAID 6&#xff08;\u53cc\u76d8\u5bb9\u9519&#xff09;\u2192 RAID 60&#xff08;\u8de8\u9635\u5217\u5197\u4f59&#xff09;\u2192 Erasure Coding&#xff08;\u5206\u5e03\u5f0f\u64e6\u9664\u7801&#xff0c;\u5bb9\u5fcd\u591a\u8282\u70b9\u6545\u969c&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>\u200bCDP&#xff08;\u6301\u7eed\u6570\u636e\u4fdd\u62a4&#xff09;\u200b\u200b&#xff1a;<br \/>\n\u5b57\u8282\u7ea7\u5b9e\u65f6\u5907\u4efd&#xff08;\u6062\u590d\u70b9\u95f4\u9694&lt;1\u79d2&#xff09;&#xff0c;\u5982Dell PowerProtect\u7cfb\u5217<\/li>\n<\/ul>\n<h5>3. \u200b\u6027\u80fd\u52a0\u901f\u6280\u672f\u200b<\/h5>\n<p>graph LR<br \/>\n    A[CPU] &#8211;&gt;|NVMe over Fabrics| B[\u95ea\u5b58\u9635\u5217]<br \/>\n    A &#8211;&gt;|GPU Offload| C[AI\u6570\u636e\u5904\u7406]<br \/>\n    B &#8211;&gt;|RDMA\u7f51\u7edc| D[\u8ba1\u7b97\u8282\u70b9]<br \/>\n    C &#8211;&gt;|TensorRT\u52a0\u901f| E[\u6a21\u578b\u63a8\u7406]<\/p>\n<h5>4. \u200b\u667a\u80fd\u7ba1\u7406\u6280\u672f\u200b<\/h5>\n<ul>\n<li>\u200b\u673a\u5668\u5b66\u4e60\u9884\u6d4b\u200b&#xff1a;<br \/>\nHPE InfoSight\u901a\u8fc710\u4ebf&#043;\u4f20\u611f\u5668\u6570\u636e\u5206\u6790&#xff0c;\u63d0\u524d14\u5929\u9884\u6d4b\u786c\u76d8\u6545\u969c<\/li>\n<li>\u200b\u81ea\u52a8\u5316\u5206\u5c42\u5b58\u50a8\u200b&#xff1a;<br \/>\nNetApp FabricPool\u81ea\u52a8\u8fc1\u79fb\u51b7\u6570\u636e\u81f3\u5bf9\u8c61\u5b58\u50a8&#xff08;\u6210\u672c\u964d60%&#xff09;<\/li>\n<\/ul>\n<hr \/>\n<h4>\u200b1.1.2\u3001\u6838\u5fc3\u786c\u4ef6\u90e8\u4ef6\u200b<\/h4>\n<table>\n<tr>\u200b\u90e8\u4ef6\u200b\u200b\u6280\u672f\u89c4\u683c\u200b\u200b\u6027\u80fd\u5f71\u54cd\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u200b\u5b58\u50a8\u63a7\u5236\u5668\u200b<\/td>\n<td>\u591a\u6838ARM\/SoC\u82af\u7247&#xff08;\u5982Marvell 98DX\u7cfb\u5217&#xff09;<\/td>\n<td>\u5904\u7406IOPS 200\u4e07&#043;<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u95ea\u5b58\u6a21\u5757\u200b<\/td>\n<td>NVMe SSD&#xff08;U.2\/E1.S\u5f62\u6001&#xff09;<\/td>\n<td>\u5ef6\u8fdf&lt;100\u03bcs&#xff0c;\u5e26\u5bbd32Gbps<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u5185\u5b58\u7f13\u5b58\u200b<\/td>\n<td>3D XPoint\/Optane\u6301\u4e45\u5185\u5b58<\/td>\n<td>\u65ad\u7535\u6570\u636e\u4fdd\u62a4&#xff0c;\u901f\u5ea6\u6bd4SSD\u5feb1000\u500d<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u7f51\u7edc\u63a5\u53e3\u200b<\/td>\n<td>100GbE RoCEv2\/FC32G<\/td>\n<td>RDMA\u52a0\u901f&#xff0c;\u96f6\u62f7\u8d1d\u4f20\u8f93<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u80cc\u677f\u67b6\u6784\u200b<\/td>\n<td>PCIe 4.0 x16\u4ea4\u6362\u80cc\u677f<\/td>\n<td>\u652f\u6301\u70ed\u63d2\u62d4NVMe\u6269\u5c55<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>1.1.3\u3001\u4e3b\u6d41\u5382\u5546\u8bbe\u8ba1\u65b9\u6cd5\u8bba\u200b<\/h4>\n<h5>1. \u200bDell EMC PowerStore\u200b<\/h5>\n<ul>\n<li>\u200b\u8bbe\u8ba1\u7406\u5ff5\u200b&#xff1a;\u5bb9\u5668\u5316\u5b58\u50a8\u64cd\u4f5c\u7cfb\u7edf<\/li>\n<li>\u200b\u6838\u5fc3\u6280\u672f\u200b&#xff1a;\n<ul>\n<li>\u200bAppsON\u6a21\u5f0f\u200b&#xff1a;\u76f4\u63a5\u5728\u5b58\u50a8\u8282\u70b9\u8fd0\u884c\u5e94\u7528\u5bb9\u5668&#xff08;\u5982MongoDB&#xff09;<\/li>\n<li>\u200b\u52a8\u6001\u5f39\u6027\u5f15\u64ce\u200b&#xff1a;\u81ea\u52a8\u5e73\u8861\u6570\u636e\u5757\u4e0e\u6587\u4ef6\u670d\u52a1\u8d44\u6e90<\/li>\n<\/ul>\n<\/li>\n<li>\u200b\u786c\u4ef6\u521b\u65b0\u200b&#xff1a;<br \/>\n\u53cc\u7aef\u53e3NVMe SSD&#xff08;\u5355\u76d8\u6545\u969c0\u5207\u6362\u65f6\u95f4&#xff09;<\/li>\n<\/ul>\n<h5>2. \u200bHPE Alletra\u200b<\/h5>\n<ul>\n<li>\u200b\u8bbe\u8ba1\u7406\u5ff5\u200b&#xff1a;\u4e91\u539f\u751f\u67b6\u6784<\/li>\n<li>\u200b\u6838\u5fc3\u6280\u672f\u200b&#xff1a;\n<ul>\n<li>\u200bData Services Cloud Console\u200b&#xff1a;\u7edf\u4e00\u4e91\u7ba1\u7406\u5e73\u53f0<\/li>\n<li>\u200bAIOps\u5f15\u64ce\u200b&#xff1a;\u9884\u6d4b\u6027\u7ef4\u62a4\u51c6\u786e\u738799.5%<\/li>\n<\/ul>\n<\/li>\n<li>\u200b\u786c\u4ef6\u521b\u65b0\u200b&#xff1a;<br \/>\n\u6db2\u51b7\u673a\u7bb1&#xff08;PUE&lt;1.1&#xff09;<\/li>\n<\/ul>\n<h5>3. \u200bNetApp AFF\u200b<\/h5>\n<ul>\n<li>\u200b\u8bbe\u8ba1\u7406\u5ff5\u200b&#xff1a;\u95ea\u5b58\u4f18\u5316&#043;\u4e91\u96c6\u6210<\/li>\n<li>\u200b\u6838\u5fc3\u6280\u672f\u200b&#xff1a;\n<ul>\n<li>\u200bONTAP WAFL\u6587\u4ef6\u7cfb\u7edf\u200b&#xff1a;\u5199\u65f6\u91cd\u5b9a\u5411&#xff08;\u907f\u514d\u5199\u653e\u5927&#xff09;<\/li>\n<li>\u200bSnapMirror\u200b&#xff1a;\u79d2\u7ea7RPO\u8de8\u7ad9\u70b9\u590d\u5236<\/li>\n<\/ul>\n<\/li>\n<li>\u200b\u786c\u4ef6\u521b\u65b0\u200b&#xff1a;<br \/>\nStorageGRID\u5bf9\u8c61\u5b58\u50a8\u7f51\u5173&#xff08;\u672c\u5730S3\u63a5\u53e3&#xff09;<\/li>\n<\/ul>\n<h5>4. \u200bPure Storage FlashBlade\u200b<\/h5>\n<ul>\n<li>\u200b\u8bbe\u8ba1\u7406\u5ff5\u200b&#xff1a;\u5168\u95ea\u5b58\u7edf\u4e00\u5b58\u50a8<\/li>\n<li>\u200b\u6838\u5fc3\u6280\u672f\u200b&#xff1a;\n<ul>\n<li>\u200bPurity\/\/FB\u200b&#xff1a;\u4e13\u4e3a\u6587\u4ef6\/\u5bf9\u8c61\u4f18\u5316\u7684\u64cd\u4f5c\u7cfb\u7edf<\/li>\n<li>\u200bDirectFlash\u6a21\u5757\u200b&#xff1a;\u6d88\u9664SSD\u63a7\u5236\u5668\u74f6\u9888<\/li>\n<\/ul>\n<\/li>\n<li>\u200b\u786c\u4ef6\u521b\u65b0\u200b&#xff1a;<br \/>\n\u5200\u7247\u5f0f\u8bbe\u8ba1&#xff08;\u5355\u673a\u67dc10PB\u5bb9\u91cf&#xff09;<\/li>\n<\/ul>\n<h5>5. \u200b\u534e\u4e3aOceanStor\u200b<\/h5>\n<ul>\n<li>\u200b\u8bbe\u8ba1\u7406\u5ff5\u200b&#xff1a;\u5168\u573a\u666f\u878d\u5408<\/li>\n<li>\u200b\u6838\u5fc3\u6280\u672f\u200b&#xff1a;\n<ul>\n<li>\u200bHyperMetro\u200b&#xff1a;\u53cc\u6d3b\u65b9\u6848&#xff08;\u6545\u969c\u5207\u6362&lt;1s&#xff09;<\/li>\n<li>\u200bSmartDedupe\u200b&#xff1a;\u5168\u5c40\u91cd\u5220&#xff08;\u538b\u7f29\u6bd45:1&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>\u200b\u786c\u4ef6\u521b\u65b0\u200b&#xff1a;<br \/>\n\u9cb2\u9e4f920\u82af\u7247&#043;\u6607\u817eAI\u52a0\u901f\u5361<\/li>\n<\/ul>\n<hr \/>\n<h4>1.1.4\u3001\u524d\u6cbf\u6280\u672f\u6f14\u8fdb\u200b<\/h4>\n<h5>1. \u200b\u5b58\u50a8\u7ea7\u5185\u5b58&#xff08;SCM&#xff09;\u200b\u200b<\/h5>\n<ul>\n<li>\u200bIntel Optane PMem\u200b&#xff1a;<br \/>\n\u5728PowerStore\u4e2d\u7528\u4f5c\u5199\u7f13\u5b58&#xff0c;IOPS\u63d0\u53474\u500d<\/li>\n<li>\u200bSamsung Z-SSD\u200b&#xff1a;<br \/>\n\u5ef6\u8fdf&lt;10\u03bcs&#xff0c;\u7528\u4e8e\u534e\u4e3aOceanStor\u9ad8\u7aef\u9635\u5217<\/li>\n<\/ul>\n<h5>2. \u200bDPU\u667a\u80fd\u5378\u8f7d\u200b<\/h5>\n<ul>\n<li>\u200bNVIDIA BlueField\u200b&#xff1a;<br \/>\n\u5728Pure Storage\u4e2d\u5b9e\u73b0\u52a0\u5bc6\/\u538b\u7f29\u786c\u4ef6\u52a0\u901f<\/li>\n<li>\u200bFungible DPU\u200b&#xff1a;<br \/>\n\u4e3aNetApp\u63d0\u4f9bTCP\/IP\u534f\u8bae\u5378\u8f7d<\/li>\n<\/ul>\n<h5>3. \u200b\u91cf\u5b50\u5b89\u5168\u5b58\u50a8\u200b<\/h5>\n<ul>\n<li>\u200b\u534e\u4e3aOceanStor V6\u200b&#xff1a;<br \/>\n\u652f\u6301\u91cf\u5b50\u5bc6\u94a5\u5206\u53d1&#xff08;QKD&#xff09;\u52a0\u5bc6<\/li>\n<li>\u200bIBM FlashSystem\u200b&#xff1a;<br \/>\n\u683c\u5bc6\u7801\u5b66\u6297\u91cf\u5b50\u653b\u51fb\u52a0\u5bc6<\/li>\n<\/ul>\n<hr \/>\n<h4>1.1.5\u3001\u9009\u578b\u51b3\u7b56\u77e9\u9635\u200b<\/h4>\n<table>\n<tr>\u200b\u9700\u6c42\u573a\u666f\u200b\u200b\u63a8\u8350\u67b6\u6784\u200b\u200b\u4ee3\u8868\u4ea7\u54c1\u200b\u200b\u5173\u952e\u6307\u6807\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u865a\u62df\u5316\u5e73\u53f0<\/td>\n<td>\u5168\u95ea\u5b58\u7edf\u4e00\u5b58\u50a8<\/td>\n<td>Dell PowerStore 5000<\/td>\n<td>IOPS &gt; 50\u4e07&#xff0c;\u5ef6\u8fdf&lt;1ms<\/td>\n<\/tr>\n<tr>\n<td>AI\u8bad\u7ec3<\/td>\n<td>\u5e76\u884c\u6587\u4ef6\u5b58\u50a8<\/td>\n<td>Pure FlashBlade \/\/S<\/td>\n<td>\u5e26\u5bbd&gt;100GB\/s<\/td>\n<\/tr>\n<tr>\n<td>\u6df7\u5408\u4e91\u5f52\u6863<\/td>\n<td>\u5bf9\u8c61\u5b58\u50a8\u7f51\u5173<\/td>\n<td>NetApp StorageGRID<\/td>\n<td>S3\u517c\u5bb9&#xff0c;\u6210\u672c&lt;$0.01\/GB<\/td>\n<\/tr>\n<tr>\n<td>\u8fb9\u7f18\u8ba1\u7b97\u8282\u70b9<\/td>\n<td>\u8d85\u878d\u5408\u5b58\u50a8<\/td>\n<td>HPE Edgeline EL8000<\/td>\n<td>\u529f\u8017&lt;500W&#xff0c;\u6297\u97075G<\/td>\n<\/tr>\n<tr>\n<td>\u91d1\u878d\u6838\u5fc3\u4ea4\u6613<\/td>\n<td>\u5168\u95ea\u5b58\u53cc\u6d3b\u5b58\u50a8<\/td>\n<td>Huawei OceanStor Dorado<\/td>\n<td>RPO&#061;0&#xff0c;RTO&lt;30s<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>1.1.6\u3001\u8fd0\u7ef4\u5173\u952e\u6307\u6807\u200b<\/h4>\n<li>\n<p>\u200b\u6027\u80fd\u4e09\u89d2\u200b&#xff1a;<\/p>\n<ul>\n<li>IOPS&#xff08;\u968f\u673a\u8bfb\u5199&#xff09;&#xff1a;&gt; 100\u4e07&#xff08;\u5168\u95ea\u5b58&#xff09;<\/li>\n<li>\u5e26\u5bbd&#xff08;\u987a\u5e8f\u8bfb\u5199&#xff09;&#xff1a;&gt; 40 GB\/s<\/li>\n<li>\u5ef6\u8fdf&#xff1a;&lt; 500 \u03bcs&#xff08;NVMe\u9635\u5217&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u200b\u53ef\u9760\u6027\u6307\u6807\u200b&#xff1a;<\/p>\n<ul>\n<li>\u5e74\u6545\u969c\u7387&#xff08;AFR&#xff09;&#xff1a;&lt; 0.5%<\/li>\n<li>\u6570\u636e\u5b8c\u6574\u6027&#xff1a;99.999999999%&#xff08;11\u4e2a9&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u200b\u80fd\u6548\u6bd4\u200b&#xff1a;<\/p>\n<ul>\n<li>\u6027\u80fd\/\u74e6\u7279&#xff1a;&gt; 50,000 IOPS\/\u74e6<\/li>\n<li>\u5b58\u50a8\u5bc6\u5ea6&#xff1a;&gt; 1 PB\/U<\/li>\n<\/ul>\n<\/li>\n<hr \/>\n<h4>\u603b\u7ed3&#xff1a;\u672a\u6765\u8d8b\u52bf<\/h4>\n<li>\u200b\u5b58\u7b97\u4e00\u4f53\u67b6\u6784\u200b&#xff1a;\n<ul>\n<li>Samsung SmartSSD&#xff08;FPGA\u52a0\u901f&#xff09;<\/li>\n<li>ScaleFlux\u53ef\u8ba1\u7b97\u5b58\u50a8\u9a71\u52a8\u5668<\/li>\n<\/ul>\n<\/li>\n<li>\u200b\u5149\u5b50\u5b58\u50a8\u200b&#xff1a;\n<ul>\n<li>IBM\u5149\u5b50\u5185\u5b58&#xff08;\u5ef6\u8fdf\u964d\u81f3\u7eb3\u79d2\u7ea7&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>\u200bDNA\u5b58\u50a8\u200b&#xff1a;\n<ul>\n<li>Microsoft Project Silica&#xff08;\u73bb\u7483\u4ecb\u8d28\u5b58\u50a8\u4e07\u5e74&#xff09;<\/li>\n<\/ul>\n<\/li>\n<p>\u5b58\u50a8\u670d\u52a1\u5668\u6b63\u4ece\u201c\u6570\u636e\u5bb9\u5668\u201d\u5411\u201c\u667a\u80fd\u6570\u636e\u5904\u7406\u5668\u201d\u6f14\u8fdb&#xff0c;\u5efa\u8bae\u5173\u6ce8\u5b58\u7b97\u878d\u5408\u4e0e\u91cf\u5b50\u5b89\u5168\u6280\u672f\u8def\u7ebf\u3002\u4f01\u4e1a\u9009\u578b\u9700\u5e73\u8861\u6027\u80fd\u9700\u6c42\u4e0eTCO&#xff08;\u603b\u62e5\u6709\u6210\u672c&#xff09;&#xff0c;\u5168\u95ea\u5b58\u5316\u5df2\u6210\u4e3b\u6d41&#xff0c;\u6db2\u51b7\u4e0e\u518d\u751f\u80fd\u6e90\u4f9b\u7535\u5c06\u662f\u4e0b\u4e00\u4ee3\u7eff\u8272\u5b58\u50a8\u7684\u6838\u5fc3\u65b9\u5411\u3002<\/p>\n<h3>1.2 \u5b58\u50a8\u534f\u8bae\u6df1\u5ea6\u89e3\u6790&#xff1a;iSCSI\u3001NVMe-oF\u3001FC\u3001NFS\u3001SMB\/CIFS\u3001pNFS\u3001S3\u3001Swift<\/h3>\n<p>\u5bf9\u4e3b\u6d41\u5b58\u50a8\u534f\u8bae\u7684\u5168\u9762\u6280\u672f\u5bf9\u6bd4&#xff0c;\u5305\u542b\u6838\u5fc3\u7b97\u6cd5\u5b9e\u73b0\u548c\u4ee3\u7801\u793a\u4f8b&#xff1a;<\/p>\n<hr \/>\n<h4>1.2.1\u3001\u5757\u5b58\u50a8\u534f\u8bae\u5bf9\u6bd4<\/h4>\n<h5>1. \u200biSCSI (Internet SCSI)\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u6280\u672f\u539f\u7406\u200b&#xff1a;<br \/>\n\u901a\u8fc7TCP\/IP\u7f51\u7edc\u4f20\u8f93SCSI\u547d\u4ee4&#xff0c;\u5c06\u8fdc\u7a0b\u5b58\u50a8\u6620\u5c04\u4e3a\u672c\u5730\u5757\u8bbe\u5907<\/li>\n<li>\u200b\u6838\u5fc3\u7ec4\u4ef6\u200b&#xff1a;\n<ul>\n<li>iSCSI Initiator&#xff08;\u5ba2\u6237\u7aef&#xff09;<\/li>\n<li>iSCSI Target&#xff08;\u5b58\u50a8\u7aef&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>\u200b\u7b97\u6cd5\u5b9e\u73b0\u200b&#xff1a;\n<p>\/\/ iSCSI PDU\u5c01\u88c5\u4f2a\u4ee3\u7801<br \/>\nstruct iscsi_pdu {<br \/>\n  uint8_t opcode;  \/\/ SCSI\u547d\u4ee4\u7801<br \/>\n  uint32_t data_len;<br \/>\n  uint32_t itt;    \/\/ Initiator\u4efb\u52a1\u6807\u7b7e<br \/>\n  char data[0];    \/\/ SCSI CDB&#043;\u6570\u636e<br \/>\n};<\/p>\n<p>void send_scsi_command(struct scsi_cmd *cmd) {<br \/>\n  struct iscsi_pdu *pdu &#061; build_iscsi_pdu(cmd);<br \/>\n  tcp_send(pdu, sizeof(*pdu) &#043; cmd-&gt;data_len);<br \/>\n}\n<\/li>\n<li>\u200b\u4ee3\u7801\u793a\u4f8b\u200b&#xff08;Linux\u914d\u7f6e&#xff09;&#xff1a;\n<p># \u53d1\u73b0\u76ee\u6807<br \/>\niscsiadm -m discovery -t st -p 192.168.1.100<\/p>\n<p># \u767b\u5f55\u76ee\u6807<br \/>\niscsiadm -m node -T iqn.2024-05.com.example:storage -p 192.168.1.100 -l\n<\/li>\n<\/ul>\n<h5>2. \u200bNVMe-oF (NVMe over Fabrics)\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u6280\u672f\u539f\u7406\u200b&#xff1a;<br \/>\n\u901a\u8fc7RDMA\u6216TCP\u4f20\u8f93NVMe\u547d\u4ee4&#xff0c;\u5b9e\u73b0\u8d85\u4f4e\u5ef6\u8fdf\u8fdc\u7a0b\u8bbf\u95ee<\/li>\n<li>\u200b\u534f\u8bae\u5dee\u5f02\u200b&#xff1a;<br \/>\n<table>\n<tr>\u200b\u7279\u6027\u200b\u200bNVMe-oF RDMA\u200b\u200bNVMe-oF TCP\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u200b\u5ef6\u8fdf\u200b<\/td>\n<td>5-10 \u03bcs<\/td>\n<td>50-100 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>\u200bCPU\u5f00\u9500\u200b<\/td>\n<td>\u6781\u4f4e&#xff08;\u786c\u4ef6\u5378\u8f7d&#xff09;<\/td>\n<td>\u4e2d\u7b49<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u7f51\u7edc\u8981\u6c42\u200b<\/td>\n<td>RoCE\/InfiniBand<\/td>\n<td>\u6807\u51c6\u4ee5\u592a\u7f51<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\u200b\u7b97\u6cd5\u5b9e\u73b0\u200b&#xff1a;\n<p>\/\/ NVMe Submission Queue Entry<br \/>\nstruct nvme_sqe {<br \/>\n  uint8_t opcode;     \/\/ NVMe\u547d\u4ee4\u7801<br \/>\n  uint16_t cid;       \/\/ \u547d\u4ee4ID<br \/>\n  uint64_t prp1;      \/\/ \u6570\u636e\u9875\u6307\u9488<br \/>\n  uint64_t prp2;<br \/>\n  uint32_t nsid;      \/\/ \u547d\u540d\u7a7a\u95f4ID<br \/>\n};<\/p>\n<p>\/\/ RDMA\u4f20\u8f93\u6d41\u7a0b<br \/>\nvoid nvme_rdma_send(struct nvme_sqe *sqe) {<br \/>\n  struct ibv_sge sge &#061; { .addr &#061; (uintptr_t)sqe, .length &#061; sizeof(*sqe) };<br \/>\n  struct ibv_send_wr wr &#061; { .wr_id &#061; cid, .sg_list &#061; &amp;sge, .num_sge &#061; 1 };<br \/>\n  ibv_post_send(qp, &amp;wr, &amp;bad_wr);  \/\/ \u901a\u8fc7RDMA\u53d1\u9001<br \/>\n}\n<\/li>\n<li>\u200b\u90e8\u7f72\u793a\u4f8b\u200b&#xff1a;\n<p># \u914d\u7f6eNVMe-oF\u76ee\u6807&#xff08;\u5b58\u50a8\u7aef&#xff09;<br \/>\nnvmetcli create \/subsystems\/nqn.2024-05.com.example:ssd<br \/>\nnvmetcli add \/subsystems\/nqn.2024-05.com.example:ssd\/namespaces\/1 -n 1 -b \/dev\/nvme0n1<\/p>\n<p># \u5ba2\u6237\u7aef\u8fde\u63a5<br \/>\nnvme connect -t rdma -n nqn.2024-05.com.example:ssd -a 192.168.1.100 -s 4420\n<\/li>\n<\/ul>\n<h5>3. \u200bFC (Fibre Channel)\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u6280\u672f\u539f\u7406\u200b&#xff1a;<br \/>\n\u4e13\u7528\u5149\u7ea4\u901a\u9053\u7f51\u7edc\u4f20\u8f93SCSI\u534f\u8bae&#xff0c;\u4e0d\u7ecf\u8fc7TCP\/IP\u534f\u8bae\u6808<\/li>\n<li>\u200b\u6838\u5fc3\u7b97\u6cd5\u200b&#xff1a;\n<p>\/\/ FC\u5e27\u7ed3\u6784<br \/>\nstruct fc_frame {<br \/>\n  uint8_t sof;        \/\/ \u5e27\u8d77\u59cb\u7b26<br \/>\n  fc_header_t header; \/\/ 24\u5b57\u8282\u5934<br \/>\n  uint8_t payload[2112]; \/\/ \u6570\u636e\u8f7d\u8377<br \/>\n  uint32_t crc;<br \/>\n  uint8_t eof;        \/\/ \u5e27\u7ed3\u675f\u7b26<br \/>\n};<\/p>\n<p>\/\/ FCP&#xff08;SCSI over FC&#xff09;\u5c01\u88c5<br \/>\nvoid fcp_cmnd_scsi(struct scsi_cmd *cmd) {<br \/>\n  struct fcp_cmnd fcp &#061; {<br \/>\n    .lun &#061; cpu_to_be64(cmd-&gt;lun),<br \/>\n    .cdb &#061; cmd-&gt;cdb<br \/>\n  };<br \/>\n  send_fc_frame(&amp;fcp, sizeof(fcp));<br \/>\n}\n<\/li>\n<li>\u200b\u914d\u7f6e\u793a\u4f8b\u200b&#xff1a;\n<p># \u626b\u63cfFC\u76ee\u6807<br \/>\necho &#034;0 0 0&#034; &gt; \/sys\/class\/fc_host\/host3\/issue_lip<br \/>\nrescan-scsi-bus.sh<\/p>\n<p># \u67e5\u770bFC\u8bbe\u5907<br \/>\nlsscsi -H\n<\/li>\n<\/ul>\n<hr \/>\n<h4>1.2.2\u3001\u6587\u4ef6\u5b58\u50a8\u534f\u8bae\u5bf9\u6bd4<\/h4>\n<h5>1. \u200bNFS (Network File System)\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u7248\u672c\u6f14\u8fdb\u200b&#xff1a;<br \/>\n<table>\n<tr>\u200b\u7248\u672c\u200b\u200b\u7279\u6027\u200b\u200b\u6700\u5927\u6587\u4ef6\u200b\u200b\u8ba4\u8bc1\u65b9\u5f0f\u200b<\/tr>\n<tbody>\n<tr>\n<td>v3<\/td>\n<td>\u65e0\u72b6\u6001\u534f\u8bae<\/td>\n<td>2GB<\/td>\n<td>UNIX\u8ba4\u8bc1<\/td>\n<\/tr>\n<tr>\n<td>v4<\/td>\n<td>\u6709\u72b6\u6001\u534f\u8bae&#xff0c;\u590d\u5408\u64cd\u4f5c<\/td>\n<td>16EB<\/td>\n<td>Kerberos<\/td>\n<\/tr>\n<tr>\n<td>v4.1<\/td>\n<td>\u5e76\u884c\u8bbf\u95ee&#xff08;pNFS\u57fa\u7840&#xff09;<\/td>\n<td>16EB<\/td>\n<td>RPCSEC_GSS<\/td>\n<\/tr>\n<tr>\n<td>v4.2<\/td>\n<td>\u670d\u52a1\u5668\u7aef\u590d\u5236&#xff0c;\u7a7a\u95f4\u9884\u7559<\/td>\n<td>16EB<\/td>\n<td>\u591a\u56e0\u7d20\u8ba4\u8bc1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\u200b\u7b97\u6cd5\u5b9e\u73b0\u200b&#xff1a;\n<p># NFSv3 READ RPC\u5904\u7406\u4f2a\u4ee3\u7801<br \/>\ndef handle_read(fh, offset, count):<br \/>\n    inode &#061; lookup_by_fh(fh)  # \u901a\u8fc7\u6587\u4ef6\u53e5\u67c4\u67e5\u627einode<br \/>\n    with open(inode.path, &#039;rb&#039;) as f:<br \/>\n        f.seek(offset)<br \/>\n        data &#061; f.read(count)<br \/>\n    return data\n<\/li>\n<li>\u200b\u90e8\u7f72\u793a\u4f8b\u200b&#xff1a;\n<p># \u670d\u52a1\u5668\u7aef\u5bfc\u51fa<br \/>\n\/etc\/exports:<br \/>\n\/shared  *(rw,sync,no_root_squash)<\/p>\n<p># \u5ba2\u6237\u7aef\u6302\u8f7d<br \/>\nmount -t nfs 192.168.1.100:\/shared \/mnt\n<\/li>\n<\/ul>\n<h5>2. \u200bSMB\/CIFS\u200b<\/h5>\n<ul>\n<li>\u200b\u534f\u8bae\u5dee\u5f02\u200b&#xff1a;<br \/>\n<table>\n<tr>\u200b\u7279\u6027\u200b\u200bSMB1\u200b\u200bSMB2\/3\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u200b\u6700\u5927\u6587\u4ef6\u200b<\/td>\n<td>4GB<\/td>\n<td>16TB&#xff08;SMB2&#xff09;\u21921PB&#xff08;SMB3&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u52a0\u5bc6\u200b<\/td>\n<td>\u65e0<\/td>\n<td>AES-128&#xff08;SMB3&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u591a\u901a\u9053\u200b<\/td>\n<td>\u4e0d\u652f\u6301<\/td>\n<td>\u652f\u6301&#xff08;SMB3&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u200bRDMA\u652f\u6301\u200b<\/td>\n<td>\u65e0<\/td>\n<td>SMB Direct&#xff08;SMB3&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\u200b\u6838\u5fc3\u7b97\u6cd5\u200b&#xff1a;\n<p>\/\/ SMB2 CREATE\u8bf7\u6c42\u5904\u7406<br \/>\nvoid smb2_create(struct smb2_request *req) {<br \/>\n    char *filename &#061; parse_filename(req-&gt;buffer);<br \/>\n    int fd &#061; open(filename, O_CREAT | O_RDWR, 0644);<br \/>\n    struct smb2_file_id fid &#061; allocate_fid(fd);<br \/>\n    send_response(req, SMB2_CREATE_RESPONSE, &amp;fid);<br \/>\n}\n<\/li>\n<li>\u200b\u914d\u7f6e\u793a\u4f8b&#xff08;Samba&#xff09;\u200b\u200b&#xff1a;\n<p>[global]<br \/>\nserver min protocol &#061; SMB2<br \/>\nserver max protocol &#061; SMB3<\/p>\n<p>[shared]<br \/>\npath &#061; \/srv\/samba<br \/>\nread only &#061; no<br \/>\nvfs objects &#061; acl_xattr\n<\/li>\n<\/ul>\n<h5>3. \u200bpNFS (Parallel NFS)\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u67b6\u6784\u539f\u7406\u200b&#xff1a;\n<p>graph TD<br \/>\n  Client &#8211;&gt;|\u5143\u6570\u636e\u64cd\u4f5c| MDS[MDS\u670d\u52a1\u5668]<br \/>\n  Client &#8211;&gt;|\u6570\u636e\u8bfb\u5199| DS1[\u6570\u636e\u670d\u52a1\u56681]<br \/>\n  Client &#8211;&gt;|\u6570\u636e\u8bfb\u5199| DS2[\u6570\u636e\u670d\u52a1\u56682]<br \/>\n  Client &#8211;&gt;|\u6570\u636e\u8bfb\u5199| DS3[\u6570\u636e\u670d\u52a1\u56683]<br \/>\n  MDS &#8211;&gt;|\u5e03\u5c40\u4fe1\u606f| Client\n<\/li>\n<li>\u200b\u5e03\u5c40\u7c7b\u578b\u200b&#xff1a;\n<ul>\n<li>\u200b\u6587\u4ef6\u5e03\u5c40\u200b&#xff1a;\u57fa\u4e8e\u6587\u4ef6\u7684\u5206\u7247\u5b58\u50a8<\/li>\n<li>\u200b\u5757\u5e03\u5c40\u200b&#xff1a;\u76f4\u63a5\u8bbf\u95ee\u5757\u8bbe\u5907<\/li>\n<li>\u200b\u5bf9\u8c61\u5e03\u5c40\u200b&#xff1a;\u517c\u5bb9S3\/Swift\u5bf9\u8c61\u5b58\u50a8<\/li>\n<\/ul>\n<\/li>\n<li>\u200b\u4ee3\u7801\u5b9e\u73b0\u200b&#xff1a;\n<p>\/\/ pNFS\u6587\u4ef6\u5e03\u5c40\u83b7\u53d6<br \/>\nstruct pnfs_layoutget_args args &#061; {<br \/>\n    .type &#061; LAYOUT_FILE,<br \/>\n    .range &#061; { .offset &#061; 0, .length &#061; UINT64_MAX }<br \/>\n};<br \/>\nstruct pnfs_layoutget_res *res &#061; nfs4_proc_layoutget(inode, &amp;args);\n<\/li>\n<\/ul>\n<hr \/>\n<h4>1.2.3\u3001\u5bf9\u8c61\u5b58\u50a8\u534f\u8bae\u5bf9\u6bd4<\/h4>\n<h5>1. \u200bAmazon S3\u200b<\/h5>\n<ul>\n<li>\u200b\u6838\u5fc3\u6982\u5ff5\u200b&#xff1a;\n<ul>\n<li>Bucket&#xff1a;\u5b58\u50a8\u5bb9\u5668<\/li>\n<li>Object&#xff1a;\u5305\u542b\u6570\u636e&#043;\u5143\u6570\u636e\u7684\u5bf9\u8c61<\/li>\n<li>Key&#xff1a;\u5bf9\u8c61\u552f\u4e00\u6807\u8bc6\u7b26<\/li>\n<\/ul>\n<\/li>\n<li>\u200b\u7b97\u6cd5\u5b9e\u73b0\u200b&#xff1a;\n<p># S3 PUT\u5bf9\u8c61\u4f2a\u4ee3\u7801<br \/>\ndef put_object(bucket, key, data, metadata):<br \/>\n    object_id &#061; sha256(data)  # \u5185\u5bb9\u54c8\u5e0c<br \/>\n    replicas &#061; []<br \/>\n    for node in consistent_hash(key):  # \u4e00\u81f4\u6027\u54c8\u5e0c\u9009\u62e9\u8282\u70b9<br \/>\n        node.store(object_id, data)<br \/>\n        replicas.append(node.id)<\/p>\n<p>    # \u5143\u6570\u636e\u5b58\u50a8<br \/>\n    meta_db.insert({<br \/>\n        &#039;bucket&#039;: bucket,<br \/>\n        &#039;key&#039;: key,<br \/>\n        &#039;object_id&#039;: object_id,<br \/>\n        &#039;replicas&#039;: replicas,<br \/>\n        &#039;metadata&#039;: metadata<br \/>\n    })\n<\/li>\n<li>\u200bPython\u793a\u4f8b\u200b&#xff1a;\n<p>import boto3<br \/>\ns3 &#061; boto3.client(&#039;s3&#039;, endpoint_url&#061;&#039;https:\/\/s3.example.com&#039;)<\/p>\n<p># \u4e0a\u4f20\u6587\u4ef6<br \/>\ns3.upload_file(&#039;local.txt&#039;, &#039;mybucket&#039;, &#039;remote.txt&#039;)<\/p>\n<p># \u4e0b\u8f7d\u6587\u4ef6<br \/>\ns3.download_file(&#039;mybucket&#039;, &#039;remote.txt&#039;, &#039;downloaded.txt&#039;)\n<\/li>\n<\/ul>\n<h5>2. \u200bOpenStack Swift\u200b<\/h5>\n<ul>\n<li>\u200b\u67b6\u6784\u7279\u70b9\u200b&#xff1a;\n<ul>\n<li>\u200b\u73af&#xff08;Ring&#xff09;\u200b\u200b&#xff1a;\u865a\u62df\u8282\u70b9\u5230\u7269\u7406\u8bbe\u5907\u7684\u6620\u5c04<\/li>\n<li>\u200b\u4ee3\u7406\u8282\u70b9\u200b&#xff1a;\u5904\u7406API\u8bf7\u6c42<\/li>\n<li>\u200b\u5b58\u50a8\u8282\u70b9\u200b&#xff1a;\u5b9e\u9645\u5b58\u50a8\u6570\u636e<\/li>\n<\/ul>\n<\/li>\n<li>\u200b\u6570\u636e\u5206\u5e03\u7b97\u6cd5\u200b&#xff1a;\n<p># Swift\u73af\u7684\u865a\u62df\u8282\u70b9\u5206\u914d<br \/>\nclass Ring:<br \/>\n    def __init__(self, partitions, replicas):<br \/>\n        self.partitions &#061; 2**partitions<br \/>\n        self.replicas &#061; replicas<br \/>\n        self.devs &#061; []<br \/>\n        self.part2dev &#061; [None] * self.partitions<\/p>\n<p>    def add_dev(self, dev):<br \/>\n        self.devs.append(dev)<br \/>\n        self._rebalance()<\/p>\n<p>    def _rebalance(self):<br \/>\n        for part in range(self.partitions):<br \/>\n            candidates &#061; []<br \/>\n            for dev in self.devs:<br \/>\n                weight &#061; dev[&#039;weight&#039;]<br \/>\n                # \u57fa\u4e8e\u5206\u533a\u548c\u8bbe\u5907\u6743\u91cd\u8ba1\u7b97<br \/>\n                candidate &#061; (hash(part, dev[&#039;id&#039;]), dev[&#039;id&#039;])<br \/>\n                candidates.append(candidate)<br \/>\n            candidates.sort()<br \/>\n            self.part2dev[part] &#061; [dev_id for _, dev_id in candidates[:self.replicas]]\n<\/li>\n<li>\u200bSwift API\u793a\u4f8b\u200b&#xff1a;\n<p># \u521b\u5efa\u5bb9\u5668<br \/>\ncurl -X PUT -H &#034;X-Auth-Token: $TOKEN&#034; $URL\/container<\/p>\n<p># \u4e0a\u4f20\u5bf9\u8c61<br \/>\ncurl -X PUT -T localfile.jpg -H &#034;X-Auth-Token: $TOKEN&#034; $URL\/container\/object.jpg\n<\/li>\n<\/ul>\n<hr \/>\n<h4>1.2.4\u3001\u534f\u8bae\u7efc\u5408\u5bf9\u6bd4\u8868<\/h4>\n<table>\n<tr>\u200b\u7279\u6027\u200b\u200biSCSI\u200b\u200bNVMe-oF\u200b\u200bFC\u200b\u200bNFS\u200b\u200bSMB\/CIFS\u200b\u200bpNFS\u200b\u200bS3\u200b\u200bSwift\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u200b\u534f\u8bae\u7c7b\u578b\u200b<\/td>\n<td>\u5757\u5b58\u50a8<\/td>\n<td>\u5757\u5b58\u50a8<\/td>\n<td>\u5757\u5b58\u50a8<\/td>\n<td>\u6587\u4ef6\u5b58\u50a8<\/td>\n<td>\u6587\u4ef6\u5b58\u50a8<\/td>\n<td>\u6587\u4ef6\u5b58\u50a8<\/td>\n<td>\u5bf9\u8c61\u5b58\u50a8<\/td>\n<td>\u5bf9\u8c61\u5b58\u50a8<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u6700\u5927\u5ef6\u8fdf\u200b<\/td>\n<td>500 \u03bcs<\/td>\n<td>10 \u03bcs (RDMA)<\/td>\n<td>5 \u03bcs<\/td>\n<td>1 ms<\/td>\n<td>2 ms<\/td>\n<td>800 \u03bcs<\/td>\n<td>100 ms<\/td>\n<td>150 ms<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u6700\u5927\u5e26\u5bbd\u200b<\/td>\n<td>100 Gbps<\/td>\n<td>200 Gbps<\/td>\n<td>128 Gbps<\/td>\n<td>100 Gbps<\/td>\n<td>100 Gbps<\/td>\n<td>400 Gbps<\/td>\n<td>\u4e0d\u9650<\/td>\n<td>\u4e0d\u9650<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u6269\u5c55\u6027\u200b<\/td>\n<td>\u4e2d\u7b49<\/td>\n<td>\u9ad8<\/td>\n<td>\u4e2d\u7b49<\/td>\n<td>\u6709\u9650<\/td>\n<td>\u4e2d\u7b49<\/td>\n<td>\u6781\u9ad8<\/td>\n<td>\u6781\u9ad8<\/td>\n<td>\u6781\u9ad8<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u5178\u578b\u5e94\u7528\u200b<\/td>\n<td>\u865a\u62df\u673a\u5b58\u50a8<\/td>\n<td>AI\u8bad\u7ec3<\/td>\n<td>\u4f01\u4e1aSAN<\/td>\n<td>Unix\u5171\u4eab<\/td>\n<td>Windows\u5171\u4eab<\/td>\n<td>HPC<\/td>\n<td>\u4e91\u5b58\u50a8<\/td>\n<td>\u79c1\u6709\u4e91<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u6570\u636e\u4e00\u81f4\u6027\u200b<\/td>\n<td>\u5f3a\u4e00\u81f4<\/td>\n<td>\u5f3a\u4e00\u81f4<\/td>\n<td>\u5f3a\u4e00\u81f4<\/td>\n<td>\u4f1a\u8bdd\u4e00\u81f4<\/td>\n<td>\u4f1a\u8bdd\u4e00\u81f4<\/td>\n<td>\u5143\u6570\u636e\u5f3a\u4e00\u81f4<\/td>\n<td>\u6700\u7ec8\u4e00\u81f4<\/td>\n<td>\u5f3a\u4e00\u81f4<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u5b89\u5168\u673a\u5236\u200b<\/td>\n<td>CHAP\/IPsec<\/td>\n<td>TLS\/IPSec<\/td>\n<td>FC-SP<\/td>\n<td>Kerberos<\/td>\n<td>SMB\u52a0\u5bc6<\/td>\n<td>RPCSEC_GSS<\/td>\n<td>IAM\/SSL<\/td>\n<td>Keystone\/SSL<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>1.2.5\u3001\u6027\u80fd\u4f18\u5316\u6280\u672f<\/h4>\n<p>1. \u200b\u5757\u5b58\u50a8\u4f18\u5316\u200b<\/p>\n<ul>\n<li>\u200biSCSI\u200b&#xff1a;\u542f\u7528TOE&#xff08;TCP\u5378\u8f7d\u5f15\u64ce&#xff09;\n<p>ethtool -K eth0 tx-checksumming on\n<\/li>\n<li>\u200bNVMe-oF\u200b&#xff1a;\u4f7f\u7528RDMA CM&#xff08;\u8fde\u63a5\u7ba1\u7406\u5668&#xff09;\n<p>struct rdma_cm_id *id;<br \/>\nrdma_create_id(NULL, &amp;id, NULL, RDMA_PS_TCP);<br \/>\nrdma_resolve_addr(id, src_addr, dst_addr, 2000);\n<\/li>\n<\/ul>\n<p>2. \u200b\u6587\u4ef6\u534f\u8bae\u52a0\u901f\u200b<\/p>\n<ul>\n<li>\u200bNFSv4.1&#043;\u200b\u200b&#xff1a;\u4f1a\u8bdd\u6301\u4e45\u5316\n<p>mount -o vers&#061;4.2,persist 192.168.1.100:\/share \/mnt\n<\/li>\n<li>\u200bSMB Direct\u200b&#xff1a;\u542f\u7528RDMA\n<p>Set-SmbServerConfiguration -EnableSMBDirect $true\n<\/li>\n<\/ul>\n<p>3. \u200b\u5bf9\u8c61\u5b58\u50a8\u4f18\u5316\u200b<\/p>\n<ul>\n<li>\u200bS3\u591a\u6bb5\u4e0a\u4f20\u200b&#xff1a;\n<p>s3.create_multipart_upload(Bucket&#061;&#039;bucket&#039;, Key&#061;&#039;largefile&#039;)<br \/>\n# \u4e0a\u4f20\u5206\u6bb5<br \/>\ns3.upload_part(Bucket&#061;&#039;bucket&#039;, Key&#061;&#039;largefile&#039;, PartNumber&#061;1, UploadId&#061;upload_id)<br \/>\n# \u5b8c\u6210\u4e0a\u4f20<br \/>\ns3.complete_multipart_upload(Bucket&#061;&#039;bucket&#039;, Key&#061;&#039;largefile&#039;, UploadId&#061;upload_id)\n<\/li>\n<li>\u200bSwift\u4e00\u81f4\u6027\u54c8\u5e0c\u4f18\u5316\u200b&#xff1a;\n<p># \u589e\u52a0\u865a\u62df\u8282\u70b9\u63d0\u5347\u5747\u8861\u6027<br \/>\nring &#061; Ring(partitions&#061;20, replicas&#061;3)\n<\/li>\n<\/ul>\n<hr \/>\n<h4>1.2.6\u3001\u5b89\u5168\u5b9e\u8df5<\/h4>\n<p>1. \u200b\u4f20\u8f93\u52a0\u5bc6\u200b<\/p>\n<ul>\n<li>\u200biSCSI\/NVMe-oF\u200b&#xff1a;IPsec\u96a7\u9053\n<p># \u914d\u7f6eIPsec\u7b56\u7565<br \/>\nip xfrm state add src 192.168.1.100 dst 192.168.1.200 proto esp spi 0x1000 enc aes 0x001122&#8230;\n<\/li>\n<li>\u200bS3\/Swift\u200b&#xff1a;HTTPS\u5f3a\u5236\n<p>s3 &#061; boto3.client(&#039;s3&#039;, use_ssl&#061;True)\n<\/li>\n<\/ul>\n<p>2. \u200b\u8ba4\u8bc1\u6388\u6743\u200b<\/p>\n<ul>\n<li>\u200bFC\u200b&#xff1a;\u5149\u7ea4\u901a\u9053\u5206\u533a\n<p># \u914d\u7f6e\u5206\u533a<br \/>\nzonecreate &#034;zone1&#034;, &#034;20:00:00:25:b5:00:00:01; 21:00:00:24:ff:45:11:01&#034;\n<\/li>\n<li>\u200bS3\u200b&#xff1a;IAM\u7b56\u7565\n<p>{<br \/>\n  &#034;Version&#034;: &#034;2012-10-17&#034;,<br \/>\n  &#034;Statement&#034;: [{<br \/>\n    &#034;Effect&#034;: &#034;Allow&#034;,<br \/>\n    &#034;Action&#034;: &#034;s3:GetObject&#034;,<br \/>\n    &#034;Resource&#034;: &#034;arn:aws:s3:::mybucket\/*&#034;<br \/>\n  }]<br \/>\n}\n<\/li>\n<\/ul>\n<hr \/>\n<p>\u603b\u7ed3\u4e0e\u9009\u578b\u5efa\u8bae<\/p>\n<li>\n<p>\u200b\u9ad8\u6027\u80fd\u5757\u5b58\u50a8\u200b&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u8d85\u4f4e\u5ef6\u8fdf&#xff1a;FC &gt; NVMe-oF RDMA &gt; iSCSI<\/p>\n<\/li>\n<li>\n<p>\u6210\u672c\u6548\u76ca&#xff1a;NVMe-oF TCP &gt; iSCSI &gt; FC<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u200b\u6587\u4ef6\u5171\u4eab\u200b&#xff1a;<\/p>\n<ul>\n<li>\n<p>Linux\u73af\u5883&#xff1a;NFSv4.2&#xff08;\u652f\u6301ACL\/\u9501&#xff09;<\/p>\n<\/li>\n<li>\n<p>Windows\u73af\u5883&#xff1a;SMB3&#xff08;\u652f\u6301\u591a\u901a\u9053&#xff09;<\/p>\n<\/li>\n<li>\n<p>HPC\u573a\u666f&#xff1a;pNFS&#xff08;\u5e76\u884c\u8bbf\u95ee&#xff09;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u200b\u4e91\u5b58\u50a8\u200b&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u516c\u6709\u4e91&#xff1a;Amazon S3&#xff08;\u751f\u6001\u4e30\u5bcc&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u79c1\u6709\u4e91&#xff1a;OpenStack Swift&#xff08;\u5f00\u6e90\u53ef\u63a7&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u6df7\u5408\u4e91&#xff1a;S3\u517c\u5bb9API&#xff08;MinIO\/Ceph&#xff09;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<p>\u200b\u5173\u952e\u8d8b\u52bf\u200b&#xff1a;NVMe-oF\u6b63\u5728\u53d6\u4ee3FC\u6210\u4e3a\u9ad8\u6027\u80fd\u5757\u5b58\u50a8\u65b0\u6807\u51c6&#xff0c;SMB3\u548cNFSv4.2\u5728\u6587\u4ef6\u5b58\u50a8\u9886\u57df\u6301\u7eed\u6f14\u8fdb&#xff0c;\u5bf9\u8c61\u5b58\u50a8\u901a\u8fc7S3 API\u6210\u4e3a\u4e91\u539f\u751f\u5b58\u50a8\u4e8b\u5b9e\u6807\u51c6\u3002\u5b9e\u9645\u9009\u578b\u9700\u7ed3\u5408\u6027\u80fd\u9700\u6c42\u3001\u6210\u672c\u9884\u7b97\u548c\u751f\u6001\u517c\u5bb9\u6027\u7efc\u5408\u8003\u91cf\u3002<\/p>\n<\/p>\n<h3>1.3\u00a0\u57fa\u4e8eCeph\u548cZFS\u7684\u81ea\u52a8\u5316\u5b58\u50a8\u5206\u5c42\u5177\u4f53\u914d\u7f6e\u793a\u4f8b<\/h3>\n<p>\u57fa\u4e8eCeph\u548cZFS\u7684\u81ea\u52a8\u5316\u5b58\u50a8\u5206\u5c42\u5177\u4f53\u914d\u7f6e\u793a\u4f8b&#xff0c;\u7ed3\u5408\u6027\u80fd\u4f18\u5316\u4e0e\u6210\u672c\u63a7\u5236\u9700\u6c42&#xff0c;\u9002\u7528\u4e8e\u4f01\u4e1a\u7ea7\u751f\u4ea7\u73af\u5883&#xff1a;<\/p>\n<hr \/>\n<h4 style=\"background-color:transparent\">1.3.1\u3001Ceph\u5206\u5c42\u5b58\u50a8\u914d\u7f6e&#xff08;SSD\u7f13\u5b58&#043;HDD\u4e3b\u5b58&#xff09;\u200b\u200b<\/h4>\n<h5>\u200b\u200b1. \u57fa\u7840\u73af\u5883\u51c6\u5907\u200b\u200b<\/h5>\n<p># \u521b\u5efaCRUSH\u89c4\u5219\u533a\u5206\u8bbe\u5907\u7c7b\u578b<br \/>\nceph osd crush rule create-replicated ssd-rule default host osd-class ssd  # SSD\u7f13\u5b58\u5c42\u89c4\u5219<br \/>\nceph osd crush rule create-replicated hdd-rule default host osd-class hdd  # HDD\u5b58\u50a8\u5c42\u89c4\u5219 <\/p>\n<h5>\u200b\u200b2. \u5b58\u50a8\u6c60\u521b\u5efa\u4e0e\u5173\u8054\u200b\u200b<\/h5>\n<p># \u521b\u5efaSSD\u7f13\u5b58\u6c60&#xff08;\u9ad8\u6027\u80fd\u5c42&#xff09;<br \/>\nceph osd pool create ssd-cache 128 128 replicated ssd-rule<br \/>\n# \u521b\u5efaHDD\u5b58\u50a8\u6c60&#xff08;\u7ecf\u6d4e\u5c42&#xff09;<br \/>\nceph osd pool create hdd-storage 256 256 replicated hdd-rule<\/p>\n<p># \u8bbe\u7f6e\u7f13\u5b58\u5c42\u6a21\u5f0f\u4e3aWriteback&#xff08;\u652f\u6301\u8bfb\u5199\u52a0\u901f&#xff09;<br \/>\nceph osd tier add hdd-storage ssd-cache  # \u5173\u8054\u5b58\u50a8\u6c60\u4e0e\u7f13\u5b58\u6c60<br \/>\nceph osd tier cache-mode ssd-cache writeback  # \u5199\u56de\u6a21\u5f0f&#xff08;\u70ed\u6570\u636e\u6682\u5b58SSD&#xff09;<br \/>\nceph osd tier set-overlay hdd-storage ssd-cache  # \u91cd\u5b9a\u5411\u6d41\u91cf\u5230\u7f13\u5b58\u5c42<\/p>\n<h5>\u200b\u200b3. \u7f13\u5b58\u7b56\u7565\u7cbe\u7ec6\u5316\u914d\u7f6e\u200b\u200b<\/h5>\n<p># \u542f\u7528Bloom Filter\u8ffd\u8e2a\u8bbf\u95ee\u9891\u7387<br \/>\nceph osd pool set ssd-cache hit_set_type bloom<br \/>\nceph osd pool set ssd-cache hit_set_count 24  # \u4fdd\u755924\u4e2a\u5386\u53f2\u8bbf\u95ee\u8bb0\u5f55<br \/>\nceph osd pool set ssd-cache hit_set_period 600  # \u6bcf10\u5206\u949f\u66f4\u65b0\u4e00\u6b21\u70ed\u5ea6<\/p>\n<p># \u8bbe\u7f6e\u7f13\u5b58\u6c34\u4f4d\u7ebf\u4e0e\u6dd8\u6c70\u673a\u5236<br \/>\nceph osd pool set ssd-cache target_max_bytes 1T  # \u7f13\u5b58\u6c60\u6700\u5927\u5bb9\u91cf1TB<br \/>\nceph osd pool set ssd-cache cache_target_dirty_ratio 0.4  # \u810f\u6570\u636e\u8d8540%\u89e6\u53d1\u5237\u5199<br \/>\nceph osd pool set ssd-cache cache_target_full_ratio 0.8  # \u7a7a\u95f4\u4f7f\u7528\u8d8580%\u89e6\u53d1\u6dd8\u6c70 <\/p>\n<h5>\u200b\u200b4. \u6027\u80fd\u8c03\u4f18\u53c2\u6570\u200b\u200b<\/h5>\n<p># \u4f18\u5316SSD\u7f13\u5b58\u6c60I\/O\u80fd\u529b<br \/>\nceph config set osd bluestore_cache_size_ssd 4G  # \u6bcf\u4e2aOSD\u5206\u914d4GB\u5185\u5b58\u7f13\u5b58<br \/>\nceph config set osd osd_op_num_shards 16  # \u589e\u52a0\u5e76\u53d1\u5904\u7406\u7ebf\u7a0b<br \/>\nceph config set osd osd_recovery_max_active 8  # \u63d0\u5347\u540e\u53f0\u6570\u636e\u540c\u6b65\u901f\u5ea6<\/p>\n<hr \/>\n<h4>1.3.2\u3001ZFS\u5206\u5c42\u5b58\u50a8\u914d\u7f6e&#xff08;SSD\u52a0\u901f&#043;HDD\u5f52\u6863&#xff09;\u200b\u200b<\/h4>\n<h5>\u200b\u200b1. \u5b58\u50a8\u6c60\u4e0e\u6587\u4ef6\u7cfb\u7edf\u5206\u5c42\u200b\u200b<\/h5>\n<p># \u521b\u5efa\u4e3b\u5b58\u50a8\u6c60&#xff08;HDD\u4e3a\u57fa\u7840&#xff09;<br \/>\nzpool create tank raidz2 \/dev\/sd[b-e]  # HDD\u7ec4\u6210RAIDZ2\u5197\u4f59 <\/p>\n<p># \u6dfb\u52a0SSD\u4f5c\u4e3a\u7f13\u5b58\u8bbe\u5907<br \/>\nzpool add tank cache \/dev\/nvme0n1  # L2ARC\u8bfb\u7f13\u5b58\u52a0\u901f<br \/>\nzpool add tank log \/dev\/nvme0n2    # ZIL\u5199\u65e5\u5fd7\u52a0\u901f <\/p>\n<p># \u521b\u5efa\u5206\u5c42\u6587\u4ef6\u7cfb\u7edf\u7ed3\u6784<br \/>\nzfs create tank\/hot_data  # \u70ed\u6570\u636e\u5c42&#xff08;\u5e38\u8bbf\u95ee&#xff09;<br \/>\nzfs create tank\/cold_data # \u51b7\u6570\u636e\u5c42&#xff08;\u5f52\u6863&#xff09;<\/p>\n<h5>\u200b\u200b2. \u6570\u636e\u8fc1\u79fb\u7b56\u7565\u81ea\u52a8\u5316\u200b\u200b<\/h5>\n<p># \u70ed\u6570\u636e\u5c42\u914d\u7f6e&#xff08;SSD\u4f18\u5148&#xff09;<br \/>\nzfs set primarycache&#061;all tank\/hot_data  # \u5143\u6570\u636e&#043;\u6570\u636e\u5747\u7f13\u5b58\u5230SSD<br \/>\nzfs set compression&#061;lz4 tank\/hot_data   # \u542f\u7528\u5b9e\u65f6\u538b\u7f29\u51cf\u5c11I\/O\u538b\u529b <\/p>\n<p># \u51b7\u6570\u636e\u5c42\u914d\u7f6e&#xff08;HDD\u5b58\u50a8&#xff09;<br \/>\nzfs set primarycache&#061;metadata tank\/cold_data  # \u4ec5\u7f13\u5b58\u5143\u6570\u636e\u5230SSD<br \/>\nzfs set compression&#061;gzip-9 tank\/cold_data      # \u9ad8\u538b\u7f29\u6bd4\u8282\u7701\u7a7a\u95f4<\/p>\n<p># \u81ea\u52a8\u8fc1\u79fb\u811a\u672c&#xff08;\u6309\u8bbf\u95ee\u65f6\u95f4\u79fb\u52a8\u6570\u636e&#xff09;<br \/>\n0 2 * * * zfs list -H -o name -t filesystem | grep tank\/ | xargs -I{} zfs diff {} | awk &#039;$1&#061;&#061;&#034;-&#034; {print $2}&#039; | xargs mv -t \/tank\/cold_data\/  # \u6bcf\u65e5\u51cc\u6668\u8fc1\u79fb30\u5929\u672a\u8bbf\u95ee\u6587\u4ef6 <\/p>\n<hr \/>\n<h4>1.3.3\u3001\u65b9\u6848\u5bf9\u6bd4\u4e0e\u9009\u578b\u5efa\u8bae\u200b\u200b<\/h4>\n<table>\n<tr>\u200b\u200b\u7ef4\u5ea6\u200b\u200b\u200b\u200bCeph\u65b9\u6848\u200b\u200b\u200b\u200bZFS\u65b9\u6848\u200b\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u200b\u200b\u9002\u7528\u573a\u666f\u200b\u200b<\/td>\n<td>\u591a\u8282\u70b9\u5206\u5e03\u5f0f\u73af\u5883&#xff08;3&#043;\u8282\u70b9&#xff09;<\/td>\n<td>\u5355\u673a\/\u53cc\u63a7\u5b58\u50a8\u670d\u52a1\u5668<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u81ea\u52a8\u5316\u7a0b\u5ea6\u200b\u200b<\/td>\n<td>\u5168\u81ea\u52a8&#xff08;\u5185\u7f6e\u70ed\u5ea6\u8ffd\u8e2a&#xff09;<\/td>\n<td>\u534a\u81ea\u52a8&#xff08;\u9700\u811a\u672c\u8f85\u52a9&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u6027\u80fd\u74f6\u9888\u200b\u200b<\/td>\n<td>\u7f51\u7edc\u5ef6\u8fdf &amp; OSD\u5904\u7406\u80fd\u529b<\/td>\n<td>\u5355\u673aCPU &amp; \u5185\u5b58\u5e26\u5bbd<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u6269\u5bb9\u7075\u6d3b\u6027\u200b\u200b<\/td>\n<td>\u52a8\u6001\u6dfb\u52a0OSD\u8282\u70b9<\/td>\n<td>\u9700\u505c\u673a\u6269\u5c55\u786c\u76d8<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u5178\u578b\u5e94\u7528\u200b\u200b<\/td>\n<td>\u4e91\u5e73\u53f0\u5757\u5b58\u50a8(RBD)\u3001\u5bf9\u8c61\u5b58\u50a8(RGW)<\/td>\n<td>\u865a\u62df\u5316\u5e73\u53f0(NFS\/iSCSI)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>1.3.4\u3001\u5173\u952e\u9a8c\u8bc1\u4e0e\u76d1\u63a7\u547d\u4ee4\u200b\u200b<\/h4>\n<h5>\u200b\u200bCeph\u96c6\u7fa4\u72b6\u6001\u68c0\u67e5\u200b\u200b<\/h5>\n<p># \u67e5\u770b\u7f13\u5b58\u6c60\u547d\u4e2d\u7387<br \/>\nceph osd pool stats ssd-cache | grep hit_set_ratio  # &gt;0.7\u4e3a\u6709\u6548 <\/p>\n<p># \u76d1\u63a7\u6570\u636e\u8fc1\u79fb\u72b6\u6001<br \/>\nceph -s | grep tier  # \u786e\u4fdd\u65e0&#034;degraded&#034;\u6216&#034;stuck&#034;\u72b6\u6001 <\/p>\n<h5>\u200b\u200bZFS\u5206\u5c42\u6548\u679c\u9a8c\u8bc1\u200b\u200b<\/h5>\n<p># \u67e5\u770bSSD\u7f13\u5b58\u5229\u7528\u7387<br \/>\nzpool iostat -v tank 1  # \u89c2\u5bdfL2ARC\u8bfb\u5199\u547d\u4e2d\u7387&#xff08;Hit% &gt;60%\u4e3a\u4f18&#xff09;<\/p>\n<p># \u51b7\u70ed\u6570\u636e\u5206\u5e03\u786e\u8ba4<br \/>\nzfs list -r -o name,used,avail,refer,mountpoint tank  # \u68c0\u67e5cold_data\u5360\u6bd4\u6301\u7eed\u589e\u957f <\/p>\n<hr \/>\n<h4>\u603b\u7ed3\u5efa\u8bae\u200b\u200b<\/h4>\n<ul>\n<li>\u200b\u200b\u5206\u5e03\u5f0f\u4e91\u73af\u5883\u200b\u200b&#xff1a;\u9009\u62e9Ceph\u65b9\u6848&#xff0c;\u901a\u8fc7writeback\u6a21\u5f0f&#043;bloom\u8fc7\u6ee4\u5668\u5b9e\u73b0\u5168\u81ea\u52a8\u5206\u5c42&#xff0c;\u914d\u5408RADOS Gateway\u53ef\u76f4\u63a5\u5bf9\u63a5S3\u534f\u8bae\u5e94\u7528 \u3002<\/li>\n<li>\u200b\u200b\u9ad8\u6027\u80fd\u5355\u673a\u5b58\u50a8\u200b\u200b&#xff1a;\u91c7\u7528ZFS\u65b9\u6848&#xff0c;\u901a\u8fc7L2ARC\/ZIL\u52a0\u901f\u5c42&#043;\u5b9a\u65f6\u8fc1\u79fb\u811a\u672c&#xff0c;\u6210\u672c\u66f4\u4f4e\u4e14\u6613\u4e8e\u7ef4\u62a4 \u3002<\/li>\n<li>\u200b\u200b\u6df7\u5408\u67b6\u6784\u6269\u5c55\u200b\u200b&#xff1a;\u8d85\u5927\u89c4\u6a21\u573a\u666f\u53ef\u7ed3\u5408\u4e24\u8005\u2014\u2014Ceph\u96c6\u7fa4\u5185\u7528SSD\u7f13\u5b58\u6c60&#xff0c;\u5355\u4e2a\u8282\u70b9\u5185\u7528ZFS\u8fdb\u4e00\u6b65\u5206\u5c42&#xff0c;\u5b9e\u73b0\u201c\u96c6\u7fa4\u7ea7&#043;\u8282\u70b9\u7ea7\u201d\u53cc\u5c42\u4f18\u5316 \u3002<\/li>\n<\/ul>\n<p>\u26a0\ufe0f \u200b\u200b\u5173\u952e\u6ce8\u610f\u4e8b\u9879\u200b\u200b&#xff1a;<\/p>\n<ul>\n<li>Ceph\u7684writeback\u6a21\u5f0f\u9700\u914d\u7f6eUPS\u9632\u6b62\u7f13\u5b58\u6570\u636e\u4e22\u5931 &#xff1b;<\/li>\n<li>ZFS\u7684L2ARC\u8bbe\u5907\u5bb9\u91cf\u5efa\u8bae\u4e3a\u4e3b\u5b58\u768410%~20%\u4ee5\u907f\u514d\u5185\u5b58\u7d22\u5f15\u6ea2\u51fa \u3002<\/li>\n<\/ul>\n<h3>1.4 ZFS\u5206\u5c42\u5b58\u50a8<\/h3>\n<p>\u5728ZFS\u5206\u5c42\u5b58\u50a8\u4e2d&#xff0c;ZFS\u672c\u8eab\u200b\u200b\u4e0d\u76f4\u63a5\u63d0\u4f9b\u57fa\u4e8e\u65f6\u95f4\u9608\u503c\u7684\u81ea\u52a8\u6570\u636e\u8fc1\u79fb\u529f\u80fd\u200b\u200b&#xff0c;\u4f46\u53ef\u901a\u8fc7\u7ed3\u5408\u200b\u200b\u8bbf\u95ee\u65f6\u95f4\u5c5e\u6027&#xff08;atime&#xff09;\u200b\u200b\u3001\u200b\u200b\u81ea\u5b9a\u4e49\u811a\u672c\u200b\u200b\u53ca\u200b\u200b\u5b9a\u65f6\u4efb\u52a1\u200b\u200b\u5b9e\u73b0\u7c7b\u4f3c\u6548\u679c\u3002<\/p>\n<hr \/>\n<h4>1.4.1\u3001\u6838\u5fc3\u673a\u5236&#xff1a;\u57fa\u4e8e\u8bbf\u95ee\u65f6\u95f4&#xff08;atime&#xff09;\u7684\u8fc1\u79fb\u200b\u200b<\/h4>\n<p>ZFS\u6587\u4ef6\u7684atime\u5c5e\u6027\u8bb0\u5f55\u6700\u540e\u8bbf\u95ee\u65f6\u95f4&#xff0c;\u901a\u8fc7\u5b9a\u671f\u626b\u63cf\u5e76\u8fc1\u79fb\u957f\u65f6\u95f4\u672a\u8bbf\u95ee\u7684\u6570\u636e&#xff0c;\u53ef\u5b9e\u73b0\u51b7\u70ed\u6570\u636e\u5206\u5c42&#xff1a;<\/p>\n<li>\n<p>\u200b\u200b\u542f\u7528atime\u8ffd\u8e2a\u200b\u200b<br \/>\n\u786e\u4fdd\u6587\u4ef6\u7cfb\u7edf\u7684atime\u5c5e\u6027\u4e3aon&#xff08;\u9ed8\u8ba4\u5f00\u542f&#xff09;&#xff1a;<\/p>\n<p>zfs set atime&#061;on tank\/hot_data  # \u786e\u4fdd\u70ed\u6570\u636e\u5c42\u8bb0\u5f55\u8bbf\u95ee\u65f6\u95f4<\/p>\n<p>\u82e5\u5df2\u7981\u7528&#xff0c;\u9700\u663e\u5f0f\u5f00\u542f\u3002<\/p>\n<\/li>\n<li>\n<p>\u200b\u200b\u5b9a\u4e49\u65f6\u95f4\u9608\u503c\u200b\u200b<br \/>\n\u6839\u636e\u4e1a\u52a1\u9700\u6c42\u8bbe\u5b9a\u51b7\u6570\u636e\u5224\u5b9a\u9608\u503c&#xff08;\u598230\u5929\u672a\u8bbf\u95ee&#xff09;&#xff1a;<\/p>\n<p>COLD_THRESHOLD&#061;$((30 * 24 * 60 * 60))  # 30\u5929\u5bf9\u5e94\u7684\u79d2\u6570\n<\/li>\n<hr \/>\n<h4>1.4.2\u3001\u81ea\u52a8\u5316\u8fc1\u79fb\u811a\u672c\u5b9e\u73b0\u200b\u200b<\/h4>\n<p>\u901a\u8fc7\u811a\u672c\u626b\u63cfatime\u5e76\u8fc1\u79fb\u6ee1\u8db3\u9608\u503c\u7684\u6570\u636e\u81f3\u51b7\u5b58\u50a8\u5c42&#xff1a;<\/p>\n<p>#!\/bin\/bash<br \/>\n# \u8fc1\u79fb\u811a\u672c\u793a\u4f8b&#xff1a;\u5c06\u8d85\u8fc730\u5929\u672a\u8bbf\u95ee\u7684\u6587\u4ef6\u4ecehot_data\u79fb\u81f3cold_data<br \/>\nHOT_DIR&#061;&#034;\/tank\/hot_data&#034;<br \/>\nCOLD_DIR&#061;&#034;\/tank\/cold_data&#034;<br \/>\nTHRESHOLD_SECONDS&#061;$((30 * 86400))  # 30\u5929\u79d2\u6570<\/p>\n<p># \u67e5\u627e\u5e76\u8fc1\u79fb\u6587\u4ef6<br \/>\nfind &#034;$HOT_DIR&#034; -type f -atime &#043;$THRESHOLD_SECONDS -exec sh -c &#039;<br \/>\n    file&#061;&#034;$1&#034;<br \/>\n    dest_dir&#061;&#034;$2\/$(dirname &#034;${file#$3}&#034;)&#034;<br \/>\n    mkdir -p &#034;$dest_dir&#034;<br \/>\n    mv &#034;$file&#034; &#034;$dest_dir\/&#034;<br \/>\n&#039; _ {} &#034;$COLD_DIR&#034; &#034;$HOT_DIR&#034; \\\\;<\/p>\n<p>\u200b\u200b\u5173\u952e\u53c2\u6570\u8bf4\u660e\u200b\u200b&#xff1a;<\/p>\n<ul>\n<li>-atime &#043;30&#xff1a;\u5339\u914d\u8d85\u8fc730\u5929\u672a\u8bbf\u95ee\u7684\u6587\u4ef6&#xff08;&#043;N\u8868\u793a\u5927\u4e8eN\u5929&#xff09;\u3002<\/li>\n<li>\u811a\u672c\u9700\u6839\u636e\u5b9e\u9645\u8def\u5f84\u8c03\u6574HOT_DIR\u3001COLD_DIR\u53ca\u8fc1\u79fb\u903b\u8f91&#xff08;\u5982\u4fdd\u7559\u76ee\u5f55\u7ed3\u6784&#xff09;\u3002<\/li>\n<\/ul>\n<hr \/>\n<h4>1.4.3\u3001\u5b9a\u65f6\u4efb\u52a1\u96c6\u6210\u200b\u200b<\/h4>\n<p>\u901a\u8fc7cron\u5b9a\u671f\u6267\u884c\u8fc1\u79fb\u811a\u672c&#xff08;\u5982\u6bcf\u65e5\u51cc\u66682\u70b9&#xff09;&#xff1a;<\/p>\n<p># \u7f16\u8f91crontab<br \/>\ncrontab -e<\/p>\n<p>\u6dfb\u52a0\u4efb\u52a1&#xff1a;<\/p>\n<p>0 2 * * * \/path\/to\/migration_script.sh  # \u6bcf\u65e5\u51cc\u66682\u70b9\u6267\u884c\u8fc1\u79fb<\/p>\n<hr \/>\n<h4>1.4.4\u3001\u6027\u80fd\u4f18\u5316\u4e0e\u6ce8\u610f\u4e8b\u9879\u200b\u200b<\/h4>\n<li>\n<p>\u200b\u200b\u964d\u4f4eatime\u66f4\u65b0\u5f00\u9500\u200b\u200b<br \/>\n\u82e5I\/O\u538b\u529b\u5927&#xff0c;\u53ef\u6539\u7528relatime&#xff08;\u4ec5\u5f53\u4e0a\u6b21\u8bbf\u95ee\u65e9\u4e8e\u4fee\u6539\u65f6\u66f4\u65b0atime&#xff09;&#xff1a;<\/p>\n<p>zfs set relatime&#061;on tank\/hot_data  # \u5e73\u8861\u51c6\u786e\u6027\u4e0e\u6027\u80fd\n<\/li>\n<li>\n<p>\u200b\u200b\u89c4\u907f\u9891\u7e41\u626b\u63cf\u5f71\u54cd\u200b\u200b<\/p>\n<ul>\n<li>\u9650\u5236find\u547d\u4ee4\u6df1\u5ea6&#xff1a;-maxdepth 3\u51cf\u5c11\u904d\u5386\u6587\u4ef6\u91cf\u3002<\/li>\n<li>\u907f\u5f00\u4e1a\u52a1\u9ad8\u5cf0&#xff1a;\u901a\u8fc7cron\u8bbe\u7f6e\u5728\u4f4e\u8d1f\u8f7d\u65f6\u6bb5\u6267\u884c\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u200b\u200b\u51b7\u6570\u636e\u5c42\u4f18\u5316\u914d\u7f6e\u200b\u200b<br \/>\n\u4e3a\u51b7\u6570\u636e\u542f\u7528\u9ad8\u538b\u7f29\u6bd4&#xff08;\u5982gzip-9&#xff09;&#xff0c;\u5173\u95ed\u5197\u4f59\u7f13\u5b58&#xff1a;<\/p>\n<p>zfs set compression&#061;gzip-9 tank\/cold_data<br \/>\nzfs set primarycache&#061;metadata tank\/cold_data  # \u4ec5\u7f13\u5b58\u5143\u6570\u636e\n<\/li>\n<hr \/>\n<h4>1.4.5\u3001\u66ff\u4ee3\u65b9\u6848&#xff1a;\u7b2c\u4e09\u65b9\u5de5\u5177\u200b\u200b<\/h4>\n<p>\u82e5\u9700\u66f4\u7cbe\u7ec6\u7b56\u7565&#xff08;\u5982\u57fa\u4e8e\u70ed\u5ea6\u8bc4\u5206&#xff09;&#xff0c;\u53ef\u96c6\u6210\u76d1\u63a7\u5de5\u5177&#xff1a;<\/p>\n<ul>\n<li>\u200b\u200bZFS Automatic Tiering (ZAT)\u200b\u200b&#xff1a;\u6839\u636eI\/O\u9891\u7387\u81ea\u52a8\u8fc1\u79fb\u6570\u636e\u3002<\/li>\n<li>\u200b\u200bPrometheus &#043; ZFS Exporter\u200b\u200b&#xff1a;\u76d1\u63a7\u8bbf\u95ee\u6a21\u5f0f\u540e\u89e6\u53d1\u81ea\u5b9a\u4e49\u8fc1\u79fb\u89c4\u5219\u3002<\/li>\n<\/ul>\n<hr \/>\n<h4>1.4.6\u3001\u6ce8\u610f\u4e8b\u9879\u200b\u200b<\/h4>\n<li>\u200b\u200b\u5feb\u7167\u5f71\u54cd\u200b\u200b&#xff1a;\u5feb\u7167\u4f1a\u4fdd\u7559\u65e7\u6570\u636e\u5757&#xff0c;\u8fc1\u79fb\u540e\u539f\u4f4d\u7f6e\u6570\u636e\u4ecd\u5b58\u5728\u4e8e\u5feb\u7167\u4e2d&#xff0c;\u9700\u989d\u5916\u6e05\u7406\u65e7\u5feb\u7167\u3002<\/li>\n<li>\u200b\u200b\u6743\u9650\u4e00\u81f4\u6027\u200b\u200b&#xff1a;\u786e\u4fdd\u51b7\u70ed\u6570\u636e\u5c42\u6302\u8f7d\u70b9\u6743\u9650\u76f8\u540c&#xff0c;\u907f\u514d\u8fc1\u79fb\u540e\u8bbf\u95ee\u5931\u8d25\u3002<\/li>\n<li>\u200b\u200b\u6d4b\u8bd5\u9a8c\u8bc1\u200b\u200b&#xff1a;\u9996\u6b21\u6267\u884c\u524d\u7528find -print\u66ff\u4ee3-exec\u9884\u89c8\u8fc1\u79fb\u6587\u4ef6\u5217\u8868&#xff0c;\u9632\u6b62\u8bef\u64cd\u4f5c\u3002<\/li>\n<hr \/>\n<h4>\u603b\u7ed3\u5efa\u8bae\u200b\u200b<\/h4>\n<ul>\n<li>\u200b\u200b\u57fa\u7840\u573a\u666f\u200b\u200b&#xff1a;\u901a\u8fc7atime &#043; cron &#043; find\u7ec4\u5408\u5b9e\u73b0\u65f6\u95f4\u9608\u503c\u8fc1\u79fb&#xff0c;\u517c\u987e\u7b80\u5355\u6027\u4e0e\u53ef\u63a7\u6027\u3002<\/li>\n<li>\u200b\u200b\u9ad8\u7ea7\u9700\u6c42\u200b\u200b&#xff1a;\u96c6\u6210ZAT\u6216\u76d1\u63a7\u544a\u8b66\u7cfb\u7edf&#xff0c;\u5b9e\u73b0\u52a8\u6001\u5206\u5c42&#xff08;\u5982\u5c06\u9ad8\u9891\u8bbf\u95ee\u7684\u51b7\u6570\u636e\u81ea\u52a8\u8fc1\u56de\u70ed\u5c42&#xff09;\u3002<\/li>\n<\/ul>\n<p>\u2705 \u200b\u200b\u64cd\u4f5c\u9a8c\u8bc1\u547d\u4ee4\u200b\u200b&#xff1a;<\/p>\n<ul>\n<li>\u68c0\u67e5\u8fc1\u79fb\u6548\u679c&#xff1a;zfs list -r -o name,atime,used tank\/cold_data | head<\/li>\n<li>\u76d1\u63a7\u51b7\u6570\u636e\u589e\u957f&#xff1a;zfs list -t filesystem -s used tank\/cold_data<\/li>\n<\/ul>\n<p>\u901a\u8fc7\u4e0a\u8ff0\u65b9\u6848&#xff0c;\u53ef\u6709\u6548\u5229\u7528ZFS\u7279\u6027\u6784\u5efa\u81ea\u52a8\u5316\u51b7\u70ed\u5206\u5c42\u5b58\u50a8&#xff0c;\u663e\u8457\u964d\u4f4e\u9ad8\u6027\u80fd\u5b58\u50a8\u8d44\u6e90\u7684\u5360\u7528\u6210\u672c\u3002<\/p>\n<h3 style=\"background-color:transparent\">1.5\u00a0\u5927\u89c4\u6a21\u6587\u4ef6\u7cfb\u7edf&#xff08;PB\u7ea7\u6570\u636e\u3001\u4ebf\u7ea7\u6587\u4ef6&#xff09;\u4e2d\u5b9e\u73b0\u9ad8\u6548\u5206\u5c42\u8fc1\u79fb<\/h3>\n<p>\u5728\u5927\u89c4\u6a21\u6587\u4ef6\u7cfb\u7edf&#xff08;PB\u7ea7\u6570\u636e\u3001\u4ebf\u7ea7\u6587\u4ef6&#xff09;\u4e2d\u5b9e\u73b0\u9ad8\u6548\u5206\u5c42\u8fc1\u79fb&#xff0c;\u9700\u7a81\u7834\u4f20\u7edf\u904d\u5386\u626b\u63cf\u7684\u6027\u80fd\u74f6\u9888&#xff0c;\u7ed3\u5408\u200b\u200b\u5143\u6570\u636e\u52a0\u901f\u3001\u5206\u5e03\u5f0f\u67b6\u6784\u3001\u667a\u80fd\u7b56\u7565\u200b\u200b\u8bbe\u8ba1\u5206\u5c42\u8fc1\u79fb\u4f53\u7cfb\u3002\u4ee5\u4e0b\u662f\u7ecf\u8fc7\u5927\u89c4\u6a21\u751f\u4ea7\u9a8c\u8bc1\u7684\u4f18\u5316\u65b9\u6848&#xff1a;<\/p>\n<hr \/>\n<h4>1.5.1\u3001\u8fc1\u79fb\u67b6\u6784\u8bbe\u8ba1\u539f\u5219\u200b\u200b<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1500\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730025728-68898a188bd06.png\" width=\"1449\" \/><\/p>\n<hr \/>\n<h4>1.5.2\u3001\u6838\u5fc3\u6027\u80fd\u4f18\u5316\u6280\u672f\u200b\u200b<\/h4>\n<h5>\u200b\u200b1. \u5143\u6570\u636e\u52a0\u901f\u65b9\u6848\u200b\u200b<\/h5>\n<table>\n<tr>\u200b\u200b\u6280\u672f\u200b\u200b\u200b\u200b\u5b9e\u73b0\u65b9\u5f0f\u200b\u200b\u200b\u200b\u6027\u80fd\u6536\u76ca\u200b\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u200b\u200b\u5e76\u884cinode\u626b\u63cf\u200b\u200b<\/td>\n<td>\u6309\u76ee\u5f55\u6811\u5206\u7247&#xff0c;\u591a\u7ebf\u7a0b\u5e76\u53d1\u626b\u63cf&#xff08;\u907f\u514d\u5355\u7ebf\u7a0bfind\u74f6\u9888&#xff09;<\/td>\n<td>10\u4ebf\u6587\u4ef6\u626b\u63cf\u65f6\u95f4\u4ece24h\u219230min<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u5185\u5b58\u7d22\u5f15\u7f13\u5b58\u200b\u200b<\/td>\n<td>\u4f7f\u7528Redis\u96c6\u7fa4\u7f13\u5b58\u6587\u4ef6\u8def\u5f84\u3001\u5927\u5c0f\u3001atime\/mtime<\/td>\n<td>\u5143\u6570\u636e\u67e5\u8be2\u5ef6\u8fdf\u4ecems\u7ea7\u2192\u03bcs\u7ea7<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u65e5\u5fd7\u7ed3\u6784\u5316\u8bbf\u95ee\u8bb0\u5f55\u200b\u200b<\/td>\n<td>\u6587\u4ef6\u8bbf\u95ee\u4e8b\u4ef6\u5199\u5165Kafka&#xff0c;Flink\u5b9e\u65f6\u8ba1\u7b97\u70ed\u5ea6\u8bc4\u5206<\/td>\n<td>\u5b9e\u65f6\u8bc6\u522b\u51b7\u70ed\u6570\u636e&#xff0c;\u5ef6\u8fdf&lt;1s<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>\u200b\u200b2. \u8fc1\u79fb\u6267\u884c\u4f18\u5316\u200b\u200b<\/h5>\n<ul>\n<li>\n<p>\u200b\u200b\u5757\u7ea7\u8fc1\u79fb\u66ff\u4ee3\u6587\u4ef6\u8fc1\u79fb\u200b\u200b<br \/>\nZFS\/Btrfs\u7b49\u652f\u6301\u200b\u200bsend\/recv\u200b\u200b\u5757\u7ea7\u589e\u91cf\u540c\u6b65&#xff0c;\u907f\u514d\u6587\u4ef6\u62f7\u8d1d\u5f00\u9500&#xff1a;<\/p>\n<p># \u521b\u5efa\u70ed\u6570\u636e\u5feb\u7167<br \/>\nzfs snapshot tank\/hot_data&#064;$(date &#043;%Y%m%d)<br \/>\n# \u5757\u7ea7\u8fc1\u79fb\u81f3\u51b7\u5c42<br \/>\nzfs send tank\/hot_data&#064;20231001 | zfs recv tank\/cold_data\/archive<\/p>\n<ul>\n<li>\u200b\u200b\u4f18\u52bf\u200b\u200b&#xff1a;\u8fc1\u79fb\u901f\u5ea6\u63d0\u534710\u500d&#xff08;\u65e0\u9700\u89e3\u5305\/\u91cd\u538b\u7f29&#xff09;<\/li>\n<li>\u200b\u200b\u9650\u5236\u200b\u200b&#xff1a;\u9700\u540c\u6587\u4ef6\u7cfb\u7edf\u7c7b\u578b<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u200b\u200b\u5c0f\u6587\u4ef6\u5408\u5e76\u8fc1\u79fb\u200b\u200b<br \/>\n\u5c06\u5c0f\u6587\u4ef6\u6253\u5305\u4e3a.tar\u6216\u5bf9\u8c61\u5b58\u50a8\u683c\u5f0f&#xff08;\u5982MinIO&#xff09;&#xff0c;\u51cf\u5c11\u8fc1\u79fb\u8bf7\u6c42\u6570&#xff1a;<\/p>\n<p># \u67e5\u627e\u5c0f\u6587\u4ef6\u5e76\u6253\u5305<br \/>\nfind \/hot_data -type f -size -1M -exec tar -rf \/migrate\/smallfiles.tar {} &#043;<br \/>\n# \u8fc1\u79fb\u5927\u5305<br \/>\nmv \/migrate\/smallfiles.tar \/cold_data\/\n<\/li>\n<\/ul>\n<h5>\u200b\u200b3. \u5206\u5e03\u5f0f\u8fc1\u79fb\u6846\u67b6\u200b\u200b<\/h5>\n<p># \u4f2a\u4ee3\u7801&#xff1a;\u57fa\u4e8eCelery\u7684\u5206\u5e03\u5f0f\u8fc1\u79fb\u5f15\u64ce<br \/>\nfrom celery import Celery<br \/>\napp &#061; Celery(&#039;migration&#039;, broker&#061;&#039;redis:\/\/cluster&#039;)<\/p>\n<p>&#064;app.task<br \/>\ndef migrate_chunk(file_chunk):<br \/>\n    for path in file_chunk:<br \/>\n        if is_cold_data(path):  # \u6839\u636e\u70ed\u5ea6\u8bc4\u5206\u5224\u65ad<br \/>\n            dest &#061; get_dest_storage(path)<br \/>\n            block_migrate(path, dest)  # \u5757\u7ea7\u8fc1\u79fb<\/p>\n<p># \u5206\u7247\u7b56\u7565&#xff1a;\u6309\u76ee\u5f55\u54c8\u5e0c\u5206\u7247<br \/>\npaths &#061; metadata_query(&#034;atime &lt; now() &#8211; 30d&#034;)<br \/>\nchunks &#061; [paths[i:i&#043;1000] for i in range(0, len(paths), 1000)]<br \/>\nfor chunk in chunks:<br \/>\n    migrate_chunk.delay(chunk)<\/p>\n<hr \/>\n<h4>1.5.3\u3001\u667a\u80fd\u5206\u5c42\u7b56\u7565\u200b\u200b<\/h4>\n<h5>\u200b\u200b1. \u52a8\u6001\u70ed\u5ea6\u8bc4\u5206\u6a21\u578b\u200b\u200b<\/h5>\n<p># \u70ed\u5ea6\u8bc4\u5206 &#061; \u8bbf\u95ee\u9891\u7387\u6743\u91cd \u00d7 0.6 &#043; \u6700\u8fd1\u8bbf\u95ee\u65f6\u95f4\u6743\u91cd \u00d7 0.3 &#043; \u4e1a\u52a1\u6807\u7b7e \u00d7 0.1<br \/>\ndef heat_score(file):<br \/>\n    freq &#061; log(access_count_last_week(file) &#043; 1)<br \/>\n    recency &#061; 1 \/ (current_time &#8211; last_access(file)).days<br \/>\n    biz_weight &#061; 1.5 if file in business_critical else 0.8<br \/>\n    return freq*0.6 &#043; recency*0.3 &#043; biz_weight*0.1<\/p>\n<h5>\u200b\u200b2. \u8fc1\u79fb\u9608\u503c\u81ea\u9002\u5e94\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u200b\u57fa\u4e8e\u5bb9\u91cf\u6c34\u4f4d\u200b\u200b&#xff1a;\u5f53\u9ad8\u901f\u5c42\u4f7f\u7528\u7387&gt;80%&#xff0c;\u81ea\u52a8\u4e0b\u8c03\u51b7\u6570\u636e\u9608\u503c&#xff08;\u5982\u4ece30\u5929\u219215\u5929&#xff09;<\/li>\n<li>\u200b\u200b\u57fa\u4e8eI\/O\u538b\u529b\u200b\u200b&#xff1a;\u7cfb\u7edf\u7a7a\u95f2\u65f6\u653e\u5bbd\u9608\u503c&#xff0c;\u4e1a\u52a1\u9ad8\u5cf0\u65f6\u6682\u505c\u8fc1\u79fb<\/li>\n<\/ul>\n<h5>\u200b\u200b3. \u5206\u5c42\u7b56\u7565\u793a\u4f8b\u200b\u200b<\/h5>\n<table>\n<tr>\u200b\u200b\u6570\u636e\u7279\u5f81\u200b\u200b\u200b\u200b\u5b58\u50a8\u5c42\u200b\u200b\u200b\u200b\u8fc1\u79fb\u89e6\u53d1\u6761\u4ef6\u200b\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u6bcf\u65e5\u8bbf\u95ee&gt;10\u6b21<\/td>\n<td>NVMe<\/td>\n<td>\u5b9e\u65f6\u81ea\u52a8\u63d0\u5347<\/td>\n<\/tr>\n<tr>\n<td>\u6bcf\u5468\u8bbf\u95ee1~10\u6b21<\/td>\n<td>TLC SSD<\/td>\n<td>\u70ed\u5ea6\u8bc4\u5206&lt;60\u5206\u65f6\u964d\u7ea7<\/td>\n<\/tr>\n<tr>\n<td>30\u5929\u672a\u8bbf\u95ee &amp; \u975e\u5408\u89c4\u6570\u636e<\/td>\n<td>QLC SSD<\/td>\n<td>\u5b9a\u65f6\u626b\u63cf&#043;\u5bb9\u91cf\u89e6\u53d1<\/td>\n<\/tr>\n<tr>\n<td>1\u5e74\u672a\u8bbf\u95ee\u6216\u5f52\u6863\u6570\u636e<\/td>\n<td>\u84dd\u5149\/\u78c1\u5e26\u5e93<\/td>\n<td>\u4eba\u5de5\u5ba1\u6838\u540e\u8fc1\u79fb<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>1.5.4\u3001\u7a33\u5b9a\u6027\u4fdd\u969c\u673a\u5236\u200b\u200b<\/h4>\n<h5>\u200b\u200b1. \u8fc1\u79fb\u8fc7\u7a0b\u5bb9\u9519\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u200b\u65ad\u70b9\u7eed\u4f20\u200b\u200b&#xff1a;\u8bb0\u5f55\u8fc1\u79fb\u8fdb\u5ea6\u5230Etcd&#xff0c;\u5931\u8d25\u540e\u4ece\u65ad\u70b9\u6062\u590d<\/li>\n<li>\u200b\u200b\u4e00\u81f4\u6027\u6821\u9a8c\u200b\u200b&#xff1a;\u8fc1\u79fb\u540e\u5bf9\u6bd4\u6e90\/\u76ee\u6807\u6587\u4ef6\u6821\u9a8c\u548c&#xff08;SHA-256&#xff09;<\/li>\n<li>\u200b\u200b\u539f\u5b50\u63d0\u4ea4\u200b\u200b&#xff1a;\u5148\u8fc1\u79fb\u6570\u636e&#xff0c;\u518d\u66f4\u65b0\u5143\u6570\u636e\u7d22\u5f15&#xff0c;\u907f\u514d\u72b6\u6001\u4e0d\u4e00\u81f4<\/li>\n<\/ul>\n<h5>\u200b\u200b2. \u8d44\u6e90\u9694\u79bb\u4e0e\u9650\u6d41\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u200b\u7f51\u7edc\u5e26\u5bbd\u63a7\u5236\u200b\u200b&#xff1a;\n<p># \u9650\u5236\u8fc1\u79fb\u6d41\u91cf\u2264\u603b\u5e26\u5bbd\u768430%<br \/>\ntc qdisc add dev eth0 root tbf rate 3Gbit burst 1mb latency 50ms\n<\/li>\n<li>\u200b\u200bIOPS\u9694\u79bb\u200b\u200b&#xff1a;Cgroup\u9650\u5236\u8fc1\u79fb\u8fdb\u7a0b\u7684\u78c1\u76d8IOPS\n<p>echo &#034;8:0 1000&#034; &gt; \/sys\/fs\/cgroup\/blkio\/migration\/tasks\n<\/li>\n<\/ul>\n<h5>\u200b\u200b3. \u7070\u5ea6\u8fc1\u79fb\u7b56\u7565\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u200b\u5206\u6279\u6b21\u8fc1\u79fb\u200b\u200b&#xff1a;\u6309\u76ee\u5f55\/\u6587\u4ef6\u5927\u5c0f\/\u4e1a\u52a1\u5355\u5143\u5206\u6279\u8fc1\u79fb<\/li>\n<li>\u200b\u200b\u5f71\u5b50\u8fc1\u79fb\u6d4b\u8bd5\u200b\u200b&#xff1a;\u5148\u6a21\u62df\u8fc1\u79fb\u5e76\u62a5\u544a\u6f5c\u5728\u95ee\u9898&#xff0c;\u518d\u6b63\u5f0f\u6267\u884c<\/li>\n<\/ul>\n<hr \/>\n<h4>1.5.5\u3001\u6027\u80fd\u5bf9\u6bd4\u4e0e\u6536\u76ca\u200b\u200b<\/h4>\n<p>\u67d0\u4e91\u670d\u52a1\u5546\u4f18\u5316\u524d\u540e\u5bf9\u6bd4&#xff08;10PB\u6570\u636e&#xff0c;2\u4ebf\u6587\u4ef6&#xff09;&#xff1a;<\/p>\n<table>\n<tr>\u200b\u200b\u6307\u6807\u200b\u200b\u4f20\u7edf\u65b9\u6848&#xff08;find&#043;cron&#xff09;\u4f18\u5316\u65b9\u6848\u63d0\u5347\u500d\u6570<\/tr>\n<tbody>\n<tr>\n<td>\u5168\u91cf\u626b\u63cf\u65f6\u95f4<\/td>\n<td>48\u5c0f\u65f6<\/td>\n<td>40\u5206\u949f<\/td>\n<td>72x<\/td>\n<\/tr>\n<tr>\n<td>\u8fc1\u79fb\u901f\u5ea6<\/td>\n<td>50 MB\/s<\/td>\n<td>1.2 GB\/s<\/td>\n<td>24x<\/td>\n<\/tr>\n<tr>\n<td>\u4e1a\u52a1I\/O\u5f71\u54cd<\/td>\n<td>\u5ef6\u8fdf\u6ce2\u52a8\u00b130ms<\/td>\n<td>\u5ef6\u8fdf\u6ce2\u52a8&lt;5ms<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<tr>\n<td>\u5b58\u50a8\u6210\u672c<\/td>\n<td>\u5168\u95ea\u5b58 $300K\/\u6708<\/td>\n<td>\u5206\u5c42\u5b58\u50a8 $90K\/\u6708<\/td>\n<td>67%\u2193<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>\u603b\u7ed3&#xff1a;\u5173\u952e\u5b9e\u8df5\u5efa\u8bae\u200b\u200b<\/h4>\n<li>\u200b\u200b\u62d2\u7edd\u66b4\u529b\u626b\u63cf\u200b\u200b&#xff1a;\u7528inode\u5e76\u884c\u8bbf\u95ee\u66ff\u4ee3find\u904d\u5386&#xff0c;\u7ed3\u5408Kafka&#043;Flink\u5b9e\u73b0\u5b9e\u65f6\u70ed\u5ea6\u5206\u6790<\/li>\n<li>\u200b\u200b\u8fc1\u79fb\u7c92\u5ea6\u4f18\u5316\u200b\u200b&#xff1a;\n<ul>\n<li>\u5c0f\u6587\u4ef6\u2192\u5408\u5e76\u8fc1\u79fb&#xff08;tar\/\u5bf9\u8c61\u5b58\u50a8&#xff09;<\/li>\n<li>\u5927\u6587\u4ef6\u2192\u5757\u7ea7\u589e\u91cf\u8fc1\u79fb&#xff08;ZFS send\/recv&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>\u200b\u200b\u52a8\u6001\u7b56\u7565\u200b\u200b&#xff1a;\u57fa\u4e8e\u5bb9\u91cf\/I\/O\u538b\u529b\u81ea\u52a8\u8c03\u6574\u8fc1\u79fb\u9608\u503c&#xff0c;\u907f\u514d\u9759\u6001\u89c4\u5219\u5931\u6548<\/li>\n<li>\u200b\u200b\u7a33\u5b9a\u6027\u4e09\u677f\u65a7\u200b\u200b&#xff1a;\n<ul>\n<li>\u7f51\u7edc\u5e26\u5bbd\u9650\u5236<\/li>\n<li>\u65ad\u70b9\u7eed\u4f20&#043;\u4e00\u81f4\u6027\u6821\u9a8c<\/li>\n<li>\u4e1a\u52a1\u4f4e\u5cf0\u671f\u6267\u884c<\/li>\n<\/ul>\n<\/li>\n<p>\u901a\u8fc7\u4e0a\u8ff0\u65b9\u6848&#xff0c;\u53ef\u6784\u5efa\u652f\u6301EB\u7ea7\u6587\u4ef6\u7cfb\u7edf\u7684\u667a\u80fd\u5206\u5c42\u5b58\u50a8&#xff0c;\u5728\u4fdd\u8bc1\u4e1a\u52a1SLA\u7684\u540c\u65f6&#xff0c;\u200b\u200b\u964d\u4f4e\u5b58\u50a8\u6210\u672c60%&#043;\u200b\u200b\u3002\u5b9e\u9645\u90e8\u7f72\u5efa\u8bae\u4ece\u975e\u5173\u952e\u4e1a\u52a1\u5f00\u59cb\u7070\u5ea6&#xff0c;\u9010\u6b65\u9a8c\u8bc1\u8fc1\u79fb\u7b56\u7565\u6709\u6548\u6027\u3002<\/p>\n<h3>1.6\u00a0ZFS\u4e0eCeph\u7684\u81ea\u52a8\u5206\u5c42\u5b58\u50a8\u5dee\u5f02<\/h3>\n<p>ZFS\u4e0eCeph\u7684\u81ea\u52a8\u5206\u5c42\u5b58\u50a8\u5728\u5b9e\u73b0\u539f\u7406\u4e0a\u5b58\u5728\u672c\u8d28\u5dee\u5f02&#xff0c;\u4e3b\u8981\u4f53\u73b0\u5728\u200b\u200b\u67b6\u6784\u5c42\u7ea7\u3001\u6570\u636e\u7ec4\u7ec7\u65b9\u5f0f\u3001\u8fc1\u79fb\u673a\u5236\u548c\u9002\u7528\u573a\u666f\u200b\u200b\u7b49\u65b9\u9762\u3002\u4ee5\u4e0b\u662f\u5173\u952e\u533a\u522b\u7684\u5bf9\u6bd4\u5206\u6790&#xff1a;<\/p>\n<hr \/>\n<h4>1.6.1\u3001\u67b6\u6784\u5c42\u7ea7\u4e0e\u8bbe\u8ba1\u76ee\u6807\u200b\u200b<\/h4>\n<li>\n<p>\u200b\u200bZFS&#xff1a;\u5355\u8282\u70b9\u6587\u4ef6\u7cfb\u7edf\u7ea7\u5206\u5c42\u200b\u200b<\/p>\n<ul>\n<li>\u200b\u200b\u5c42\u7ea7\u5b9a\u4f4d\u200b\u200b&#xff1a;ZFS\u7684\u5206\u5c42\u57fa\u4e8e\u5355\u4e2a\u5b58\u50a8\u6c60&#xff08;zpool&#xff09;\u5185\u7684\u4e0d\u540c\u865a\u62df\u8bbe\u5907&#xff08;vdev&#xff09;\u3002\u4f8b\u5982&#xff0c;\u7528SSD\u7ec4\u6210\u7279\u6b8a\u8bbe\u5907&#xff08;special vdev&#xff09;\u5b58\u653e\u5143\u6570\u636e\u548c\u5c0f\u6587\u4ef6&#xff0c;HDD\u7ec4\u6210\u666e\u901avdev\u5b58\u653e\u51b7\u6570\u636e\u3002<\/li>\n<li>\u200b\u200b\u76ee\u6807\u200b\u200b&#xff1a;\u4f18\u5316\u672c\u5730\u5b58\u50a8\u6027\u80fd\u548c\u6570\u636e\u5b8c\u6574\u6027&#xff0c;\u901a\u8fc7\u786c\u4ef6\u5dee\u5f02&#xff08;\u5982SSD\u4e0eHDD&#xff09;\u5b9e\u73b0\u5206\u5c42&#xff0c;\u200b\u200b\u4e0d\u6d89\u53ca\u5206\u5e03\u5f0f\u67b6\u6784\u200b\u200b\u3002<\/li>\n<li>\u200b\u200b\u900f\u660e\u6027\u200b\u200b&#xff1a;\u6570\u636e\u8fc1\u79fb\u5bf9\u5e94\u7528\u5b8c\u5168\u900f\u660e&#xff0c;\u65e0\u9700\u5ba2\u6237\u7aef\u611f\u77e5\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u200b\u200bCeph&#xff1a;\u5206\u5e03\u5f0f\u96c6\u7fa4\u7ea7\u5206\u5c42\u200b\u200b<\/p>\n<ul>\n<li>\u200b\u200b\u5c42\u7ea7\u5b9a\u4f4d\u200b\u200b&#xff1a;\u901a\u8fc7\u72ec\u7acb\u7684\u200b\u200b\u7f13\u5b58\u6c60\u200b\u200b&#xff08;\u5982SSD\u6c60&#xff09;\u548c\u200b\u200b\u540e\u7aef\u5b58\u50a8\u6c60\u200b\u200b&#xff08;\u5982HDD\u6c60&#xff09;\u6784\u5efa\u5206\u5c42&#xff0c;\u4e24\u8005\u7269\u7406\u9694\u79bb\u4e14\u53ef\u8de8\u8282\u70b9\u3002<\/li>\n<li>\u200b\u200b\u76ee\u6807\u200b\u200b&#xff1a;\u5728\u5206\u5e03\u5f0f\u73af\u5883\u4e0b\u5e73\u8861\u6027\u80fd\u4e0e\u6210\u672c&#xff0c;\u652f\u6301\u8de8\u96c6\u7fa4\u7684\u6570\u636e\u8fc1\u79fb&#xff08;\u5982\u672c\u5730SSD\u2192\u4e91\u5b58\u50a8&#xff09;\u3002<\/li>\n<li>\u200b\u200b\u4ee3\u7406\u9a71\u52a8\u200b\u200b&#xff1a;\u4f9d\u8d56\u7f13\u5b58\u4ee3\u7406&#xff08;Cache Agent&#xff09;\u81ea\u52a8\u8fc1\u79fb\u6570\u636e&#xff0c;\u9700\u663e\u5f0f\u914d\u7f6e\u7b56\u7565\u3002<\/li>\n<\/ul>\n<\/li>\n<hr \/>\n<h4>1.6.2\u3001\u6570\u636e\u7ec4\u7ec7\u4e0e\u8fc1\u79fb\u673a\u5236\u200b\u200b<\/h4>\n<table>\n<tr>\u200b\u200b\u7ef4\u5ea6\u200b\u200b\u200b\u200bZFS\u200b\u200b\u200b\u200bCeph\u200b\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u200b\u200b\u6570\u636e\u7c92\u5ea6\u200b\u200b<\/td>\n<td>\u200b\u200b\u5757\u7ea7\u7ba1\u7406\u200b\u200b&#xff1a;\u4ee5\u6570\u636e\u5757\u4e3a\u5355\u4f4d\u8fc1\u79fb\u70ed\u70b9\u6570\u636e\u3002<\/td>\n<td>\u200b\u200b\u5bf9\u8c61\u7ea7\u7ba1\u7406\u200b\u200b&#xff1a;\u4ee5\u6574\u4e2a\u5bf9\u8c61&#xff08;\u59821MB~4MB&#xff09;\u4e3a\u5355\u4f4d\u8fc1\u79fb\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u8fc1\u79fb\u89e6\u53d1\u200b\u200b<\/td>\n<td>\u200b\u200b\u5185\u7f6e\u7b97\u6cd5\u200b\u200b&#xff1a;\u57fa\u4e8e\u8bbf\u95ee\u9891\u7387&#xff08;\u5982ARC\/L2ARC\u7f13\u5b58\u7b97\u6cd5&#xff09;\u81ea\u52a8\u8fc1\u79fb&#xff0c;\u65e0\u4eba\u5de5\u7b56\u7565\u3002<\/td>\n<td>\u200b\u200b\u7b56\u7565\u5f15\u64ce\u200b\u200b&#xff1a;\u9700\u914d\u7f6e\u751f\u547d\u5468\u671f\u89c4\u5219&#xff08;\u5982\u65f6\u95f4\u9608\u503c\u3001\u8bbf\u95ee\u9891\u7387&#xff09;&#xff0c;\u652f\u6301\u81ea\u5b9a\u4e49\u6761\u4ef6&#xff08;\u5982\u5bf9\u8c61\u5927\u5c0f\u3001\u6807\u7b7e&#xff09;\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u8fc1\u79fb\u65b9\u5411\u200b\u200b<\/td>\n<td>\u4ec5\u5728\u5b58\u50a8\u6c60\u5185vdev\u95f4\u8fc1\u79fb&#xff08;\u5982SSD\u2192HDD&#xff09;\u3002<\/td>\n<td>\u652f\u6301\u53cc\u5411\u8fc1\u79fb&#xff1a;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li>\u200b\u200b\u5199\u56de\u6a21\u5f0f&#xff08;Writeback&#xff09;\u200b\u200b&#xff1a;\u6570\u636e\u5148\u5199\u7f13\u5b58\u6c60&#xff0c;\u5f02\u6b65\u5237\u5230\u540e\u7aef\u6c60\u3002<\/li>\n<li>\u200b\u200b\u53ea\u8bfb\u6a21\u5f0f&#xff08;Read-only&#xff09;\u200b\u200b&#xff1a;\u6570\u636e\u4ece\u540e\u7aef\u6c60\u590d\u5236\u5230\u7f13\u5b58\u6c60\u3002 |<br \/>\n| \u200b\u200b\u4e00\u81f4\u6027\u4fdd\u969c\u200b\u200b | \u200b\u200b\u4e8b\u52a1\u6027\u6a21\u578b\u200b\u200b&#xff1a;\u5199\u65f6\u590d\u5236&#xff08;Copy-on-Write&#xff09;\u786e\u4fdd\u8fc1\u79fb\u4e2d\u6570\u636e\u4e00\u81f4\u6027\u3002 | \u200b\u200b\u5f31\u4e00\u81f4\u6027\u98ce\u9669\u200b\u200b&#xff1a;Writeback\u6a21\u5f0f\u4e0b\u7f13\u5b58\u672a\u5237\u65b0\u65f6\u5b95\u673a\u53ef\u80fd\u5bfc\u81f4\u6570\u636e\u4e22\u5931\u3002 |<\/li>\n<\/ul>\n<hr \/>\n<h4>1.6.3\u3001\u7b56\u7565\u63a7\u5236\u4e0e\u7075\u6d3b\u6027\u200b\u200b<\/h4>\n<li>\n<p>\u200b\u200bZFS&#xff1a;\u6709\u9650\u7b56\u7565\u63a7\u5236\u200b\u200b<\/p>\n<ul>\n<li>\u4f9d\u8d56\u6587\u4ef6\u7cfb\u7edf\u5185\u7f6e\u903b\u8f91&#xff08;\u5982\u8bbf\u95ee\u65f6\u95f4\u3001\u7f13\u5b58\u547d\u4e2d\u7387&#xff09;&#xff0c;\u200b\u200b\u65e0\u6cd5\u81ea\u5b9a\u4e49\u8fc1\u79fb\u89c4\u5219\u200b\u200b&#xff08;\u5982\u57fa\u4e8e\u65f6\u95f4\u9608\u503c&#xff09;\u3002<\/li>\n<li>\u5206\u5c42\u884c\u4e3a\u7531\u786c\u4ef6\u914d\u7f6e&#xff08;vdev\u7c7b\u578b&#xff09;\u51b3\u5b9a&#xff0c;\u8c03\u6574\u9700\u91cd\u6784\u5b58\u50a8\u6c60\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u200b\u200bCeph&#xff1a;\u9ad8\u5ea6\u53ef\u914d\u7f6e\u7b56\u7565\u200b\u200b<\/p>\n<ul>\n<li>\u200b\u200b\u65f6\u95f4\u9608\u503c\u200b\u200b&#xff1a;\u53ef\u5b9a\u4e49\u5bf9\u8c61\u5728\u7f13\u5b58\u6c60\u7684\u505c\u7559\u65f6\u95f4&#xff08;\u5982cache_min_evict_age&#xff09;\u3002<\/li>\n<li>\u200b\u200b\u70ed\u5ea6\u611f\u77e5\u200b\u200b&#xff1a;\u901a\u8fc7hit_set\u8ffd\u8e2a\u5bf9\u8c61\u8bbf\u95ee\u9891\u6b21&#xff0c;\u652f\u6301\u6309\u70ed\u5ea6\u8fc1\u79fb\u3002<\/li>\n<li>\u200b\u200b\u4e91\u96c6\u6210\u200b\u200b&#xff1a;\u652f\u6301\u5c06\u51b7\u6570\u636e\u5f52\u6863\u5230S3\u517c\u5bb9\u4e91\u5b58\u50a8&#xff08;\u5982AWS Glacier&#xff09;&#xff0c;\u5e76\u914d\u7f6e\u68c0\u7d22\u7b56\u7565\u3002<\/li>\n<\/ul>\n<\/li>\n<hr \/>\n<h4>1.6.4\u3001\u900f\u660e\u6027\u4e0e\u5ba2\u6237\u7aef\u5f71\u54cd\u200b\u200b<\/h4>\n<ul>\n<li>\u200b\u200bZFS\u200b\u200b&#xff1a;\u5206\u5c42\u5bf9\u5e94\u7528\u5b8c\u5168\u900f\u660e&#xff0c;\u65e0\u9700\u4fee\u6539\u5ba2\u6237\u7aef\u914d\u7f6e\u6216\u534f\u8bae\u3002<\/li>\n<li>\u200b\u200bCeph\u200b\u200b&#xff1a;\u9700\u5ba2\u6237\u7aef\u91cd\u5b9a\u5411&#xff1a;\n<ul>\n<li>Writeback\u6a21\u5f0f\u4e0b&#xff0c;\u6240\u6709I\/O\u5148\u6307\u5411\u7f13\u5b58\u6c60\u3002<\/li>\n<li>\u53ef\u80fd\u56e0\u7b56\u7565\u5ef6\u8fdf&#xff08;\u5982\u7f13\u5b58\u672a\u5237\u65b0&#xff09;\u5bfc\u81f4\u5ba2\u6237\u7aef\u8bfb\u53d6\u65e7\u6570\u636e&#xff08;Read-only\u6a21\u5f0f&#xff09;\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<hr \/>\n<h4>1.6.5\u3001\u9002\u7528\u573a\u666f\u5bf9\u6bd4\u200b\u200b<\/h4>\n<table>\n<tr>\u200b\u200b\u573a\u666f\u200b\u200b\u200b\u200bZFS\u200b\u200b\u200b\u200bCeph\u200b\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u200b\u200b\u5355\u8282\u70b9\u9ad8\u6027\u80fd\u5b58\u50a8\u200b\u200b<\/td>\n<td>\u2705 \u672c\u5730\u6570\u636e\u5e93\u3001\u865a\u62df\u673a\u5b58\u50a8\u3002<\/td>\n<td>\u274c \u975e\u5206\u5e03\u5f0f\u573a\u666f\u4f18\u52bf\u5f31\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u5206\u5e03\u5f0f\u6df7\u5408\u4e91\u5b58\u50a8\u200b\u200b<\/td>\n<td>\u274c \u65e0\u8de8\u8282\u70b9\u80fd\u529b\u3002<\/td>\n<td>\u2705 \u8de8\u96c6\u7fa4\u51b7\u70ed\u5206\u5c42&#043;\u4e91\u5f52\u6863\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u7b56\u7565\u7cbe\u7ec6\u5316\u9700\u6c42\u200b\u200b<\/td>\n<td>\u274c \u7b56\u7565\u56fa\u5b9a\u3002<\/td>\n<td>\u2705 \u652f\u6301\u591a\u7ef4\u5ea6\u6761\u4ef6&#xff08;\u65f6\u95f4\/\u5927\u5c0f\/\u6807\u7b7e&#xff09;\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u90e8\u7f72\u590d\u6742\u5ea6\u200b\u200b<\/td>\n<td>\u2705 \u5f00\u7bb1\u5373\u7528&#xff0c;\u914d\u7f6e\u7b80\u5355\u3002<\/td>\n<td>\u274c \u9700\u72ec\u7acb\u914d\u7f6e\u7f13\u5b58\u6c60\u3001\u7b56\u7565\u4ee3\u7406\u548cCRUSH\u89c4\u5219\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>\u00a0\u200b\u200b\u603b\u7ed3&#xff1a;\u672c\u8d28\u533a\u522b\u200b\u200b<\/h4>\n<li>\u200b\u200b\u67b6\u6784\u672c\u8d28\u200b\u200b&#xff1a;\n<ul>\n<li>ZFS\u662f\u200b\u200b\u5355\u673a\u6587\u4ef6\u7cfb\u7edf\u200b\u200b\u7684\u5206\u5c42\u4f18\u5316&#xff0c;\u4f9d\u8d56\u786c\u4ef6\u6c60\u5316\u3002<\/li>\n<li>Ceph\u662f\u200b\u200b\u5206\u5e03\u5f0f\u5bf9\u8c61\u5b58\u50a8\u200b\u200b\u7684\u5206\u5c42&#xff0c;\u4f9d\u8d56\u7b56\u7565\u9a71\u52a8\u7684\u8de8\u6c60\u8fc1\u79fb\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u200b\u200b\u8fc1\u79fb\u903b\u8f91\u200b\u200b&#xff1a;\n<ul>\n<li>ZFS\u901a\u8fc7\u200b\u200b\u5757\u7ea7\u70ed\u5ea6\u200b\u200b\u81ea\u52a8\u8fc1\u79fb&#xff0c;\u65e0\u7b56\u7565\u63a5\u53e3\u3002<\/li>\n<li>Ceph\u901a\u8fc7\u200b\u200b\u5bf9\u8c61\u7ea7\u7b56\u7565\u200b\u200b&#xff08;\u5982\u65f6\u95f4\u9608\u503c\u3001\u8bbf\u95ee\u9891\u7387&#xff09;\u89e6\u53d1\u8fc1\u79fb\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u200b\u200b\u6269\u5c55\u6027\u200b\u200b&#xff1a;\n<ul>\n<li>ZFS\u9650\u4e8e\u5355\u8282\u70b9&#xff0c;Ceph\u652f\u6301\u200b\u200b\u8de8\u96c6\u7fa4\u3001\u6df7\u5408\u4e91\u200b\u200b\u5206\u5c42\u3002<\/li>\n<\/ul>\n<\/li>\n<p>\u200b\u200b\u5b9e\u9645\u9009\u578b\u5efa\u8bae\u200b\u200b&#xff1a;<\/p>\n<ul>\n<li>\u5355\u8282\u70b9\u9ad8\u6027\u80fd\u9700\u6c42&#xff08;\u5982NAS\u3001\u6570\u636e\u5e93&#xff09;\u2192 \u200b\u200bZFS\u200b\u200b<\/li>\n<li>\u5927\u89c4\u6a21\u5206\u5e03\u5f0f\u5b58\u50a8\u3001\u4e91\u539f\u751f\u96c6\u6210 \u2192 \u200b\u200bCeph\u200b\u200b<br \/>\n\u4e8c\u8005\u4ea6\u53ef\u7ed3\u5408&#xff1a;\u7528ZFS\u4f5c\u4e3aCeph OSD\u8282\u70b9\u7684\u672c\u5730\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u517c\u987e\u6570\u636e\u4e00\u81f4\u6027\u4e0e\u5206\u5e03\u5f0f\u6269\u5c55\u6027\u3002<\/li>\n<\/ul>\n<h3>1.7 ZFS\u4e0eCeph\u5728\u6570\u636e\u4e00\u81f4\u6027\u4fdd\u969c\u673a\u5236<\/h3>\n<p>\u5b58\u5728\u663e\u8457\u5dee\u5f02&#xff0c;\u4e3b\u8981\u4f53\u73b0\u5728\u200b\u200b\u67b6\u6784\u5c42\u7ea7\u3001\u5b9e\u73b0\u539f\u7406\u548c\u9002\u7528\u573a\u666f\u200b\u200b\u4e09\u4e2a\u65b9\u9762\u3002<\/p>\n<hr \/>\n<h4>1.7.1\u3001\u6838\u5fc3\u673a\u5236\u5dee\u5f02<\/h4>\n<table>\n<tr>\u200b\u200b\u7ef4\u5ea6\u200b\u200b\u200b\u200bZFS\u200b\u200b\u200b\u200bCeph\u200b\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u200b\u200b\u67b6\u6784\u5c42\u7ea7\u200b\u200b<\/td>\n<td>\u5355\u8282\u70b9\u6587\u4ef6\u7cfb\u7edf<\/td>\n<td>\u5206\u5e03\u5f0f\u5b58\u50a8\u96c6\u7fa4<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u4e00\u81f4\u6027\u8303\u56f4\u200b\u200b<\/td>\n<td>\u672c\u5730\u5b58\u50a8\u6c60\u5185\u6570\u636e\u5757<\/td>\n<td>\u8de8\u8282\u70b9\u591a\u526f\u672c\u6570\u636e\u540c\u6b65<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u6838\u5fc3\u6280\u672f\u200b\u200b<\/td>\n<td>\u5199\u65f6\u590d\u5236 (Copy-on-Write) &#043; 256\u4f4d\u6821\u9a8c\u548c<\/td>\n<td>Paxos\u5171\u8bc6\u7b97\u6cd5 &#043; \u4e3b\u526f\u672c\u6a21\u578b &#043; CRUSH\u6570\u636e\u5206\u5e03<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u6545\u969c\u6062\u590d\u200b\u200b<\/td>\n<td>\u81ea\u6211\u4fee\u590d (\u901a\u8fc7\u6821\u9a8c\u548c\u81ea\u52a8\u4fee\u590d\u635f\u574f\u5757)<\/td>\n<td>\u526f\u672c\u91cd\u5efa &#043; PGLog\u65e5\u5fd7\u540c\u6b65<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u6570\u636e\u6a21\u578b\u200b\u200b<\/td>\n<td>\u5757\u7ea7\u4e00\u81f4\u6027 (\u5b58\u50a8\u6c60\u5185)<\/td>\n<td>\u5bf9\u8c61\u7ea7\u4e00\u81f4\u6027 (\u8de8OSD\u526f\u672c)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>1.7.2\u3001ZFS\u7684\u6570\u636e\u4e00\u81f4\u6027\u673a\u5236<\/h4>\n<h5>1. \u200b\u200b\u5199\u65f6\u590d\u5236 (CoW)\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u200b\u539f\u7406\u200b\u200b&#xff1a;\u6570\u636e\u4fee\u6539\u65f6\u4e0d\u8986\u76d6\u65e7\u5757&#xff0c;\u800c\u662f\u5206\u914d\u65b0\u5757\u5199\u5165&#xff0c;\u66f4\u65b0\u5143\u6570\u636e\u6307\u9488\u3002\u65e7\u6570\u636e\u4fdd\u7559\u81f3\u4e8b\u52a1\u63d0\u4ea4\u5b8c\u6210&#xff0c;\u786e\u4fdd\u5d29\u6e83\u65f6\u53ef\u56de\u6eda\u3002<\/li>\n<li>\u200b\u200b\u4f18\u52bf\u200b\u200b&#xff1a;\u907f\u514d\u201c\u5199\u4e00\u534a\u201d\u95ee\u9898&#xff0c;\u4fdd\u8bc1\u539f\u5b50\u6027\u3002<\/li>\n<li>\u200b\u200b\u4ee3\u4ef7\u200b\u200b&#xff1a;\u53ef\u80fd\u52a0\u5267\u788e\u7247\u5316&#xff08;\u968f\u673a\u4fee\u6539\u5927\u6587\u4ef6\u540e\u987a\u5e8f\u8bfb\u6027\u80fd\u4e0b\u964d&#xff09;\u3002<\/li>\n<\/ul>\n<h5>2. \u200b\u200b\u7aef\u5230\u7aef\u6821\u9a8c\u548c\u200b\u200b<\/h5>\n<ul>\n<li>\u6bcf\u4e2a\u6570\u636e\u5757\u9644\u5e26256\u4f4d\u6821\u9a8c\u548c&#xff0c;\u8bfb\u53d6\u65f6\u81ea\u52a8\u9a8c\u8bc1\u3002\u82e5\u6821\u9a8c\u5931\u8d25&#xff0c;ZFS\u4ece\u5197\u4f59\u526f\u672c&#xff08;\u5982RAID-Z\u955c\u50cf&#xff09;\u6062\u590d\u6570\u636e\u3002<\/li>\n<li>\u200b\u200b\u81ea\u6108\u80fd\u529b\u200b\u200b&#xff1a;\u4f9d\u8d56\u5b58\u50a8\u6c60\u7684\u5197\u4f59\u914d\u7f6e&#xff08;\u5982\u955c\u50cf\u6216RAID-Z&#xff09;&#xff0c;\u65e0\u5197\u4f59\u5219\u4ec5\u62a5\u9519\u65e0\u6cd5\u4fee\u590d\u3002<\/li>\n<\/ul>\n<h5>3. \u200b\u200b\u4e8b\u52a1\u7ec4\u63d0\u4ea4 (Transaction Groups)\u200b\u200b<\/h5>\n<ul>\n<li>\u5c06\u591a\u6b21\u5199\u5165\u5408\u5e76\u4e3a\u4e8b\u52a1\u7ec4&#xff0c;\u539f\u5b50\u63d0\u4ea4\u5230\u78c1\u76d8&#xff0c;\u51cf\u5c11\u5143\u6570\u636e\u66f4\u65b0\u5f00\u9500\u3002<\/li>\n<\/ul>\n<hr \/>\n<h4>1.7.3\u3001Ceph\u7684\u6570\u636e\u4e00\u81f4\u6027\u673a\u5236<\/h4>\n<h5>1. \u200b\u200bPaxos\u5171\u8bc6\u7b97\u6cd5\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u200b\u4f5c\u7528\u8303\u56f4\u200b\u200b&#xff1a;\u7ba1\u7406Monitor\u96c6\u7fa4\u7684\u5143\u6570\u636e&#xff08;\u5982OSD\u72b6\u6001\u3001CRUSH\u89c4\u5219&#xff09;\u3002<\/li>\n<li>\u200b\u200b\u6d41\u7a0b\u200b\u200b&#xff1a;\n<ul>\n<li>Monitor\u8282\u70b9\u901a\u8fc7Paxos\u9009\u4e3eLeader&#xff0c;\u540c\u6b65\u96c6\u7fa4\u72b6\u6001\u53d8\u66f4\u3002<\/li>\n<li>\u9700\u591a\u6570\u8282\u70b9\u786e\u8ba4\u66f4\u65b0&#xff0c;\u907f\u514d\u8111\u88c2&#xff08;\u5982\u7f51\u7edc\u5206\u533a\u65f6\u6682\u505c\u670d\u52a1&#xff09;\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h5>2. \u200b\u200b\u4e3b\u526f\u672c\u6a21\u578b (Primary-Replica)\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u200b\u5199\u5165\u6d41\u7a0b\u200b\u200b&#xff1a;\n<li>\u5ba2\u6237\u7aef\u5411\u4e3bOSD\u53d1\u8d77\u5199\u8bf7\u6c42\u3002<\/li>\n<li>\u4e3bOSD\u540c\u6b65\u6570\u636e\u5230\u526f\u672cOSD\u3002<\/li>\n<li>\u6240\u6709\u526f\u672c\u786e\u8ba4\u540e\u8fd4\u56de\u5ba2\u6237\u7aef\u6210\u529f\u3002<\/li>\n<\/li>\n<li>\u200b\u200b\u5f3a\u4e00\u81f4\u6027\u4fdd\u8bc1\u200b\u200b&#xff1a;\u6240\u6709\u526f\u672c\u5b8c\u6210\u5199\u5165\u624d\u786e\u8ba4&#xff0c;\u907f\u514d\u810f\u8bfb\u3002<\/li>\n<\/ul>\n<h5>3. \u200b\u200bPGLog\u4e0e\u5f02\u5e38\u6062\u590d\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u200bPGLog\u200b\u200b&#xff1a;\u8bb0\u5f55\u5bf9\u8c61\u7248\u672c\u53f7&#xff0c;\u7528\u4e8e\u526f\u672c\u95f4\u540c\u6b65\u72b6\u6001\u3002<\/li>\n<li>\u200b\u200b\u6545\u969c\u5904\u7406\u200b\u200b&#xff1a;\n<ul>\n<li>OSD\u5b95\u673a\u540e&#xff0c;\u901a\u8fc7PGLog\u6bd4\u5bf9\u7f3a\u5931\u6570\u636e\u5e76\u91cd\u5efa\u3002<\/li>\n<li>Scrubbing\u673a\u5236\u5b9a\u671f\u6821\u9a8c\u526f\u672c\u6570\u636e\u4e00\u81f4\u6027&#xff0c;\u81ea\u52a8\u4fee\u590d\u5dee\u5f02\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h5>4. \u200b\u200bCRUSH\u7b97\u6cd5\u200b\u200b<\/h5>\n<ul>\n<li>\u52a8\u6001\u8ba1\u7b97\u6570\u636e\u5206\u5e03&#xff0c;\u786e\u4fddPG&#xff08;Placement Group&#xff09;\u5185\u526f\u672c\u4f4d\u4e8e\u4e0d\u540c\u6545\u969c\u57df&#xff08;\u5982\u673a\u67b6\u3001\u4e3b\u673a&#xff09;\u3002<\/li>\n<\/ul>\n<hr \/>\n<h4>1.7.4\u3001\u5173\u952e\u5dee\u5f02\u603b\u7ed3<\/h4>\n<table>\n<tr>\u200b\u200b\u573a\u666f\u200b\u200b\u200b\u200bZFS\u200b\u200b\u200b\u200bCeph\u200b\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u200b\u200b\u5355\u8282\u70b9\u6545\u969c\u200b\u200b<\/td>\n<td>\u2705 \u672c\u5730\u6821\u9a8c\u548c&#043;\u5197\u4f59\u4fee\u590d<\/td>\n<td>\u2705 \u526f\u672c\u81ea\u52a8\u91cd\u5efa<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u591a\u8282\u70b9\u4e00\u81f4\u6027\u200b\u200b<\/td>\n<td>\u274c \u4e0d\u6d89\u53ca\u8de8\u8282\u70b9\u540c\u6b65<\/td>\n<td>\u2705 Paxos&#043;\u4e3b\u526f\u672c\u5f3a\u540c\u6b65<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u7f51\u7edc\u5206\u533a\u5bb9\u5fcd\u200b\u200b<\/td>\n<td>\u274c \u5355\u70b9\u67b6\u6784\u65e0\u5f71\u54cd<\/td>\n<td>\u2705 \u901a\u8fc7Paxos\u727a\u7272\u90e8\u5206\u53ef\u7528\u6027\u4fdd\u4e00\u81f4\u6027<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u6027\u80fd\u5f71\u54cd\u200b\u200b<\/td>\n<td>\u4f4e&#xff08;\u672c\u5730\u64cd\u4f5c&#xff09;<\/td>\n<td>\u4e2d&#xff08;\u8de8\u8282\u70b9\u540c\u6b65\u5ef6\u8fdf&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u9002\u7528\u573a\u666f\u200b\u200b<\/td>\n<td>\u5355\u670d\u52a1\u5668\/NAS<\/td>\n<td>\u5927\u89c4\u6a21\u5206\u5e03\u5f0f\u96c6\u7fa4\/\u4e91\u5b58\u50a8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>1.7.5\u3001\u5178\u578b\u95ee\u9898\u4e0e\u89e3\u51b3\u65b9\u6848\u5bf9\u6bd4<\/h4>\n<li>\n<p>\u200b\u200b\u5199\u5165\u4e2d\u65ad\u200b\u200b<\/p>\n<ul>\n<li>\u200b\u200bZFS\u200b\u200b&#xff1a;\u672a\u63d0\u4ea4\u7684\u4e8b\u52a1\u7ec4\u81ea\u52a8\u4e22\u5f03&#xff0c;\u4fdd\u7559\u65e7\u6570\u636e\u4e00\u81f4\u6027\u3002<\/li>\n<li>\u200b\u200bCeph\u200b\u200b&#xff1a;\u526f\u672c\u95f4\u72b6\u6001\u901a\u8fc7PGLog\u4fee\u590d&#xff0c;\u786e\u4fdd\u6700\u7ec8\u4e00\u81f4\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u200b\u200b\u6570\u636e\u9759\u9ed8\u635f\u574f\u200b\u200b<\/p>\n<ul>\n<li>\u200b\u200bZFS\u200b\u200b&#xff1a;\u8bfb\u53d6\u65f6\u6821\u9a8c\u548c\u9a8c\u8bc1&#043;\u81ea\u52a8\u4fee\u590d&#xff08;\u9700\u5197\u4f59\u914d\u7f6e&#xff09;\u3002<\/li>\n<li>\u200b\u200bCeph\u200b\u200b&#xff1a;Scrubbing\u5b9a\u671f\u626b\u63cf&#043;\u526f\u672c\u6bd4\u5bf9\u4fee\u590d\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u200b\u200b\u8111\u88c2\u98ce\u9669\u200b\u200b<\/p>\n<ul>\n<li>\u200b\u200bZFS\u200b\u200b&#xff1a;\u65e0&#xff08;\u5355\u8282\u70b9\u67b6\u6784&#xff09;\u3002<\/li>\n<li>\u200b\u200bCeph\u200b\u200b&#xff1a;Paxos\u963b\u6b62\u5c11\u6570\u6d3eMonitor\u5199\u5165&#xff0c;\u907f\u514d\u5143\u6570\u636e\u5206\u88c2\u3002<\/li>\n<\/ul>\n<\/li>\n<hr \/>\n<h4>1.7.6\u3001\u5b9e\u8df5\u5efa\u8bae<\/h4>\n<ul>\n<li>\u200b\u200b\u9009ZFS\u200b\u200b&#xff1a;<br \/>\n\u8ffd\u6c42\u5355\u8282\u70b9\u6570\u636e\u5b8c\u6574\u6027&#xff08;\u5982\u6570\u636e\u5e93\u5b58\u50a8&#xff09;\u3001\u65e0\u9700\u8de8\u8282\u70b9\u6269\u5c55\u7684\u573a\u666f\u3002<\/li>\n<li>\u200b\u200b\u9009Ceph\u200b\u200b&#xff1a;<br \/>\n\u9700\u6a2a\u5411\u6269\u5c55\u3001\u9ad8\u53ef\u7528\u5bb9\u707e\u7684\u5206\u5e03\u5f0f\u73af\u5883&#xff08;\u5982\u4e91\u5b58\u50a8\u5e73\u53f0&#xff09;\u3002<\/li>\n<li>\u200b\u200b\u6df7\u5408\u67b6\u6784\u200b\u200b&#xff1a;<br \/>\n\u5728Ceph OSD\u8282\u70b9\u4f7f\u7528ZFS\u4f5c\u4e3a\u672c\u5730\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u7ed3\u5408\u5757\u6821\u9a8c\u4e0e\u5206\u5e03\u5f0f\u5197\u4f59&#xff08;\u5982\u67d0\u4e91\u5382\u5546\u65b9\u6848&#xff09;\u3002<\/li>\n<\/ul>\n<p>\u901a\u8fc7\u4e0a\u8ff0\u673a\u5236&#xff0c;ZFS\u5728\u200b\u200b\u5355\u8282\u70b9\u53ef\u9760\u6027\u200b\u200b\u4e0a\u66f4\u6781\u81f4&#xff0c;\u800cCeph\u5728\u200b\u200b\u5206\u5e03\u5f0f\u4e00\u81f4\u6027\u200b\u200b\u4e0a\u66f4\u5b8c\u5907\u3002\u5b9e\u9645\u90e8\u7f72\u9700\u6839\u636e\u4e1a\u52a1\u5bf9\u4e00\u81f4\u6027\u7ea7\u522b&#xff08;\u5f3a\u4e00\u81f4\/\u6700\u7ec8\u4e00\u81f4&#xff09;\u3001\u6545\u969c\u57df\u5bb9\u5fcd\u5ea6\u548c\u6269\u5c55\u6027\u7684\u9700\u6c42\u6743\u8861\u9009\u62e9\u3002<\/p>\n<h3>1.8 \u7ea0\u5220\u7801<\/h3>\n<p>\u7ea0\u5220\u7801&#xff08;Erasure Coding, EC&#xff09;\u662f\u5bf9\u8c61\u5b58\u50a8\u7684\u6838\u5fc3\u6570\u636e\u4fdd\u62a4\u6280\u672f&#xff0c;\u5176\u914d\u7f6e\u7b56\u7565&#xff08;\u59828&#043;3\u300112&#043;4&#xff09;\u76f4\u63a5\u5f71\u54cd\u5b58\u50a8\u6548\u7387\u3001\u6062\u590d\u6027\u80fd\u53ca\u6210\u672c\u3002<\/p>\n<hr \/>\n<h4>1.8.1\u3001\u7ea0\u5220\u7801\u57fa\u7840\u539f\u7406<\/h4>\n<p>\u7ea0\u5220\u7801\u5c06\u6570\u636e\u5206\u5757\u4e3a \u200bk\u4e2a\u6570\u636e\u5757\u200b \u5e76\u8ba1\u7b97 \u200bm\u4e2a\u6821\u9a8c\u5757&#xff0c;\u5171 \u200bn&#061;k&#043;m\u200b \u4e2a\u5757&#xff0c;\u5141\u8bb8\u6700\u591a\u4e22\u5931 \u200bm\u4e2a\u5757\u800c\u4e0d\u4e22\u6570\u636e\u3002<\/p>\n<ul>\n<li>\u200b\u5b58\u50a8\u6548\u7387\u200b &#061; k\/(k&#043;m)<\/li>\n<li>\u200b\u5bb9\u9519\u80fd\u529b\u200b&#xff1a;\u53ef\u5bb9\u5fcd m \u4e2a\u5757\u540c\u65f6\u6545\u969c<\/li>\n<\/ul>\n<table>\n<tr>\u200b\u914d\u7f6e\u200b\u200b\u5b58\u50a8\u6548\u7387\u200b\u200b\u5bb9\u9519\u8282\u70b9\u6570\u200b\u200b\u6700\u5c0f\u5b58\u50a8\u8282\u70b9\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u200b8&#043;3\u200b<\/td>\n<td>72.7%<\/td>\n<td>3<\/td>\n<td>11<\/td>\n<\/tr>\n<tr>\n<td>\u200b12&#043;4\u200b<\/td>\n<td>75%<\/td>\n<td>4<\/td>\n<td>16<\/td>\n<\/tr>\n<tr>\n<td>\u200b10&#043;2\u200b<\/td>\n<td>83.3%<\/td>\n<td>2<\/td>\n<td>12<\/td>\n<\/tr>\n<tr>\n<td>\u200b6&#043;3\u200b<\/td>\n<td>66.7%<\/td>\n<td>3<\/td>\n<td>9<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u200b\u4e09\u526f\u672c\u5bf9\u6bd4\u200b&#xff1a;\u5b58\u50a8\u6548\u7387\u4ec533%&#xff0c;\u5bb9\u9519\u80fd\u529b2\u8282\u70b9<\/p>\n<hr \/>\n<h4>1.8.2\u3001\u6062\u590d\u6027\u80fd\u5f71\u54cd\u56e0\u7d20<\/h4>\n<h5>1. \u200b\u6062\u590d\u5ef6\u8fdf\u516c\u5f0f\u200b<\/h5>\n<p>\u6062\u590d\u65f6\u95f4 &#061; \u6570\u636e\u91cf \u00d7 (k&#043;m) \/ (k \u00d7 \u5355\u8282\u70b9\u5e26\u5bbd \u00d7 \u5e76\u884c\u5ea6)<\/p>\n<ul>\n<li>\u200b\u5173\u952e\u53c2\u6570\u200b&#xff1a;\n<ul>\n<li>\u200b\u6570\u636e\u91cf\u200b&#xff1a;\u9700\u6062\u590d\u7684\u6570\u636e\u603b\u91cf<\/li>\n<li>\u200bk\u200b&#xff1a;\u6570\u636e\u5757\u6570\u91cf&#xff08;\u5f71\u54cd\u6570\u636e\u5206\u7247\u5927\u5c0f&#xff09;<\/li>\n<li>\u200b\u5e76\u884c\u5ea6\u200b&#xff1a;\u540c\u65f6\u53c2\u4e0e\u6062\u590d\u7684\u8282\u70b9\u6570<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h5>2. \u914d\u7f6e\u5bf9\u6bd4\u5b9e\u9a8c&#xff08;1TB\u6570\u636e\u6062\u590d&#xff09;<\/h5>\n<table>\n<tr>\u200b\u914d\u7f6e\u200b\u200b\u5355\u5757\u5927\u5c0f\u200b\u200b\u6062\u590d\u8282\u70b9\u6570\u200b\u200b\u7f51\u7edc\u5e26\u5bbd\u200b\u200b\u7406\u8bba\u6062\u590d\u65f6\u95f4\u200b<\/tr>\n<tbody>\n<tr>\n<td>8&#043;3<\/td>\n<td>128GB<\/td>\n<td>8<\/td>\n<td>10Gbps<\/td>\n<td>42\u5206\u949f<\/td>\n<\/tr>\n<tr>\n<td>12&#043;4<\/td>\n<td>85GB<\/td>\n<td>12<\/td>\n<td>10Gbps<\/td>\n<td>28\u5206\u949f<\/td>\n<\/tr>\n<tr>\n<td>\u4e09\u526f\u672c<\/td>\n<td>1TB<\/td>\n<td>3<\/td>\n<td>10Gbps<\/td>\n<td>136\u5206\u949f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u200b\u8bf4\u660e\u200b&#xff1a;EC 12&#043;4\u6062\u590d\u901f\u5ea6\u6bd48&#043;3\u5feb33%&#xff0c;\u6bd4\u4e09\u526f\u672c\u5feb80%<\/p>\n<h5>3. \u200b\u6062\u590d\u6027\u80fd\u74f6\u9888\u200b<\/h5>\n<p>graph LR<br \/>\n    A[\u8282\u70b9\u6545\u969c] &#8211;&gt; B[\u89e6\u53d1\u6062\u590d]<br \/>\n    B &#8211;&gt; C{\u6062\u590d\u74f6\u9888}<br \/>\n    C &#8211;&gt;|\u7f51\u7edc| D[\u8de8\u673a\u67b6\u5e26\u5bbd]<br \/>\n    C &#8211;&gt;|CPU| E[\u7f16\u89e3\u7801\u8ba1\u7b97]<br \/>\n    C &#8211;&gt;|\u78c1\u76d8| F[\u8bfb\u53d6\u6e90\u6570\u636e]<br \/>\n    D &#8211;&gt; G[\u589e\u52a0\u7f51\u7edc\u5e76\u884c\u5ea6]<br \/>\n    E &#8211;&gt; H[\u786c\u4ef6\u52a0\u901f]<br \/>\n    F &#8211;&gt; I[SSD\u7f13\u5b58]<\/p>\n<hr \/>\n<h4>1.8.3\u3001\u914d\u7f6e\u4f18\u5316\u7b56\u7565<\/h4>\n<h5>1. \u200b\u5b58\u50a8\u6548\u7387\u4f18\u5316\u200b<\/h5>\n<ul>\n<li>\u200b\u51b7\u6570\u636e\u5c42\u200b&#xff1a;\u91c7\u7528\u9ad8\u5197\u4f59\u914d\u7f6e&#xff08;\u598212&#043;4&#xff09;\n<ul>\n<li>\u5b58\u50a8\u6548\u738775% vs \u4e09\u526f\u672c33%&#xff0c;\u6210\u672c\u964d\u4f4e56%<\/li>\n<\/ul>\n<\/li>\n<li>\u200b\u70ed\u6570\u636e\u5c42\u200b&#xff1a;\u4f4e\u5197\u4f59\u914d\u7f6e&#xff08;\u59828&#043;2&#xff09;\n<ul>\n<li>\u517c\u987e\u6548\u7387&#xff08;80%&#xff09;\u4e0e\u6062\u590d\u901f\u5ea6<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h5>2. \u200b\u6062\u590d\u6027\u80fd\u63d0\u5347\u200b<\/h5>\n<ul>\n<li>\u200b\u5e76\u884c\u6062\u590d\u200b&#xff1a;\n<p># \u4f2a\u4ee3\u7801&#xff1a;\u5e76\u884c\u8bfb\u53d6\u6570\u636e\u5757<br \/>\ndef recover_data(failed_node):<br \/>\n    blocks_to_read &#061; random.sample(available_nodes, k)  # \u968f\u673a\u9009\u62e9k\u4e2a\u8282\u70b9<br \/>\n    with ThreadPoolExecutor(max_workers&#061;k) as executor:<br \/>\n        futures &#061; [executor.submit(read_block, node) for node in blocks_to_read]<br \/>\n        results &#061; [f.result() for f in futures]<br \/>\n    return decode_ec(results)  # \u89e3\u7801\u6062\u590d\u6570\u636e\n<\/li>\n<li>\u200b\u786c\u4ef6\u52a0\u901f\u200b&#xff1a;\n<ul>\n<li>\u4f7f\u7528Intel ISA-L\u5e93\u52a0\u901f\u7f16\u89e3\u7801&#xff08;\u63d0\u53475\u500d&#xff09;<\/li>\n<li>GPU\u52a0\u901f&#xff08;NVIDIA CUDA&#xff09;&#xff1a;\u9002\u7528\u4e8e\u5927\u96c6\u7fa4<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h5>3. \u200b\u5c40\u90e8\u4fee\u590d\u4f18\u5316\u200b<\/h5>\n<ul>\n<li>\u200b\u539f\u7406\u200b&#xff1a;\u4ec5\u8bfb\u53d6\u90e8\u5206\u5757\u4fee\u590d&#xff08;\u9700\u914d\u7f6eLRC&#xff09;\n<p>graph TB<br \/>\n    A[\u6570\u636e\u5757] &#8211;&gt; B[\u5c40\u90e8\u6821\u9a8c\u7ec41]<br \/>\n    A &#8211;&gt; C[\u5c40\u90e8\u6821\u9a8c\u7ec42]<br \/>\n    B &#8211;&gt; D[\u5168\u5c40\u6821\u9a8c]<br \/>\n    C &#8211;&gt; D<\/p>\n<ul>\n<li>\u200b12&#043;4 LRC(3,2)\u200b\u200b&#xff1a;\u52063\u7ec4&#xff0c;\u6bcf\u7ec44\u6570\u636e\u5757&#043;1\u5c40\u90e8\u6821\u9a8c&#xff0c;2\u5168\u5c40\u6821\u9a8c<\/li>\n<li>\u200b\u4fee\u590d\u6d41\u91cf\u964d\u4f4e\u200b&#xff1a;\u5355\u8282\u70b9\u6545\u969c\u4ec5\u9700\u8bfb\u540c\u7ec44\u5757&#xff08;\u539f\u9700\u8bfb12\u5757&#xff09;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<hr \/>\n<h4>1.8.4\u3001\u914d\u7f6e\u9677\u9631\u4e0e\u89c4\u907f<\/h4>\n<h5>1. \u200b\u5c0f\u6587\u4ef6\u95ee\u9898\u200b<\/h5>\n<ul>\n<li>\u200b\u95ee\u9898\u200b&#xff1a;1MB\u6587\u4ef6\u572812&#043;4\u914d\u7f6e\u4e2d\u88ab\u62c6\u4e3a16\u00d764KB\u5757&#xff0c;\u5143\u6570\u636e\u5f00\u9500\u5927<\/li>\n<li>\u200b\u89e3\u51b3\u200b&#xff1a;\n<ul>\n<li>\u200b\u9608\u503c\u7b56\u7565\u200b&#xff1a;&lt;1MB\u6587\u4ef6\u7528\u4e09\u526f\u672c&#xff0c;&gt;1MB\u7528EC<\/li>\n<li>\u200b\u5408\u5e76\u5199\u5165\u200b&#xff1a;\u5c06\u5c0f\u6587\u4ef6\u6253\u5305\u4e3a\u5927\u5bf9\u8c61<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h5>2. \u200b\u91cd\u5efa\u98ce\u66b4\u200b<\/h5>\n<ul>\n<li>\u200b\u573a\u666f\u200b&#xff1a;\u591a\u8282\u70b9\u6545\u969c\u89e6\u53d1\u5e76\u53d1\u6062\u590d&#xff0c;\u7f51\u7edc\u62e5\u585e<\/li>\n<li>\u200b\u89c4\u907f\u200b&#xff1a;\n<p># Ceph\u9650\u6d41\u914d\u7f6e<br \/>\nosd_recovery_max_active &#061; 3      # \u5355OSD\u6700\u5927\u6062\u590d\u4efb\u52a1<br \/>\nosd_recovery_op_priority &#061; 1    # \u6062\u590d\u4f18\u5148\u7ea7&#xff08;\u4f4e\u4e8e\u4e1a\u52a1IO&#xff09;\n<\/li>\n<\/ul>\n<h5>3. \u200b\u673a\u67b6\u5bb9\u9519\u4e0d\u8db3\u200b<\/h5>\n<ul>\n<li>\u200b\u9519\u8bef\u914d\u7f6e\u200b&#xff1a;12&#043;4\u4f46\u6240\u6709\u8282\u70b9\u5728\u540c\u4e00\u673a\u67b6<\/li>\n<li>\u200b\u6700\u4f73\u5b9e\u8df5\u200b&#xff1a;\n<p># MinIO EC\u5206\u5e03\u7b56\u7565<br \/>\nec:<br \/>\n  distribution: &#034;4:8:12&#034;        # \u8de84\u673a\u67b6\/8\u53ef\u7528\u533a\/12\u8282\u70b9\n<\/li>\n<\/ul>\n<hr \/>\n<h4>1.8.5\u3001\u914d\u7f6e\u51b3\u7b56\u6811<\/h4>\n<p>graph TD<br \/>\n    A{\u6570\u636e\u7c7b\u578b} &#8211;&gt;|\u70ed\u6570\u636e| B[\u4f4e\u5197\u4f59&#043;\u9ad8\u901f\u5b58\u50a8]<br \/>\n    A &#8211;&gt;|\u6e29\u6570\u636e| C[\u5e73\u8861\u914d\u7f6e]<br \/>\n    A &#8211;&gt;|\u51b7\u6570\u636e| D[\u9ad8\u5197\u4f59&#043;HDD]<br \/>\n    B &#8211;&gt; E[EC 6&#043;2 &#043; NVMe]<br \/>\n    C &#8211;&gt; F[EC 8&#043;3 &#043; SSD]<br \/>\n    D &#8211;&gt; G[EC 12&#043;4 &#043; HDD]<br \/>\n    E &#8211;&gt; H{\u89c4\u6a21}<br \/>\n    F &#8211;&gt; H<br \/>\n    G &#8211;&gt; H<br \/>\n    H &#8211;&gt;|\u2264100\u8282\u70b9| I[EC 8&#043;3]<br \/>\n    H &#8211;&gt;|&gt;100\u8282\u70b9| J[EC 12&#043;4 &#043; LRC]<\/p>\n<hr \/>\n<h4>1.8.6\u3001\u6700\u4f73\u5b9e\u8df5\u603b\u7ed3<\/h4>\n<li>\n<p>\u200b\u914d\u7f6e\u63a8\u8350\u200b&#xff1a;<\/p>\n<ul>\n<li>\u200b\u901a\u7528\u573a\u666f\u200b&#xff1a;EC 8&#043;3&#xff08;\u6548\u738772.7%&#xff0c;\u6062\u590d\u901f\u5ea6\u9002\u4e2d&#xff09;<\/li>\n<li>\u200b\u8d85\u5927\u89c4\u6a21\u200b&#xff1a;EC 12&#043;4 &#043; LRC&#xff08;\u6548\u738775%&#xff0c;\u4fee\u590d\u6d41\u91cf\u964d60%&#xff09;<\/li>\n<li>\u200b\u9ad8\u6027\u80fd\u9700\u6c42\u200b&#xff1a;EC 6&#043;2 &#043; SSD&#xff08;\u6548\u738775%&#xff0c;\u6062\u590d\u6700\u5feb&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u200b\u786c\u4ef6\u9009\u578b\u200b&#xff1a;<\/p>\n<ul>\n<li>\u200bCPU\u200b&#xff1a;\u22652\u6838\/TB&#xff08;EC\u7f16\u89e3\u7801\u9700\u6c42&#xff09;<\/li>\n<li>\u200b\u7f51\u7edc\u200b&#xff1a;25GbE&#043;&#xff08;\u907f\u514d\u6062\u590d\u74f6\u9888&#xff09;<\/li>\n<li>\u200b\u5b58\u50a8\u200b&#xff1a;EC 12&#043;4\u914dHDD\u9700SSD\u5143\u6570\u636e\u76d8<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u200b\u6062\u590dSLA\u4fdd\u969c\u200b&#xff1a;<\/p>\n<ul>\n<li>\u200b\u76d1\u63a7\u6307\u6807\u200b&#xff1a;\u6062\u590d\u901f\u7387&#xff08;MB\/s&#xff09;\u3001\u5269\u4f59\u6062\u590d\u65f6\u95f4<\/li>\n<li>\u200b\u544a\u8b66\u9608\u503c\u200b&#xff1a;\u6062\u590d\u901f\u7387&lt;100MB\/s\u6301\u7eed10\u5206\u949f<\/li>\n<li>\u200b\u81ea\u6108\u673a\u5236\u200b&#xff1a;\u81ea\u52a8\u8fc1\u79fb\u8d1f\u8f7d\u5230\u5065\u5eb7\u8282\u70b9<\/li>\n<\/ul>\n<\/li>\n<p>\u200b\u5b9e\u6d4b\u6570\u636e\u200b&#xff1a;\u5728Ceph\u96c6\u7fa4\u4e2d&#xff0c;EC 12&#043;4\u76f8\u6bd4\u4e09\u526f\u672c\u8282\u7701\u5b58\u50a8\u6210\u672c58%&#xff0c;\u5e73\u5747\u6062\u590d\u65f6\u95f4\u4ece2\u5c0f\u65f6\u964d\u81f325\u5206\u949f&#xff08;1TB\u6570\u636e&#xff09;\u3002\u5efa\u8bae\u901a\u8fc7rados bench\u6d4b\u8bd5\u4e0d\u540c\u914d\u7f6e\u7684\u6062\u590d\u6027\u80fd&#xff0c;\u7ed3\u5408\u4e1a\u52a1\u9700\u6c42\u9009\u62e9\u6700\u4f18\u65b9\u6848\u3002<\/p>\n<h3>1.9 ZFS cow\u673a\u5236<\/h3>\n<p>ZFS\u7684\u5199\u65f6\u590d\u5236&#xff08;Copy-on-Write, CoW&#xff09;\u673a\u5236\u901a\u8fc7\u200b\u200b\u907f\u514d\u539f\u5730\u8986\u76d6\u6570\u636e\u200b\u200b\u3001\u200b\u200b\u4e8b\u52a1\u539f\u5b50\u63d0\u4ea4\u200b\u200b\u548c\u200b\u200b\u5168\u5c40\u4e00\u81f4\u6027\u6821\u9a8c\u200b\u200b\u5b9e\u73b0\u6570\u636e\u4e00\u81f4\u6027\u3002\u4ee5\u4e0b\u7ed3\u5408\u6280\u672f\u539f\u7406\u4e0e\u5b9e\u4f8b\u8be6\u7ec6\u8bf4\u660e&#xff1a;<\/p>\n<hr \/>\n<h4>1.9.1\u3001CoW\u673a\u5236\u7684\u6838\u5fc3\u539f\u7406\u200b\u200b<\/h4>\n<h5>\u200b\u200b1. \u6570\u636e\u4fee\u6539\u6d41\u7a0b\u200b\u200b<\/h5>\n<p>\u5f53\u4fee\u6539\u6587\u4ef6\u6570\u636e\u65f6&#xff0c;ZFS\u7684CoW\u673a\u5236\u6309\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c&#xff1a;<\/p>\n<li>\u200b\u200b\u5206\u914d\u65b0\u5757\u200b\u200b&#xff1a;\u4e3a\u4fee\u6539\u540e\u7684\u6570\u636e\u5206\u914d\u65b0\u7684\u78c1\u76d8\u7a7a\u95f4&#xff0c;\u5199\u5165\u65b0\u6570\u636e\u5757\u3002<\/li>\n<li>\u200b\u200b\u66f4\u65b0\u5143\u6570\u636e\u200b\u200b&#xff1a;\u751f\u6210\u6307\u5411\u65b0\u6570\u636e\u5757\u7684\u5143\u6570\u636e&#xff08;\u5982inode\u3001\u95f4\u63a5\u5757&#xff09;&#xff0c;\u800c\u975e\u76f4\u63a5\u8986\u76d6\u65e7\u5143\u6570\u636e\u3002<\/li>\n<li>\u200b\u200b\u539f\u5b50\u5207\u6362\u200b\u200b&#xff1a;\u901a\u8fc7\u539f\u5b50\u64cd\u4f5c\u66f4\u65b0\u6839\u6307\u9488&#xff08;Uberblock&#xff09;&#xff0c;\u6307\u5411\u65b0\u751f\u6210\u7684\u5143\u6570\u636e\u6811\u3002<\/li>\n<li>\u200b\u200b\u91ca\u653e\u65e7\u5757\u200b\u200b&#xff1a;\u65e7\u6570\u636e\u5757\u4ec5\u5728\u65e0\u5feb\u7167\u5f15\u7528\u65f6\u88ab\u91ca\u653e&#xff08;\u5f15\u7528\u8ba1\u6570\u964d\u4e3a0&#xff09;\u3002<\/li>\n<h5>\u200b\u200b2. \u5173\u952e\u6280\u672f\u652f\u6301\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u200bMerkle\u6811\u6821\u9a8c\u200b\u200b&#xff1a;<br \/>\n\u6240\u6709\u6570\u636e\u5757\u548c\u5143\u6570\u636e\u5757\u5747\u8ba1\u7b97256\u4f4d\u6821\u9a8c\u548c&#xff08;\u5982SHA-256&#xff09;&#xff0c;\u5b58\u50a8\u4e8e\u7236\u8282\u70b9\u3002\u8bfb\u53d6\u65f6\u9010\u5c42\u6821\u9a8c&#xff0c;\u82e5\u6821\u9a8c\u5931\u8d25\u5219\u89e6\u53d1\u81ea\u52a8\u4fee\u590d&#xff08;\u9700\u5197\u4f59\u914d\u7f6e&#xff09;\u3002<\/li>\n<li>\u200b\u200b\u4e8b\u52a1\u7ec4&#xff08;TXG&#xff09;\u200b\u200b&#xff1a;<br \/>\n\u5199\u5165\u64cd\u4f5c\u63095-30\u79d2\u5206\u7ec4\u4e3a\u4e8b\u52a1\u7ec4&#xff08;TXG&#xff09;&#xff0c;\u7ec4\u5185\u64cd\u4f5c\u8981\u4e48\u200b\u200b\u5168\u90e8\u63d0\u4ea4\u200b\u200b&#xff0c;\u8981\u4e48\u200b\u200b\u5168\u90e8\u56de\u6eda\u200b\u200b\u3002\u63d0\u4ea4\u65f6\u539f\u5b50\u66f4\u65b0Uberblock&#xff0c;\u786e\u4fdd\u5143\u6570\u636e\u4e00\u81f4\u6027\u3002<\/li>\n<\/ul>\n<hr \/>\n<h4>1.9.2\u3001\u6570\u636e\u4e00\u81f4\u6027\u5b9e\u73b0\u673a\u5236\u200b\u200b<\/h4>\n<h5>\u200b\u200b1. \u5d29\u6e83\u6062\u590d\u573a\u666f\u200b\u200b<\/h5>\n<p>\u200b\u200b\u4e3e\u4f8b\u200b\u200b&#xff1a;\u4fee\u6539\u6587\u4ef6\/data\/file.txt\u65f6\u7cfb\u7edf\u65ad\u7535\u3002<\/p>\n<ul>\n<li>\u200b\u200b\u4f20\u7edf\u6587\u4ef6\u7cfb\u7edf\u200b\u200b&#xff1a;\u53ef\u80fd\u56e0\u90e8\u5206\u8986\u76d6\u5bfc\u81f4\u6587\u4ef6\u635f\u574f&#xff08;\u5982\u5143\u6570\u636e\u66f4\u65b0\u800c\u6570\u636e\u672a\u66f4\u65b0&#xff09;\u3002<\/li>\n<li>\u200b\u200bZFS\u7684CoW\u6d41\u7a0b\u200b\u200b&#xff1a;<br \/>\n\u2460 \u65b0\u6570\u636e\u5757\u5df2\u5199\u5165&#xff0c;\u4f46\u65e7\u5143\u6570\u636e\u672a\u91ca\u653e&#xff1b;<br \/>\n\u2461 Uberblock\u5c1a\u672a\u66f4\u65b0&#xff0c;\u4ecd\u6307\u5411\u65e7\u6570\u636e&#xff1b;<br \/>\n\u2462 \u7cfb\u7edf\u91cd\u542f\u540e&#xff0c;\u4e22\u5f03\u672a\u63d0\u4ea4\u7684TXG&#xff0c;\u56de\u6eda\u5230\u4e0a\u4e00\u4e00\u81f4\u72b6\u6001\u3002<\/li>\n<\/ul>\n<h5>\u200b\u200b2. \u5feb\u7167\u4e0e\u6570\u636e\u4fdd\u62a4\u200b\u200b<\/h5>\n<p>\u200b\u200b\u4e3e\u4f8b\u200b\u200b&#xff1a;\u521b\u5efa\u5feb\u7167\u540e\u4fee\u6539\u6587\u4ef6\u3002<\/p>\n<ul>\n<li>\u200b\u200b\u6d41\u7a0b\u200b\u200b&#xff1a;\n<p>graph LR<br \/>\n  A[\u539f\u6587\u4ef6\u6570\u636e\u5757A] &#8211;&gt; B[\u5feb\u7167\u5f15\u7528\u5757A]<br \/>\n  A &#8211;\u4fee\u6539&#8211;&gt; C[\u65b0\u5206\u914d\u5757A&#039;]<br \/>\n  D[\u5f53\u524d\u6587\u4ef6\u7cfb\u7edf] &#8211;&gt; C\n<\/li>\n<li>\u200b\u200b\u7ed3\u679c\u200b\u200b&#xff1a;<br \/>\n\u5feb\u7167\u4fdd\u7559\u65e7\u6570\u636e\u5757A&#xff0c;\u5f53\u524d\u6587\u4ef6\u7cfb\u7edf\u6307\u5411\u65b0\u5757A&#039;&#xff0c;\u4e24\u8005\u72ec\u7acb\u5171\u5b58\u3002\u5373\u4f7f\u4fee\u6539\u8fc7\u7a0b\u4e2d\u65ad&#xff0c;\u5feb\u7167\u6570\u636e\u4ecd\u5b8c\u6574\u3002<\/li>\n<\/ul>\n<h5>\u200b\u200b3. \u5197\u4f59\u4e0e\u81ea\u52a8\u4fee\u590d\u200b\u200b<\/h5>\n<p>\u82e5\u5b58\u50a8\u6c60\u914d\u7f6eRAID-Z&#xff1a;<\/p>\n<ul>\n<li>\u6570\u636e\u5757\u635f\u574f\u65f6&#xff0c;ZFS\u901a\u8fc7\u6821\u9a8c\u548c\u5b9a\u4f4d\u9519\u8bef&#xff0c;\u5229\u7528\u5947\u5076\u6821\u9a8c\u6570\u636e\u91cd\u5efa\u6b63\u786e\u5757\u3002<\/li>\n<li>\u200b\u200b\u4f8b\u5982\u200b\u200b&#xff1a;RAID-Z2\u4e2d\u4e24\u5757\u76d8\u6545\u969c&#xff0c;\u4ecd\u53ef\u4ece\u5176\u4f59\u76d8&#043;\u6821\u9a8c\u5757\u6062\u590d\u6570\u636e\u3002<\/li>\n<\/ul>\n<hr \/>\n<h4>1.9.3\u3001CoW\u7684\u5b8c\u6574\u64cd\u4f5c\u793a\u4f8b\u200b\u200b<\/h4>\n<p>\u200b\u200b\u573a\u666f\u200b\u200b&#xff1a;\u5c06\u6587\u4ef6report.docx\u4ece\u5185\u5bb9&#034;V1&#034;\u4fee\u6539\u4e3a&#034;V2&#034;\u3002<br \/>\n\u200b\u200b\u6b65\u9aa4\u200b\u200b&#xff1a;<\/p>\n<table>\n<tr>\u200b\u200b\u9636\u6bb5\u200b\u200b\u200b\u200b\u64cd\u4f5c\u7ec6\u8282\u200b\u200b\u200b\u200b\u6570\u636e\u72b6\u6001\u200b\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u200b\u200b\u521d\u59cb\u72b6\u6001\u200b\u200b<\/td>\n<td>\u6587\u4ef6\u5360\u7528\u6570\u636e\u5757Blk#100&#xff0c;\u5185\u5bb9&#034;V1&#034;&#xff1b;Merkle\u6811\u6839\u54c8\u5e0cH1\u3002<\/td>\n<td>Uberblock\u6307\u5411H1\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u4fee\u6539\u89e6\u53d1\u200b\u200b<\/td>\n<td>\u5199\u5165&#034;V2&#034;\u65f6&#xff0c;\u5206\u914d\u65b0\u5757Blk#200&#xff0c;\u5199\u5165\u65b0\u6570\u636e\u3002<\/td>\n<td>\u65e7\u5757Blk#100\u4fdd\u7559&#xff0c;\u65b0\u5757Blk#200\u5f85\u63d0\u4ea4\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u6784\u5efa\u65b0\u6811\u200b\u200b<\/td>\n<td>\u66f4\u65b0Merkle\u6811&#xff1a;\u751f\u6210Blk#200\u7684\u54c8\u5e0c\u2192\u66f4\u65b0\u7236\u8282\u70b9\u2192\u751f\u6210\u65b0\u6839\u54c8\u5e0cH2\u3002<\/td>\n<td>\u65b0\u65e7\u6811\u5e76\u5b58&#xff0c;Uberblock\u4ecd\u6307\u5411H1\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u539f\u5b50\u63d0\u4ea4\u200b\u200b<\/td>\n<td>TXG\u63d0\u4ea4&#xff1a;Uberblock\u539f\u5b50\u66f4\u65b0\u4e3aH2&#xff0c;\u6587\u4ef6\u5143\u6570\u636e\u6307\u5411Blk#200\u3002<\/td>\n<td>\u6587\u4ef6\u751f\u6548&#034;V2&#034;&#xff0c;\u65e7\u5757Blk#100\u88ab\u5feb\u7167\u5f15\u7528\u6216\u5f85\u91ca\u653e\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u56de\u6536\u65e7\u5757\u200b\u200b<\/td>\n<td>\u82e5\u65e0\u5feb\u7167\u5f15\u7528&#xff0c;Blk#100\u52a0\u5165\u7a7a\u95f2\u5217\u8868\u3002<\/td>\n<td>\u7a7a\u95f4\u91ca\u653e&#xff0c;\u907f\u514d\u788e\u7247\u79ef\u7d2f\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&#x1f4a1; \u200b\u200b\u5173\u952e\u70b9\u200b\u200b&#xff1a;\u5728\u200b\u200b\u6b65\u9aa44\u5b8c\u6210\u524d\u200b\u200b&#xff0c;\u82e5\u7cfb\u7edf\u5d29\u6e83&#xff0c;\u91cd\u542f\u540eUberblock\u4ecd\u6307\u5411H1&#xff0c;\u6570\u636e\u4fdd\u6301&#034;V1&#034;\u72b6\u6001&#xff0c;\u4fee\u6539\u65e0\u6548\u4f46\u65e0\u635f\u574f\u3002<\/p>\n<hr \/>\n<h4>1.9.4\u3001CoW\u7684\u4f18\u7f3a\u70b9\u4e0e\u5e94\u5bf9\u200b\u200b<\/h4>\n<table>\n<tr>\u200b\u200b\u4f18\u52bf\u200b\u200b\u200b\u200b\u6311\u6218\u200b\u200b\u200b\u200b\u4f18\u5316\u63aa\u65bd\u200b\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u200b\u200b\u5d29\u6e83\u65e0\u5fe7\u200b\u200b&#xff1a;\u65e0\u539f\u5730\u8986\u76d6&#xff0c;\u65ad\u7535\u65e0\u90e8\u5206\u5199\u5165\u3002<\/td>\n<td>\u200b\u200b\u788e\u7247\u95ee\u9898\u200b\u200b&#xff1a;\u9891\u7e41\u4fee\u6539\u5bfc\u81f4\u7269\u7406\u5b58\u50a8\u5206\u6563\u3002<\/td>\n<td>\u542f\u7528autotrim\u5b9a\u671f\u6574\u7406&#xff1b;\u5927\u5757\u5199\u5165&#xff08;\u5982recordsize&#061;1M&#xff09;\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u5feb\u7167\u96f6\u5f00\u9500\u200b\u200b&#xff1a;\u4ec5\u9700\u8bb0\u5f55\u6307\u9488&#xff0c;\u79d2\u7ea7\u5b8c\u6210\u3002<\/td>\n<td>\u200b\u200b\u5199\u653e\u5927\u200b\u200b&#xff1a;\u4fee\u6539\u5c0f\u6570\u636e\u9700\u590d\u5236\u6574\u4e2a\u5757\u3002<\/td>\n<td>\u5c0f\u6587\u4ef6\u573a\u666f\u8c03\u5c0frecordsize&#xff08;\u598264KB&#xff09;\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u200b\u9759\u9ed8\u635f\u574f\u9632\u62a4\u200b\u200b&#xff1a;\u6821\u9a8c\u548c\u81ea\u52a8\u68c0\u6d4b\/\u4fee\u590d\u3002<\/td>\n<td>\u200b\u200b\u5185\u5b58\u4f9d\u8d56\u200b\u200b&#xff1a;ARC\u7f13\u5b58\u672a\u5237\u76d8\u65f6\u5b95\u673a\u53ef\u80fd\u4e22\u6570\u636e\u3002<\/td>\n<td>\u5173\u952e\u4e1a\u52a1\u542f\u7528sync&#061;always&#043;\u72ec\u7acbZIL&#xff08;SSD\u52a0\u901f&#xff09;\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>\u603b\u7ed3\u200b\u200b<\/h4>\n<p>ZFS\u7684CoW\u901a\u8fc7\u200b\u200b\u5199\u524d\u590d\u5236\u200b\u200b &#043; \u200b\u200b\u4e8b\u52a1\u539f\u5b50\u63d0\u4ea4\u200b\u200b &#043; \u200b\u200b\u5168\u5c40\u6821\u9a8c\u6811\u200b\u200b\u4e09\u91cd\u673a\u5236\u4fdd\u969c\u6570\u636e\u4e00\u81f4\u6027&#xff1a;<\/p>\n<li>\u200b\u200b\u6570\u636e\u66f4\u65b0\u5b89\u5168\u200b\u200b&#xff1a;\u907f\u514d\u8986\u76d6&#xff0c;\u5d29\u6e83\u540e\u56de\u6eda\u81f3\u6700\u540e\u4e00\u81f4\u72b6\u6001&#xff1b;<\/li>\n<li>\u200b\u200b\u5feb\u7167\u96f6\u6210\u672c\u200b\u200b&#xff1a;\u4f9d\u8d56\u6307\u9488\u5171\u4eab&#xff0c;\u5386\u53f2\u6570\u636e\u5b8c\u6574\u4fdd\u7559&#xff1b;<\/li>\n<li>\u200b\u200b\u81ea\u6108\u80fd\u529b\u200b\u200b&#xff1a;\u57fa\u4e8eMerkle\u6811\u548c\u5197\u4f59\u914d\u7f6e&#xff0c;\u81ea\u52a8\u4fee\u590d\u635f\u574f\u5757\u3002<\/li>\n<p>\u200b\u200b\u5e94\u7528\u5efa\u8bae\u200b\u200b&#xff1a;\u5728\u6570\u636e\u5e93\u3001\u865a\u62df\u673a\u5b58\u50a8\u7b49\u5f3a\u4e00\u81f4\u6027\u573a\u666f\u4e2d&#xff0c;ZFS CoW\u662f\u7406\u60f3\u9009\u62e9&#xff0c;\u4f46\u9700\u914d\u5408\u5197\u4f59\u6c60&#xff08;\u5982RAID-Z2&#xff09;\u548c\u72ec\u7acbZIL\u8bbe\u5907\u4ee5\u89c4\u907f\u6027\u80fd\u74f6\u9888\u3002<\/p>\n<h3>1.10 ZFS\u590d\u5236<\/h3>\n<p>ZFS\u7684\u5199\u65f6\u590d\u5236&#xff08;Copy-on-Write, CoW&#xff09;\u673a\u5236\u5728\u4fdd\u969c\u6570\u636e\u4e00\u81f4\u6027\u548c\u5feb\u7167\u529f\u80fd\u7684\u540c\u65f6&#xff0c;\u5728\u200b\u200b\u9891\u7e41\u5c0f\u6587\u4ef6\u5199\u5165\u573a\u666f\u4e0b\u53ef\u80fd\u5f15\u53d1\u663e\u8457\u7684\u6027\u80fd\u95ee\u9898\u200b\u200b\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u95ee\u9898\u5206\u6790\u53ca\u4f18\u5316\u7b56\u7565&#xff1a;<\/p>\n<hr \/>\n<h4 style=\"background-color:transparent\">1.10.1\u3001\u9891\u7e41\u5c0f\u6587\u4ef6\u5199\u5165\u7684\u6027\u80fd\u95ee\u9898\u200b\u200b<\/h4>\n<h5>\u200b\u200b1. \u5199\u653e\u5927&#xff08;Write Amplification&#xff09;\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u200b\u95ee\u9898\u672c\u8d28\u200b\u200b&#xff1a;<br \/>\nCoW\u673a\u5236\u4e0b&#xff0c;\u4fee\u6539\u5c0f\u6587\u4ef6\u65f6\u9700\u590d\u5236\u6574\u4e2a\u6570\u636e\u5757&#xff08;\u9ed8\u8ba4128KB&#xff09;&#xff0c;\u5373\u4f7f\u5b9e\u9645\u4fee\u6539\u91cf\u5f88\u5c0f&#xff08;\u59821KB&#xff09;\u3002\u4f8b\u5982&#xff1a;<\/p>\n<p>graph LR<br \/>\n  A[\u4fee\u65391KB\u6587\u4ef6] &#8211;&gt; B[\u590d\u5236\u6574\u4e2a128KB\u5757]<br \/>\n  B &#8211;&gt; C[\u5199\u5165\u65b0\u5757&#043;\u66f4\u65b0\u5143\u6570\u636e]<br \/>\n  C &#8211;&gt; D[\u91ca\u653e\u65e7\u5757]\n<\/li>\n<li>\u200b\u200b\u5f71\u54cd\u200b\u200b&#xff1a;<br \/>\nI\/O\u91cf\u653e\u5927100\u500d\u4ee5\u4e0a&#xff0c;\u52a0\u5267\u78c1\u76d8\u538b\u529b&#xff0c;\u964d\u4f4e\u541e\u5410\u91cf\u3002<\/li>\n<\/ul>\n<h5>\u200b\u200b2. \u5143\u6570\u636e\u66f4\u65b0\u5f00\u9500\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u200bMerkle\u6811\u7ef4\u62a4\u200b\u200b&#xff1a;<br \/>\n\u6bcf\u6b21\u5199\u5165\u9700\u66f4\u65b0\u6570\u636e\u5757\u7684\u6821\u9a8c\u548c&#xff0c;\u5e76\u9010\u7ea7\u66f4\u65b0\u7236\u8282\u70b9\u54c8\u5e0c\u503c\u81f3\u6839\u8282\u70b9&#xff08;Uberblock&#xff09;\u3002\u5c0f\u6587\u4ef6\u5199\u5165\u9891\u7e41\u65f6&#xff0c;\u5143\u6570\u636e\u66f4\u65b0\u5360I\/O\u768450%\u4ee5\u4e0a\u3002<\/li>\n<li>\u200b\u200b\u4e8b\u52a1\u7ec4&#xff08;TXG&#xff09;\u63d0\u4ea4\u200b\u200b&#xff1a;<br \/>\n\u9ed8\u8ba4\u6bcf5\u79d2\u63d0\u4ea4TXG&#xff0c;\u9891\u7e41\u5199\u5165\u5bfc\u81f4TXG\u961f\u5217\u79ef\u538b&#xff0c;\u5ef6\u8fdf\u589e\u52a0\u3002<\/li>\n<\/ul>\n<h5>\u200b\u200b3. \u78c1\u76d8\u788e\u7247\u5316\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u200bCoW\u7684\u526f\u4f5c\u7528\u200b\u200b&#xff1a;<br \/>\n\u65b0\u6570\u636e\u5199\u5165\u65b0\u4f4d\u7f6e&#xff0c;\u65e7\u5757\u91ca\u653e\u540e\u5f62\u6210\u7a7a\u6d1e\u3002\u5c0f\u6587\u4ef6\u968f\u673a\u4fee\u6539\u5bfc\u81f4\u6587\u4ef6\u6570\u636e\u5206\u6563&#xff0c;\u8bfb\u53d6\u65f6\u5bfb\u9053\u65f6\u95f4\u589e\u52a0\u3002<\/li>\n<\/ul>\n<h5>\u200b\u200b4. \u540c\u6b65\u5199\u6027\u80fd\u74f6\u9888\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u200bZIL&#xff08;ZFS Intent Log&#xff09;\u9650\u5236\u200b\u200b&#xff1a;<br \/>\n\u540c\u6b65\u5199&#xff08;\u5982\u6570\u636e\u5e93\u4e8b\u52a1\u65e5\u5fd7&#xff09;\u9700\u5148\u5199\u5165ZIL\u3002\u5c0f\u6587\u4ef6\u540c\u6b65\u5199\u9891\u7e41\u65f6&#xff0c;ZIL\u6210\u4e3a\u5355\u70b9\u74f6\u9888&#xff0c;\u5ef6\u8fdf\u98d9\u5347\u3002<\/li>\n<\/ul>\n<hr \/>\n<h4 style=\"background-color:transparent\">1.10.2\u3001\u4f18\u5316\u7b56\u7565\u200b\u200b<\/h4>\n<h5>\u200b\u200b1. \u8c03\u6574ZFS\u53c2\u6570\u9002\u914d\u5c0f\u6587\u4ef6\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u200b\u7f29\u5c0frecordsize\u200b\u200b&#xff1a;<br \/>\n\u5c06\u9ed8\u8ba4128KB\u5757\u5927\u5c0f\u8c03\u6574\u4e3a16-32KB&#xff0c;\u5339\u914d\u5c0f\u6587\u4ef6\u5c3a\u5bf8&#xff1a;<\/p>\n<p>zfs set recordsize&#061;16K pool\/dataset  # \u51cf\u5c11\u5199\u653e\u5927\n<\/li>\n<li>\u200b\u200b\u7981\u7528\u975e\u5fc5\u8981\u7279\u6027\u200b\u200b&#xff1a;\n<ul>\n<li>\u5173\u95edatime\u907f\u514d\u8bbf\u95ee\u65f6\u95f4\u66f4\u65b0\u5f00\u9500&#xff1a;\n<p>zfs set atime&#061;off pool\/dataset\n<\/li>\n<li>\u5173\u95edsync&#xff08;\u4ec5\u9002\u7528\u4e8e\u53ef\u5bb9\u5fcd\u6570\u636e\u4e22\u5931\u7684\u573a\u666f&#xff09;&#xff1a;\n<p>zfs set sync&#061;disabled pool\/dataset\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h5>\u200b\u200b2. \u4f18\u5316ZIL\u914d\u7f6e\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u200b\u4e13\u7528\u9ad8\u901fZIL\u8bbe\u5907\u200b\u200b&#xff1a;<br \/>\n\u4f7f\u7528\u4f4e\u5ef6\u8fdfNVMe SSD\u4f5c\u4e3a\u4e13\u7528\u65e5\u5fd7\u8bbe\u5907&#xff08;SLOG&#xff09;&#xff1a;<\/p>\n<p>zpool add pool log nvme0n1  # \u52a0\u901f\u540c\u6b65\u5199\n<\/li>\n<li>\u200b\u200b\u5408\u5e76ZIL\u63d0\u4ea4\u200b\u200b&#xff1a;<br \/>\n\u542f\u7528\u540c\u6b65\u5199\u8bf7\u6c42\u5408\u5e76&#xff08;\u9700\u5185\u6838\u652f\u6301&#xff09;&#xff0c;\u51cf\u5c11\u65e5\u5fd7\u63d0\u4ea4\u6b21\u6570&#xff1a;<\/p>\n<p>echo &#034;zfs_zil_clean_taskq_minalloc&#061;1024&#034; &gt;&gt; \/etc\/modprobe.d\/zfs.conf\n<\/li>\n<\/ul>\n<h5>\u200b\u200b3. \u63d0\u5347\u7f13\u5b58\u4e0e\u9884\u8bfb\u6548\u7387\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u200b\u6269\u5927ARC&#xff08;\u81ea\u9002\u5e94\u7f13\u5b58&#xff09;\u200b\u200b&#xff1a;<br \/>\n\u589e\u52a0\u5185\u5b58\u5bb9\u91cf&#xff0c;\u63d0\u5347\u5143\u6570\u636e\u7f13\u5b58\u547d\u4e2d\u7387&#xff1a;<\/p>\n<p>zfs set primarycache&#061;metadata pool\/dataset  # \u4ec5\u7f13\u5b58\u5143\u6570\u636e\n<\/li>\n<li>\u200b\u200b\u542f\u7528L2ARC&#xff08;\u4e8c\u7ea7\u7f13\u5b58&#xff09;\u200b\u200b&#xff1a;<br \/>\n\u7528SSD\u7f13\u5b58\u70ed\u70b9\u5c0f\u6587\u4ef6&#xff0c;\u51cf\u5c11\u78c1\u76d8I\/O&#xff1a;<\/p>\n<p>zpool add pool cache sdb  # sdb\u4e3aSSD\u8bbe\u5907\n<\/li>\n<\/ul>\n<h5>\u200b\u200b4. \u51cf\u5c11\u788e\u7247\u5316\u5f71\u54cd\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u200b\u5b9a\u671f\u6574\u7406\u7a7a\u95f4\u200b\u200b&#xff1a;<br \/>\n\u542f\u7528\u81ea\u52a8\u7a7a\u95f4\u6574\u7406\u4e0e\u9884\u5206\u914d&#xff1a;<\/p>\n<p>zfs set autotrim&#061;on pool\/dataset<br \/>\nzfs set special_small_blocks&#061;32K pool\/dataset  # \u9884\u5206\u914d\u5c0f\u6587\u4ef6\u5757\n<\/li>\n<li>\u200b\u200b\u4f7f\u7528slab\u5206\u914d\u5668\u200b\u200b&#xff1a;<br \/>\n\u901a\u8fc7slab\u673a\u5236\u96c6\u4e2d\u5206\u914d\u5c0f\u6587\u4ef6\u5757&#xff0c;\u51cf\u5c11\u788e\u7247&#xff1a;<\/p>\n<p>zfs set allocation_classes&#061;on pool\/dataset\n<\/li>\n<\/ul>\n<h5>\u200b\u200b5. \u5e94\u7528\u5c42\u5199\u5165\u4f18\u5316\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u200b\u5408\u5e76\u5c0f\u6587\u4ef6\u5199\u5165\u200b\u200b&#xff1a;<br \/>\n\u5e94\u7528\u5c42\u6279\u91cf\u5904\u7406\u5c0f\u6587\u4ef6&#xff08;\u5982\u6253\u5305\u4e3atar&#xff09;&#xff0c;\u51cf\u5c11I\/O\u6b21\u6570\u3002<\/li>\n<li>\u200b\u200b\u5f02\u6b65\u5199\u5165&#043;\u5b9a\u65f6\u5237\u76d8\u200b\u200b&#xff1a;<br \/>\n\u6539\u7528\u5f02\u6b65\u5199&#xff0c;\u5b9a\u65f6\u8c03\u7528fsync()\u63d0\u4ea4&#xff1a;<\/p>\n<p># Python\u793a\u4f8b&#xff1a;\u6279\u91cf\u5199\u5165\u540e\u540c\u6b65<br \/>\nwith open(&#034;file&#034;, &#034;wb&#034;) as f:<br \/>\n    f.write(data_batch)  # \u5f02\u6b65\u5199\u5165<br \/>\n    os.fsync(f.fileno())  # \u5b9a\u65f6\u63d0\u4ea4\n<\/li>\n<\/ul>\n<h5>\u200b\u200b6. \u907f\u514dSMR\u786c\u76d8\u200b\u200b<\/h5>\n<ul>\n<li>\u200b\u200b\u9009\u7528CMR\u786c\u76d8\u200b\u200b&#xff1a;<br \/>\nSMR&#xff08;\u53e0\u74e6\u5f0f&#xff09;\u786c\u76d8\u7684\u5199\u653e\u5927\u95ee\u9898\u4e0eCoW\u4e25\u91cd\u51b2\u7a81&#xff0c;\u4f18\u5148\u9009\u62e9CMR&#xff08;\u4f20\u7edf\u78c1\u8bb0\u5f55&#xff09;\u786c\u76d8\u3002<\/li>\n<\/ul>\n<hr \/>\n<h4 style=\"background-color:transparent\">1.10.3\u3001\u5173\u952e\u53c2\u6570\u8c03\u6574\u53c2\u8003\u8868\u200b\u200b<\/h4>\n<table>\n<tr>\u200b\u200b\u53c2\u6570\u200b\u200b\u200b\u200b\u63a8\u8350\u503c\u200b\u200b\u200b\u200b\u9002\u7528\u573a\u666f\u200b\u200b\u200b\u200b\u4f5c\u7528\u200b\u200b<\/tr>\n<tbody>\n<tr>\n<td>recordsize<\/td>\n<td>16K-32K<\/td>\n<td>\u5c0f\u6587\u4ef6&#xff08;&lt;64KB&#xff09;<\/td>\n<td>\u51cf\u5c11\u5199\u653e\u5927<\/td>\n<\/tr>\n<tr>\n<td>primarycache<\/td>\n<td>metadata<\/td>\n<td>\u5185\u5b58\u4e0d\u8db3\u573a\u666f<\/td>\n<td>\u4f18\u5148\u7f13\u5b58\u5143\u6570\u636e<\/td>\n<\/tr>\n<tr>\n<td>sync<\/td>\n<td>disabled<\/td>\n<td>\u4e34\u65f6\u6570\u636e\/\u53ef\u4e22\u6570\u636e<\/td>\n<td>\u907f\u514dZIL\u5f00\u9500<\/td>\n<\/tr>\n<tr>\n<td>logbias<\/td>\n<td>throughput<\/td>\n<td>\u540c\u6b65\u5199\u5bc6\u96c6\u578b<\/td>\n<td>\u4f18\u5316ZIL\u5199\u5165\u541e\u5410\u91cf<\/td>\n<\/tr>\n<tr>\n<td>special_small_blocks<\/td>\n<td>32K<\/td>\n<td>\u5927\u91cf&lt;32KB\u6587\u4ef6<\/td>\n<td>\u9884\u5206\u914d\u7a7a\u95f4\u51cf\u5c11\u788e\u7247<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>1.10.4\u3001\u6027\u80fd\u5bf9\u6bd4&#xff08;\u4f18\u5316\u524d\u540e&#xff09;\u200b\u200b<\/h4>\n<table>\n<tr>\u200b\u200b\u6307\u6807\u200b\u200b\u4f18\u5316\u524d&#xff08;\u9ed8\u8ba4\u914d\u7f6e&#xff09;\u4f18\u5316\u540e&#xff08;\u8c03\u53c2&#043;\u786c\u4ef6&#xff09;\u63d0\u5347\u5e45\u5ea6<\/tr>\n<tbody>\n<tr>\n<td>\u5c0f\u6587\u4ef6\u5199\u5165\u541e\u5410\u91cf<\/td>\n<td>50 MB\/s<\/td>\n<td>200 MB\/s<\/td>\n<td>300%<\/td>\n<\/tr>\n<tr>\n<td>\u540c\u6b65\u5199\u5ef6\u8fdf<\/td>\n<td>20 ms<\/td>\n<td>2 ms<\/td>\n<td>90%\u2193<\/td>\n<\/tr>\n<tr>\n<td>\u78c1\u76d8\u788e\u7247\u7387<\/td>\n<td>35%<\/td>\n<td>8%<\/td>\n<td>77%\u2193<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>\u00a0\u200b\u200b\u603b\u7ed3\u200b\u200b<\/h4>\n<p>ZFS\u7684CoW\u673a\u5236\u5728\u9891\u7e41\u5c0f\u6587\u4ef6\u5199\u5165\u573a\u666f\u4e0b\u7684\u6027\u80fd\u95ee\u9898\u6839\u6e90\u5728\u4e8e\u200b\u200b\u5199\u653e\u5927\u3001\u5143\u6570\u636e\u66f4\u65b0\u548c\u788e\u7247\u5316\u200b\u200b\u3002\u4f18\u5316\u9700\u7ed3\u5408&#xff1a;<\/p>\n<li>\u200b\u200b\u53c2\u6570\u8c03\u4f18\u200b\u200b&#xff1a;\u7f29\u5c0frecordsize\u3001\u5173\u95ed\u975e\u5fc5\u8981\u5c5e\u6027&#xff08;\u5982atime&#xff09;<\/li>\n<li>\u200b\u200b\u786c\u4ef6\u52a0\u901f\u200b\u200b&#xff1a;NVMe SSD\u4f5c\u4e3aSLOG\u548cL2ARC<\/li>\n<li>\u200b\u200b\u5199\u5165\u7b56\u7565\u200b\u200b&#xff1a;\u5e94\u7528\u5c42\u6279\u91cf\u5904\u7406&#043;\u5f02\u6b65\u63d0\u4ea4<\/li>\n<li>\u200b\u200b\u788e\u7247\u7ba1\u7406\u200b\u200b&#xff1a;\u9884\u5206\u914d&#043;\u5b9a\u671f\u6574\u7406<\/li>\n<p>\u26a0\ufe0f \u200b\u200b\u6ce8\u610f\u4e8b\u9879\u200b\u200b&#xff1a;<\/p>\n<ul>\n<li>\u8c03\u6574recordsize\u4ec5\u5bf9\u65b0\u5199\u5165\u6570\u636e\u751f\u6548&#xff0c;\u65e7\u6570\u636e\u9700\u91cd\u5199\u6216\u8fc1\u79fb\u3002<\/li>\n<li>SLOG\u8bbe\u5907\u9700\u65ad\u7535\u4fdd\u62a4&#xff08;\u5982\u8d85\u7ea7\u7535\u5bb9&#xff09;\u4ee5\u9632\u6570\u636e\u4e22\u5931\u3002<\/li>\n<\/ul>\n<p>\u901a\u8fc7\u4e0a\u8ff0\u7b56\u7565&#xff0c;\u53ef\u663e\u8457\u7f13\u89e3\u5c0f\u6587\u4ef6\u5199\u5165\u74f6\u9888&#xff0c;\u5728\u4fdd\u969c\u6570\u636e\u4e00\u81f4\u6027\u7684\u524d\u63d0\u4e0b\u63d0\u5347\u6027\u80fd2-5\u500d\u3002<\/p>\n<\/p>\n<h2 style=\"background-color:transparent\">\u4e8c\u3001\u5b9e\u6218\u6307\u5357<\/h2>\n<h3>2.1 S3 &#043; NFS \u67b6\u6784\u8bbe\u8ba1\u4e0e\u5b9e\u65bd<\/h3>\n<p>\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\u6df7\u5408\u4f7f\u7528 S3 \u5bf9\u8c61\u5b58\u50a8\u548c NFS \u6587\u4ef6\u5b58\u50a8&#xff0c;\u53ef\u4ee5\u5145\u5206\u53d1\u6325\u4e24\u8005\u7684\u4f18\u52bf&#xff0c;\u6784\u5efa\u9ad8\u6027\u80fd\u3001\u9ad8\u6027\u4ef7\u6bd4\u7684\u5b58\u50a8\u67b6\u6784\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u7684\u5b9e\u65bd\u7b56\u7565\u548c\u6700\u4f73\u5b9e\u8df5&#xff1a;<\/p>\n<hr \/>\n<h4>2.1.1\u3001\u6df7\u5408\u67b6\u6784\u6838\u5fc3\u8bbe\u8ba1\u539f\u5219<\/h4>\n<p>1. \u200b\u5206\u5c42\u5b58\u50a8\u7b56\u7565\u200b<\/p>\n<p>graph TD<br \/>\n    A[\u70ed\u6570\u636e\u5c42] &#8211;&gt;|NFS\/SAN| B[\u9ad8\u6027\u80fd\u5b58\u50a8]<br \/>\n    A &#8211;&gt;|\u5b9e\u65f6\u8bbf\u95ee| C[\u5e94\u7528\u670d\u52a1\u5668]<br \/>\n    D[\u6e29\u6570\u636e\u5c42] &#8211;&gt;|pNFS\/\u5e76\u884c\u8bbf\u95ee| E[\u5206\u5e03\u5f0f\u6587\u4ef6\u7cfb\u7edf]<br \/>\n    F[\u51b7\u6570\u636e\u5c42] &#8211;&gt;|S3 API| G[\u5bf9\u8c61\u5b58\u50a8]<br \/>\n    C &#8211;&gt;|\u6570\u636e\u751f\u547d\u5468\u671f\u7ba1\u7406| F<\/p>\n<p>2. \u200b\u534f\u8bae\u9009\u62e9\u77e9\u9635\u200b<\/p>\n<table>\n<tr>\n<p>\u200b\u6570\u636e\u7c7b\u578b\u200b<\/p>\n<p>\u200b\u8bbf\u95ee\u6a21\u5f0f\u200b<\/p>\n<p>\u200b\u63a8\u8350\u534f\u8bae\u200b<\/p>\n<p>\u200b\u6027\u80fd\u8981\u6c42\u200b<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>\u5b9e\u65f6\u4ea4\u6613\u6570\u636e<\/p>\n<\/td>\n<td>\n<p>\u9ad8\u9891\u968f\u673a\u8bfb\u5199<\/p>\n<\/td>\n<td>\n<p>NVMe-oF\/FC<\/p>\n<\/td>\n<td>\n<p>\u5fae\u79d2\u7ea7\u5ef6\u8fdf<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u5f00\u53d1\u4ee3\u7801\u5e93<\/p>\n<\/td>\n<td>\n<p>\u591a\u4eba\u534f\u4f5c\u7f16\u8f91<\/p>\n<\/td>\n<td>\n<p>NFSv4.2<\/p>\n<\/td>\n<td>\n<p>\u4e2d\u4f4e\u5ef6\u8fdf<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u5a92\u4f53\u8d44\u4ea7<\/p>\n<\/td>\n<td>\n<p>\u5927\u6587\u4ef6\u987a\u5e8f\u8bfb\u5199<\/p>\n<\/td>\n<td>\n<p>S3<\/p>\n<\/td>\n<td>\n<p>\u9ad8\u541e\u5410\u91cf<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u5907\u4efd\u5f52\u6863<\/p>\n<\/td>\n<td>\n<p>\u4f4e\u9891\u8bbf\u95ee&#xff0c;\u957f\u671f\u4fdd\u5b58<\/p>\n<\/td>\n<td>\n<p>S3 IA\/Glacier<\/p>\n<\/td>\n<td>\n<p>\u4f4e\u6210\u672c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>AI\u8bad\u7ec3\u6570\u636e\u96c6<\/p>\n<\/td>\n<td>\n<p>\u5e76\u884c\u8bfb\u53d6<\/p>\n<\/td>\n<td>\n<p>pNFS&#043;S3<\/p>\n<\/td>\n<td>\n<p>\u8d85\u9ad8\u5e26\u5bbd<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>2.1.2\u3001\u5178\u578b\u6df7\u5408\u67b6\u6784\u5b9e\u65bd\u6848\u4f8b<\/h4>\n<p>\u6848\u4f8b1&#xff1a;\u5a92\u4f53\u5904\u7406\u6d41\u6c34\u7ebf&#xff08;4K\u89c6\u9891\u7f16\u8f91&#xff09;<\/p>\n<p>graph LR<br \/>\n    A[\u7f16\u8f91\u5de5\u4f5c\u7ad9] &#8211;&gt;|10GbE SMB3| B[NAS\u7f13\u5b58\u5c42]<br \/>\n    B &#8211;&gt;|\u540e\u53f0\u540c\u6b65| C[S3\u5bf9\u8c61\u5b58\u50a8]<br \/>\n    C &#8211;&gt;|\u4e8b\u4ef6\u89e6\u53d1| D[\u8f6c\u7801\u96c6\u7fa4]<br \/>\n    D &#8211;&gt;|\u8bfb\u53d6\u6e90\u6587\u4ef6| C<br \/>\n    D &#8211;&gt;|\u5199\u5165\u7ed3\u679c| C<br \/>\n    D &#8211;&gt;|\u63a8\u9001\u6210\u54c1| E[CDN\u5206\u53d1]<\/p>\n<p>\u200b\u6280\u672f\u8981\u70b9\u200b&#xff1a;<\/p>\n<li>\n<p>\u7f16\u8f91\u5de5\u4f5c\u7ad9\u901a\u8fc7 SMB3 \u76f4\u63a5\u8bbf\u95ee\u9ad8\u6027\u80fd NAS<\/p>\n<\/li>\n<li>\n<p>NAS \u4f7f\u7528\u4e91\u540c\u6b65\u5de5\u5177&#xff08;\u5982 AWS Storage Gateway&#xff09;\u81ea\u52a8\u5907\u4efd\u5230 S3<\/p>\n<\/li>\n<li>\n<p>\u8f6c\u7801\u96c6\u7fa4\u901a\u8fc7 S3 API \u76f4\u63a5\u8bfb\u53d6\/\u5199\u5165\u5bf9\u8c61\u5b58\u50a8<\/p>\n<\/li>\n<li>\n<p>\u8bbe\u7f6e S3 \u4e8b\u4ef6\u901a\u77e5\u89e6\u53d1 Lambda \u8f6c\u7801\u51fd\u6570<\/p>\n<\/li>\n<hr \/>\n<p>\u6848\u4f8b2&#xff1a;AI \u8bad\u7ec3\u5e73\u53f0<\/p>\n<p>graph TB<br \/>\n    A[\u8bad\u7ec3\u8282\u70b91] &#8211;&gt;|pNFS| B[\u5e76\u884c\u6587\u4ef6\u7cfb\u7edf]<br \/>\n    A &#8211;&gt;|\u8bfb\u53d6\u6a21\u578b| C[S3\u5b58\u50a8]<br \/>\n    B &#8211;&gt;|\u7f13\u5b58\u70ed\u6570\u636e| D[\u672c\u5730NVMe]<br \/>\n    C &#8211;&gt;|\u52a0\u8f7d\u6570\u636e\u96c6| B<br \/>\n    E[\u8bad\u7ec3\u8282\u70b92] &#8211;&gt;|pNFS| B<br \/>\n    F[\u5bf9\u8c61\u5b58\u50a8] &#8211;&gt;|\u539f\u59cb\u6570\u636e| C<\/p>\n<p>\u200b\u6280\u672f\u8981\u70b9\u200b&#xff1a;<\/p>\n<li>\n<p>\u4f7f\u7528 pNFS \u5b9e\u73b0\u8bad\u7ec3\u8282\u70b9\u5bf9\u5206\u5e03\u5f0f\u6587\u4ef6\u7cfb\u7edf\u7684\u5e76\u884c\u8bbf\u95ee<\/p>\n<\/li>\n<li>\n<p>S3 \u4f5c\u4e3a\u539f\u59cb\u6570\u636e\u6e56&#xff0c;\u901a\u8fc7 S3FS \u6216\u4e13\u7528\u5ba2\u6237\u7aef\u6302\u8f7d\u5230\u6587\u4ef6\u7cfb\u7edf<\/p>\n<\/li>\n<li>\n<p>\u5229\u7528 Alluxio \u6216 TensorFlow S3 \u63d2\u4ef6\u52a0\u901f\u6570\u636e\u52a0\u8f7d<\/p>\n<\/li>\n<li>\n<p>\u8bad\u7ec3\u7ed3\u679c\u76f4\u63a5\u5199\u56de S3 \u957f\u671f\u4fdd\u5b58<\/p>\n<\/li>\n<hr \/>\n<h4>2.1.3\u3001\u6838\u5fc3\u96c6\u6210\u6280\u672f\u65b9\u6848<\/h4>\n<p>1. \u200b\u534f\u8bae\u7f51\u5173\u4e0e\u6865\u63a5\u200b<\/p>\n<table>\n<tr>\n<p>\u200b\u5de5\u5177\u200b<\/p>\n<p>\u200b\u529f\u80fd\u200b<\/p>\n<p>\u200b\u914d\u7f6e\u793a\u4f8b\u200b<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>\u200bAWS Storage Gateway\u200b<\/p>\n<\/td>\n<td>\n<p>NFS\/SMB \u5230 S3 \u7684\u900f\u660e\u6865\u63a5<\/p>\n<\/td>\n<td>\n<p>aws storage-gateway activate-gateway &#8211;gateway-name my-gateway<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200bMinIO Gateway\u200b<\/p>\n<\/td>\n<td>\n<p>\u63d0\u4f9b S3 \u517c\u5bb9\u63a5\u53e3\u8bbf\u95ee NFS \u540e\u7aef<\/p>\n<\/td>\n<td>\n<p>minio gateway nas \/nfs\/export<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200bs3fs-fuse\u200b<\/p>\n<\/td>\n<td>\n<p>\u5c06 S3 Bucket \u6302\u8f7d\u4e3a\u672c\u5730\u6587\u4ef6\u7cfb\u7edf<\/p>\n<\/td>\n<td>\n<p>s3fs my-bucket \/mnt\/s3 -o passwd_file&#061;\/etc\/passwd-s3fs<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200bCeph RGW\u200b<\/p>\n<\/td>\n<td>\n<p>\u7edf\u4e00\u63d0\u4f9b S3 \u548c\u6587\u4ef6\u534f\u8bae\u8bbf\u95ee<\/p>\n<\/td>\n<td>\n<p>ceph-deploy rgw create my-node<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>2. \u200b\u6570\u636e\u6d41\u52a8\u81ea\u52a8\u5316\u200b<\/p>\n<p># \u4f7f\u7528 AWS CLI \u540c\u6b65 NFS \u76ee\u5f55\u5230 S3<br \/>\naws s3 sync \/nfs\/shared\/media s3:\/\/my-media-bucket &#8211;delete<\/p>\n<p># \u4f7f\u7528 inotify \u5b9e\u65f6\u76d1\u63a7\u6587\u4ef6\u53d8\u5316<br \/>\ninotifywait -m \/nfs\/data -e create -e modify |<br \/>\nwhile read path action file; do<br \/>\n    aws s3 cp &#034;$path\/$file&#034; s3:\/\/backup-bucket\/data\/<br \/>\ndone<\/p>\n<p>3. Kubernetes \u6df7\u5408\u5b58\u50a8\u65b9\u6848<\/p>\n<p># PVC \u914d\u7f6e\u793a\u4f8b<br \/>\napiVersion: v1<br \/>\nkind: PersistentVolumeClaim<br \/>\nmetadata:<br \/>\n  name: mixed-storage-pvc<br \/>\nspec:<br \/>\n  storageClassName: hybrid-storage<br \/>\n  accessModes:<br \/>\n    &#8211; ReadWriteMany<br \/>\n  resources:<br \/>\n    requests:<br \/>\n      storage: 10Ti<\/p>\n<p>&#8212;<br \/>\n# StorageClass \u914d\u7f6e<br \/>\napiVersion: storage.k8s.io\/v1<br \/>\nkind: StorageClass<br \/>\nmetadata:<br \/>\n  name: hybrid-storage<br \/>\nprovisioner: csi.trident.netapp.io<br \/>\nparameters:<br \/>\n  backendType: &#034;ontap-nas&#034;<br \/>\n  nfsMountOptions: &#034;nfsvers&#061;4.1&#034;<br \/>\n  snapmirrorPolicy: &#034;async-s3&#034;  # \u81ea\u52a8\u590d\u5236\u5230S3<\/p>\n<hr \/>\n<h4>2.1.4\u3001\u6027\u80fd\u4f18\u5316\u7b56\u7565<\/h4>\n<p>1. \u200b\u7f13\u5b58\u52a0\u901f\u6280\u672f\u200b<\/p>\n<p>graph LR<br \/>\n    A[\u5e94\u7528] &#8211;&gt;|\u8bfb\u53d6| B[\u672c\u5730\u7f13\u5b58]<br \/>\n    B &#8211;&gt;|\u672a\u547d\u4e2d| C[\u5206\u5e03\u5f0f\u7f13\u5b58]<br \/>\n    C &#8211;&gt;|\u672a\u547d\u4e2d| D[S3\u5bf9\u8c61\u5b58\u50a8]<br \/>\n    style B fill:#f9f,stroke:#333<br \/>\n    style C fill:#bbf,stroke:#333<\/p>\n<p>\u200b\u5b9e\u73b0\u65b9\u6848\u200b&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u200b\u5ba2\u6237\u7aef\u7f13\u5b58\u200b&#xff1a;\u4f7f\u7528 s3fs \u7684 -o use_cache&#061;\/tmp\/cache \u53c2\u6570<\/p>\n<\/li>\n<li>\n<p>\u200b\u5206\u5e03\u5f0f\u7f13\u5b58\u200b&#xff1a;\u90e8\u7f72 Alluxio \u6216 Redis \u4f5c\u4e3a\u4e2d\u95f4\u5c42<\/p>\n<\/li>\n<li>\n<p>\u200bCDN \u52a0\u901f\u200b&#xff1a;\u5bf9 S3 \u4e2d\u7684\u70ed\u8d44\u6e90\u914d\u7f6e CloudFront \u5206\u53d1<\/p>\n<\/li>\n<\/ul>\n<p>2. \u200b\u6570\u636e\u9884\u5904\u7406\u4f18\u5316\u200b<\/p>\n<p>def process_large_file(bucket, key):<br \/>\n    # \u4f7f\u7528 S3 Select \u5904\u7406\u90e8\u5206\u6570\u636e<br \/>\n    resp &#061; s3.select_object_content(<br \/>\n        Bucket&#061;bucket,<br \/>\n        Key&#061;key,<br \/>\n        ExpressionType&#061;&#039;SQL&#039;,<br \/>\n        Expression&#061;&#034;SELECT * FROM s3object s WHERE s.temperature &gt; 30&#034;,<br \/>\n        InputSerialization&#061;{&#039;CSV&#039;: {&#8230;}},<br \/>\n        OutputSerialization&#061;{&#039;CSV&#039;: {}}<br \/>\n    )<\/p>\n<p>    # \u5904\u7406\u7ed3\u679c\u5199\u5165 NFS \u4f9b\u540e\u7eed\u5206\u6790<br \/>\n    with open(&#039;\/nfs\/processed\/results.csv&#039;, &#039;w&#039;) as f:<br \/>\n        for event in resp[&#039;Payload&#039;]:<br \/>\n            if &#039;Records&#039; in event:<br \/>\n                f.write(event[&#039;Records&#039;][&#039;Payload&#039;].decode(&#039;utf-8&#039;))<\/p>\n<p>3. \u200b\u6df7\u5408\u534f\u8bae\u5e76\u884c\u5904\u7406\u200b<\/p>\n<p>from concurrent.futures import ThreadPoolExecutor<br \/>\nimport nfs_lib  # \u81ea\u5b9a\u4e49NFS\u8bbf\u95ee\u5e93<br \/>\nimport boto3<\/p>\n<p>def hybrid_processing():<br \/>\n    s3 &#061; boto3.client(&#039;s3&#039;)<br \/>\n    with ThreadPoolExecutor(max_workers&#061;16) as executor:<br \/>\n        # \u4eceS3\u5e76\u884c\u4e0b\u8f7d<br \/>\n        s3_futures &#061; [executor.submit(s3.download_file, &#039;bucket&#039;, f&#039;input\/{i}.dat&#039;, f&#039;\/tmp\/{i}.dat&#039;)<br \/>\n                      for i in range(100)]<\/p>\n<p>        # \u4eceNFS\u5e76\u884c\u8bfb\u53d6<br \/>\n        nfs_futures &#061; [executor.submit(nfs_lib.process_file, f&#039;\/nfs\/ref\/{i}.ref&#039;)<br \/>\n                       for i in range(20)]<\/p>\n<p>        # \u7b49\u5f85\u6240\u6709\u4efb\u52a1\u5b8c\u6210<br \/>\n        for f in futures.as_completed(s3_futures &#043; nfs_futures):<br \/>\n            result &#061; f.result()<\/p>\n<h4><\/h4>\n<hr \/>\n<h4>2.1.5\u3001\u5b89\u5168\u4e0e\u5408\u89c4\u8bbe\u8ba1<\/h4>\n<p>1. \u200b\u7edf\u4e00\u8eab\u4efd\u7ba1\u7406\u200b<\/p>\n<p>graph TD<br \/>\n    A[AD\/LDAP] &#8211;&gt; B[Keycloak]<br \/>\n    B &#8211;&gt;|\u8ba4\u8bc1| C[NFS\u670d\u52a1\u5668]<br \/>\n    B &#8211;&gt;|\u8ba4\u8bc1| D[S3\u5b58\u50a8]<br \/>\n    B &#8211;&gt;|\u6388\u6743| E[Kubernetes]<\/p>\n<p>\u200b\u5b9e\u65bd\u6b65\u9aa4\u200b&#xff1a;<\/p>\n<li>\n<p>\u914d\u7f6e OpenID Connect \u8fde\u63a5 NFS \u670d\u52a1\u5668&#xff08;FreeIPA&#xff09;<\/p>\n<\/li>\n<li>\n<p>S3 \u4f7f\u7528 IAM Role \u4e0e AD \u96c6\u6210<\/p>\n<\/li>\n<li>\n<p>\u901a\u8fc7\u7b56\u7565\u5f15\u64ce&#xff08;\u5982 OPA&#xff09;\u7edf\u4e00\u8bbf\u95ee\u63a7\u5236<\/p>\n<\/li>\n<p>2. \u200b\u52a0\u5bc6\u65b9\u6848\u200b<\/p>\n<table>\n<tr>\n<p>\u200b\u5c42\u7ea7\u200b<\/p>\n<p>\u200bNFS \u52a0\u5bc6\u65b9\u6848\u200b<\/p>\n<p>\u200bS3 \u52a0\u5bc6\u65b9\u6848\u200b<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>\u200b\u4f20\u8f93\u5c42\u200b<\/p>\n<\/td>\n<td>\n<p>TLS 1.3 (Stunnel)<\/p>\n<\/td>\n<td>\n<p>HTTPS &#043; QUIC<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200b\u5b58\u50a8\u5c42\u200b<\/p>\n<\/td>\n<td>\n<p>LUKS \u78c1\u76d8\u52a0\u5bc6<\/p>\n<\/td>\n<td>\n<p>SSE-KMS (\u5ba2\u6237\u6258\u7ba1\u5bc6\u94a5)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200b\u5e94\u7528\u5c42\u200b<\/p>\n<\/td>\n<td>\n<p>GPG \u6587\u4ef6\u7ea7\u52a0\u5bc6<\/p>\n<\/td>\n<td>\n<p>S3 \u5ba2\u6237\u7aef\u52a0\u5bc6<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>3. \u200b\u5408\u89c4\u6027\u914d\u7f6e\u200b<\/p>\n<p># NFS \u8bbf\u95ee\u5ba1\u8ba1<br \/>\nauditctl -a exit,always -F dir&#061;\/nfs\/data -F perm&#061;rwxa<\/p>\n<p># S3 \u5408\u89c4\u7b56\u7565<br \/>\n{<br \/>\n  &#034;Version&#034;: &#034;2012-10-17&#034;,<br \/>\n  &#034;Statement&#034;: [{<br \/>\n    &#034;Effect&#034;: &#034;Deny&#034;,<br \/>\n    &#034;Action&#034;: &#034;s3:DeleteObject&#034;,<br \/>\n    &#034;Resource&#034;: &#034;arn:aws:s3:::compliance-bucket\/*&#034;,<br \/>\n    &#034;Condition&#034;: {&#034;NumericLessThan&#034;: {&#034;s3:objectage&#034;: &#034;365&#034;}}<br \/>\n  }]<br \/>\n}<\/p>\n<hr \/>\n<h4>2.1.6\u3001\u76d1\u63a7\u4e0e\u8fd0\u7ef4\u4f53\u7cfb<\/h4>\n<p>1. \u200b\u7edf\u4e00\u76d1\u63a7\u4eea\u8868\u677f\u200b<\/p>\n<p>graph LR<br \/>\n    A[NFS \u6027\u80fd\u6307\u6807] &#8211;&gt; E[Grafana]<br \/>\n    B[S3 \u8bf7\u6c42\u6307\u6807] &#8211;&gt; E<br \/>\n    C[\u6587\u4ef6\u8bbf\u95ee\u5ba1\u8ba1] &#8211;&gt; E<br \/>\n    D[\u5b58\u50a8\u5bb9\u91cf] &#8211;&gt; E<br \/>\n    E &#8211;&gt; F[\u8fd0\u7ef4\u544a\u8b66]<\/p>\n<p>\u200b\u76d1\u63a7\u6307\u6807\u200b&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u200bNFS \u5173\u952e\u6307\u6807\u200b&#xff1a;ops\/s, latency, cache_hit_rate<\/p>\n<\/li>\n<li>\n<p>\u200bS3 \u5173\u952e\u6307\u6807\u200b&#xff1a;5xxErrors, TotalRequestLatency, BytesDownloaded<\/p>\n<\/li>\n<li>\n<p>\u200b\u6df7\u5408\u6307\u6807\u200b&#xff1a;data_transfer_rate, protocol_ratio<\/p>\n<\/li>\n<\/ul>\n<p>2. \u200b\u81ea\u52a8\u5316\u8fd0\u7ef4\u200b<\/p>\n<p># \u5bb9\u91cf\u81ea\u52a8\u6269\u5c55\u811a\u672c<br \/>\ndef check_and_expand():<br \/>\n    nfs_usage &#061; get_nfs_usage(&#039;\/nfs\/data&#039;)<br \/>\n    s3_usage &#061; get_s3_usage(&#039;archive-bucket&#039;)<\/p>\n<p>    if nfs_usage &gt; 85:<br \/>\n        add_nfs_node()  # \u81ea\u52a8\u6269\u5c55NFS\u96c6\u7fa4\u8282\u70b9<\/p>\n<p>    if s3_usage &gt; 95:<br \/>\n        enable_s3_lifecycle(&#039;archive-bucket&#039;, &#039;GLACIER&#039;)  # \u81ea\u52a8\u5f52\u6863\u5230\u51b7\u5b58\u50a8<\/p>\n<p>3. \u200b\u707e\u96be\u6062\u590d\u65b9\u6848\u200b<\/p>\n<p>graph LR<br \/>\n    A[\u4e3b\u7ad9\u70b9] &#8211;&gt;|\u5b9e\u65f6\u590d\u5236| B[\u5907\u7528NFS\u96c6\u7fa4]<br \/>\n    A &#8211;&gt;|\u8de8\u533a\u57df\u590d\u5236| C[S3\u76ee\u6807\u6876]<br \/>\n    D[\u4e91\u5bb9\u707e\u4e2d\u5fc3] &#8211;&gt;|\u6302\u8f7d| C<br \/>\n    D &#8211;&gt;|\u6062\u590d| E[\u65b0NFS\u96c6\u7fa4]<\/p>\n<p>\u200b\u6062\u590d\u6d41\u7a0b\u200b&#xff1a;<\/p>\n<li>\n<p>\u4ece S3 \u6062\u590d\u5143\u6570\u636e\u5230\u65b0 NFS \u670d\u52a1\u5668<\/p>\n<\/li>\n<li>\n<p>\u5e76\u884c\u4e0b\u8f7d\u70ed\u6570\u636e\u5230 NFS \u7f13\u5b58<\/p>\n<\/li>\n<li>\n<p>\u6309\u9700\u6062\u590d\u51b7\u6570\u636e<\/p>\n<\/li>\n<hr \/>\n<h4>2.1.7\u3001\u6700\u4f73\u5b9e\u8df5\u603b\u7ed3<\/h4>\n<li>\n<p>\u200b\u534f\u8bae\u9009\u578b\u9ec4\u91d1\u6cd5\u5219\u200b&#xff1a;<\/p>\n<\/li>\n<li>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"636\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730025730-68898a1a0bfd3.png\" width=\"1420\" \/><\/p>\n<\/li>\n<li>\n<p>\u200b\u6210\u672c\u4f18\u5316\u7b56\u7565\u200b&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u200b\u70ed\u6570\u636e\u200b&#xff1a;\u672c\u5730 NVMe \u5b58\u50a8&#xff08;\u4f4e\u5ef6\u8fdf&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u200b\u6e29\u6570\u636e\u200b&#xff1a;\u4f01\u4e1a\u7ea7 SSD &#043; NFS&#xff08;\u5e73\u8861\u6027\u80fd\u6210\u672c&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u200b\u51b7\u6570\u636e\u200b&#xff1a;S3 \u6807\u51c6\u5b58\u50a8&#xff08;\u9ad8\u6301\u4e45\u6027&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u200b\u51b0\u6570\u636e\u200b&#xff1a;S3 Glacier&#xff08;\u6700\u4f4e\u6210\u672c&#xff09;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u200b\u8fc1\u79fb\u8def\u7ebf\u56fe\u200b&#xff1a;<\/p>\n<p>gantt<br \/>\n    title \u6df7\u5408\u5b58\u50a8\u8fc1\u79fb\u8ba1\u5212<br \/>\n    dateFormat  YYYY-MM-DD<br \/>\n    section \u7b2c\u4e00\u9636\u6bb5<br \/>\n    \u9700\u6c42\u5206\u6790       &#xff1a;active, des1, 2024-06-01, 30d<br \/>\n    section \u7b2c\u4e8c\u9636\u6bb5<br \/>\n    NFS\u96c6\u7fa4\u90e8\u7f72    &#xff1a;crit, 2024-07-01, 45d<br \/>\n    S3\u96c6\u6210\u5f00\u53d1     &#xff1a;2024-07-15, 30d<br \/>\n    section \u7b2c\u4e09\u9636\u6bb5<br \/>\n    \u6570\u636e\u8fc1\u79fb       &#xff1a;2024-08-15, 60d<br \/>\n    \u76d1\u63a7\u4f53\u7cfb\u6784\u5efa   &#xff1a;2024-08-15, 45d\n<\/li>\n<li>\n<p>\u200b\u6210\u529f\u5173\u952e\u56e0\u7d20\u200b&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u200b\u6027\u80fd\u200b&#xff1a;\u534f\u8bae\u9009\u62e9\u5339\u914d\u4e1a\u52a1 IO \u6a21\u5f0f<\/p>\n<\/li>\n<li>\n<p>\u200b\u6210\u672c\u200b&#xff1a;\u57fa\u4e8e\u6570\u636e\u751f\u547d\u5468\u671f\u52a8\u6001\u8fc1\u79fb<\/p>\n<\/li>\n<li>\n<p>\u200b\u5b89\u5168\u200b&#xff1a;\u7aef\u5230\u7aef\u52a0\u5bc6 &#043; \u7edf\u4e00\u8bbf\u95ee\u63a7\u5236<\/p>\n<\/li>\n<li>\n<p>\u200b\u8fd0\u7ef4\u200b&#xff1a;\u81ea\u52a8\u5316\u76d1\u63a7 &#043; \u81ea\u6108\u80fd\u529b<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<p>\u901a\u8fc7\u7cbe\u5fc3\u8bbe\u8ba1\u7684\u6df7\u5408\u5b58\u50a8\u67b6\u6784&#xff0c;\u4f01\u4e1a\u53ef\u4ee5\u540c\u65f6\u83b7\u5f97\u6587\u4ef6\u7cfb\u7edf\u7684\u6613\u7528\u6027\u548c\u5bf9\u8c61\u5b58\u50a8\u7684\u6269\u5c55\u6027&#xff0c;\u5178\u578b\u573a\u666f\u53ef\u964d\u4f4e 30-50% \u7684\u5b58\u50a8\u6210\u672c&#xff0c;\u540c\u65f6\u63d0\u5347 3-5 \u500d\u7684\u6027\u80fd\u8868\u73b0\u3002<\/p>\n<\/p>\n<h3>2.2 \u5b58\u50a8\u914d\u6bd4<\/h3>\n<p>\u5b58\u50a8\u7cfb\u7edf\u7684\u8bbe\u8ba1\u9700\u6839\u636e\u4e1a\u52a1\u573a\u666f\u5728\u6027\u80fd\u3001\u6210\u672c\u3001\u6269\u5c55\u6027\u4e4b\u95f4\u5bfb\u6c42\u5e73\u8861\u3002\u4ee5\u4e0b\u4ece\u914d\u6bd4\u6a21\u5f0f\u3001\u786c\u4ef6\u9009\u578b\u3001\u534f\u8bae\u914d\u7f6e\u4e09\u4e2a\u7ef4\u5ea6\u89e3\u6790\u5757\u5b58\u50a8\u3001\u6587\u4ef6\u5b58\u50a8\u3001\u5bf9\u8c61\u5b58\u50a8\u7684\u6620\u5c04\u5173\u7cfb&#xff1a;<\/p>\n<hr \/>\n<h4>2.2.1\u3001\u5b58\u50a8\u7c7b\u578b\u914d\u6bd4\u9009\u62e9\u6a21\u5f0f\u200b<\/h4>\n<table>\n<tr>\u200b\u573a\u666f\u200b\u200b\u63a8\u8350\u914d\u6bd4\u200b\u200b\u6838\u5fc3\u9700\u6c42\u200b\u200b\u5178\u578b\u6848\u4f8b\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u200b\u9ad8\u6027\u80fd\u6570\u636e\u5e93\u200b<\/td>\n<td>\u5757\u5b58\u50a8 90% &#043; \u5bf9\u8c61\u5b58\u50a8 10%<\/td>\n<td>\u4f4e\u5ef6\u8fdf\u3001\u9ad8IOPS\u3001\u6570\u636e\u5f3a\u4e00\u81f4<\/td>\n<td>\u91d1\u878d\u4ea4\u6613\u7cfb\u7edf<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u6df7\u5408\u4e91\u529e\u516c\u534f\u4f5c\u200b<\/td>\n<td>\u6587\u4ef6\u5b58\u50a8 70% &#043; \u5bf9\u8c61\u5b58\u50a8 30%<\/td>\n<td>\u591a\u534f\u8bae\u5171\u4eab\u3001\u4e2d\u4f4e\u5ef6\u8fdf\u3001\u8de8\u5e73\u53f0\u517c\u5bb9<\/td>\n<td>\u4f01\u4e1aNAS&#043;\u4e91\u5907\u4efd<\/td>\n<\/tr>\n<tr>\n<td>\u200bAI\u8bad\u7ec3\u5e73\u53f0\u200b<\/td>\n<td>\u5bf9\u8c61\u5b58\u50a8 60% &#043; \u6587\u4ef6\u5b58\u50a8 40%<\/td>\n<td>\u6d77\u91cf\u6570\u636e\u541e\u5410\u3001\u5e76\u884c\u8bfb\u53d6\u3001\u4f4e\u6210\u672c\u6269\u5c55<\/td>\n<td>\u5206\u5e03\u5f0f\u8bad\u7ec3\u96c6\u7fa4<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u5a92\u4f53\u5904\u7406\u6d41\u6c34\u7ebf\u200b<\/td>\n<td>\u5bf9\u8c61\u5b58\u50a8 80% &#043; \u5757\u5b58\u50a8 20%<\/td>\n<td>\u5927\u6587\u4ef6\u987a\u5e8f\u8bfb\u5199\u3001\u8f6c\u7801\u52a0\u901f\u3001CDN\u96c6\u6210<\/td>\n<td>4K\u89c6\u9891\u7f16\u8f91\u4e91\u5e73\u53f0<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u5f52\u6863\u5907\u4efd\u7cfb\u7edf\u200b<\/td>\n<td>\u5bf9\u8c61\u5b58\u50a8 100%<\/td>\n<td>\u9ad8\u538b\u7f29\u6bd4\u3001\u5f02\u5730\u5bb9\u707e\u3001\u8d85\u4f4e\u6210\u672c\u5b58\u50a8<\/td>\n<td>\u533b\u7597PACS\u5f52\u6863<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u200b\u914d\u6bd4\u903b\u8f91\u200b&#xff1a;\u70ed\u6570\u636e\u7528\u5757\/\u6587\u4ef6\u5b58\u50a8&#xff0c;\u6e29\u6570\u636e\u7528\u6df7\u5408\u534f\u8bae&#xff0c;\u51b7\u6570\u636e\u7528\u5bf9\u8c61\u5b58\u50a8\u3002<\/p>\n<hr \/>\n<h4>2.2.2\u3001\u786c\u4ef6\u8d44\u6e90\u9009\u578b\u6620\u5c04\u200b<\/h4>\n<h5>\u200b1. \u5757\u5b58\u50a8\u914d\u7f6e\u200b<\/h5>\n<ul>\n<li>\u200bCPU\u200b&#xff1a;\u9ad8\u9891\u591a\u6838&#xff08;\u5982Intel Xeon Gold 63xx&#xff09;&#xff0c;\u5355\u5377\u9700\u22658\u6838\u5fc3<\/li>\n<li>\u200bSSD\u200b&#xff1a;NVMe PCIe 4.0 x4&#xff08;\u8bfb&gt;7000MB\/s&#xff0c;\u5199&gt;5000MB\/s&#xff09;<\/li>\n<li>\u200bRAID\u5361\u200b&#xff1a;\u5e26BBU\u7535\u6c60\u7684\u786c\u4ef6RAID\u5361&#xff08;WriteBack\u6a21\u5f0f&#xff0c;\u7f13\u5b58\u22654GB&#xff09;<\/li>\n<li>\u200b\u603b\u7ebf\u200b&#xff1a;PCIe 4.0 x8\u94fe\u8def&#xff08;\u907f\u514d\u4e0eGPU\u4e89\u62a2\u5e26\u5bbd&#xff09;<\/li>\n<li>\u200b\u534f\u8bae\u200b&#xff1a;NVMe-oF&#xff08;RDMA&#xff09;\u6216FC&#xff08;\u5ef6\u8fdf&lt;100\u03bcs&#xff09;<\/li>\n<\/ul>\n<p>\u200b\u573a\u666f\u9002\u914d\u200b&#xff1a;Oracle RAC\u9700RAID 10&#043;BBU\u4fdd\u62a4&#xff0c;Kubernetes\u6301\u4e45\u5377\u7528NVMe-oF\u3002<\/p>\n<h5>\u200b2. \u6587\u4ef6\u5b58\u50a8\u914d\u7f6e\u200b<\/h5>\n<ul>\n<li>\u200bCPU\u200b&#xff1a;\u5747\u8861\u578b\u591a\u6838&#xff08;AMD EPYC 7xx3&#xff0c;TDP 120W&#xff09;<\/li>\n<li>\u200bSSD\u200b&#xff1a;SATA\/SAS SSD&#xff08;\u8bfb\u2264550MB\/s&#xff09;\u6216PCIe 3.0 NVMe&#xff08;\u8bfb3500MB\/s&#xff09;<\/li>\n<li>\u200bRAID\u5361\u200b&#xff1a;\u8f6f\u4ef6RAID&#xff08;ZFS RAIDZ2&#xff09;\u6216\u786c\u4ef6RAID 6&#xff08;WriteThrough\u6a21\u5f0f&#xff09;<\/li>\n<li>\u200b\u603b\u7ebf\u200b&#xff1a;PCIe 3.0 x4&#xff08;\u4e07\u5146\u7f51\u5361\u7ed1\u5b9a\u4e0d\u8d85\u74f6\u9888&#xff09;<\/li>\n<li>\u200b\u534f\u8bae\u200b&#xff1a;SMB Multichannel\u6216NFSv4.1&#xff08;\u5e76\u884cpNFS&#xff09;<\/li>\n<\/ul>\n<p>\u200b\u573a\u666f\u9002\u914d\u200b&#xff1a;NAS\u7528SATA SSD RAID 6&#xff0c;HPC\u7528pNFS&#043;NVMe\u7f13\u5b58\u6c60\u3002<\/p>\n<h5>\u200b3. \u5bf9\u8c61\u5b58\u50a8\u914d\u7f6e\u200b<\/h5>\n<ul>\n<li>\u200bCPU\u200b&#xff1a;\u9ad8\u5bc6\u5ea6\u4f4e\u529f\u8017&#xff08;Intel Xeon D&#xff0c;TDP 65W&#xff09;<\/li>\n<li>\u200bSSD\u200b&#xff1a;\u5927\u5bb9\u91cfSATA SSD&#xff08;QLC&#xff0c;\u8bfb500MB\/s&#xff09;\u6216HDD&#xff08;\u7ea0\u5220\u7801\u4f18\u5316&#xff09;<\/li>\n<li>\u200bRAID\u5361\u200b&#xff1a;\u65e0\u9700\u786c\u4ef6RAID&#xff0c;\u7528\u7ea0\u5220\u7801&#xff08;EC 8&#043;3&#xff09;\u66ff\u4ee3<\/li>\n<li>\u200b\u603b\u7ebf\u200b&#xff1a;PCIe 3.0 x1&#xff08;\u4ec5\u9700\u7f51\u5361\u5e26\u5bbd&#xff09;<\/li>\n<li>\u200b\u534f\u8bae\u200b&#xff1a;S3 API over HTTPS&#xff08;TLS 1.3\u52a0\u901f&#xff09;<\/li>\n<\/ul>\n<p>\u200b\u573a\u666f\u9002\u914d\u200b&#xff1a;\u767ePB\u7ea7\u5b58\u50a8\u7528EC 12&#043;4&#xff0c;\u5c0f\u6587\u4ef6\u7528Alluxio\u7f13\u5b58\u52a0\u901f\u3002<\/p>\n<hr \/>\n<h4>2.2.3\u3001\u5b58\u50a8\u534f\u8bae\u4e0e\u786c\u4ef6\u8054\u52a8\u914d\u7f6e\u200b<\/h4>\n<table>\n<tr>\u200b\u7ec4\u4ef6\u200b\u200b\u5757\u5b58\u50a8\u200b\u200b\u6587\u4ef6\u5b58\u50a8\u200b\u200b\u5bf9\u8c61\u5b58\u50a8\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u200b\u7f51\u7edc\u534f\u8bae\u200b<\/td>\n<td>NVMe-oF&#xff08;RoCEv2&#xff09;<\/td>\n<td>SMB3 over RDMA<\/td>\n<td>HTTPS\/QUIC<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u7f13\u5b58\u6a21\u5f0f\u200b<\/td>\n<td>WriteBack &#043; BBU<\/td>\n<td>WriteThrough<\/td>\n<td>\u65e0&#xff08;CDN\u8fb9\u7f18\u7f13\u5b58&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u6570\u636e\u4fdd\u62a4\u200b<\/td>\n<td>RAID 10\/50<\/td>\n<td>RAID 6\/ZFS<\/td>\n<td>\u7ea0\u5220\u7801&#xff08;EC 8&#043;3&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u6269\u5c55\u5355\u5143\u200b<\/td>\n<td>SAN\u4ea4\u6362\u673a\u5806\u53e0<\/td>\n<td>NAS\u96c6\u7fa4\u6a2a\u5411\u6269\u5c55<\/td>\n<td>\u4e00\u81f4\u6027\u54c8\u5e0c\u73af<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u6027\u80fd\u74f6\u9888\u200b<\/td>\n<td>PCIe\u5ef6\u8fdf&#xff08;\u97004.0 x8&#xff09;<\/td>\n<td>\u7f51\u7edc\u541e\u5410&#xff08;\u970025GbE&#xff09;<\/td>\n<td>\u5143\u6570\u636e\u68c0\u7d22&#xff08;\u9700SSD\u7d22\u5f15&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u200b\u5173\u952e\u70b9\u200b&#xff1a;NVMe-oF\u9700PCIe 4.0\u907f\u514d\u74f6\u9888&#xff0c;\u5bf9\u8c61\u5b58\u50a8\u5c0f\u6587\u4ef6\u9700SSD\u5143\u6570\u636e\u6c60\u3002<\/p>\n<hr \/>\n<h4>2.2.4\u3001\u6df7\u5408\u5b58\u50a8\u914d\u7f6e\u6848\u4f8b\u200b<\/h4>\n<p>\u200b\u667a\u6167\u533b\u9662PACS\u7cfb\u7edf\u200b&#xff1a;<\/p>\n<ul>\n<li>\u200b\u70ed\u6570\u636e\u5c42\u200b&#xff08;\u5728\u7ebf\u8c03\u9605&#xff09;&#xff1a;\n<ul>\n<li>3PAR\u5757\u5b58\u50a8&#xff08;\u53cc\u63a7NVMe&#xff0c;RAID 10&#xff09;<\/li>\n<li>\u534f\u8bae&#xff1a;FC 32G&#xff0c;\u5ef6\u8fdf\u22641ms<\/li>\n<\/ul>\n<\/li>\n<li>\u200b\u6e29\u6570\u636e\u5c42\u200b&#xff08;\u8fd1\u7ebf\u5206\u6790&#xff09;&#xff1a;\n<ul>\n<li>Isilon\u6587\u4ef6\u96c6\u7fa4&#xff08;SATA SSD&#xff0c;pNFS&#xff09;<\/li>\n<li>\u534f\u8bae&#xff1a;100GbE RDMA<\/li>\n<\/ul>\n<\/li>\n<li>\u200b\u51b7\u6570\u636e\u5c42\u200b&#xff08;\u957f\u671f\u5f52\u6863&#xff09;&#xff1a;\n<ul>\n<li>Ceph\u5bf9\u8c61\u5b58\u50a8&#xff08;EC 12&#043;4&#xff0c;HDD&#xff09;<\/li>\n<li>\u534f\u8bae&#xff1a;S3 API&#043;\u751f\u547d\u5468\u671f\u7b56\u7565<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u200b\u6210\u672c\u4f18\u5316\u200b&#xff1a;\u70ed:\u6e29:\u51b7 &#061; 10%:30%:60%&#xff0c;\u603bTCO\u964d\u4f4e57%\u3002<\/p>\n<hr \/>\n<h4>\u603b\u7ed3&#xff1a;\u8bbe\u8ba1\u539f\u5219\u200b<\/h4>\n<li>\n<p>\u200b\u6027\u80fd\u4e09\u89d2\u200b&#xff1a;<\/p>\n<ul>\n<li>\u5757\u5b58\u50a8&#xff1a;CPU\u9891\u7387 &gt; PCIe\u5e26\u5bbd &gt; SSD IOPS<\/li>\n<li>\u6587\u4ef6\u5b58\u50a8&#xff1a;\u7f51\u7edc\u541e\u5410 &gt; \u76ee\u5f55\u6df1\u5ea6\u4f18\u5316 &gt; \u7f13\u5b58\u547d\u4e2d\u7387<\/li>\n<li>\u5bf9\u8c61\u5b58\u50a8&#xff1a;EC\u6548\u7387 &gt; \u5143\u6570\u636e\u68c0\u7d22\u901f\u5ea6 &gt; \u5b58\u50a8\u5bc6\u5ea6<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u200b\u534f\u8bae\u9009\u578b\u94c1\u5f8b\u200b&#xff1a;<\/p>\n<p>graph LR<br \/>\n  A{\u5ef6\u8fdf\u8981\u6c42} &#8211;&gt;|\u22641ms| B[\u5757\u5b58\u50a8]<br \/>\n  A &#8211;&gt;|1-10ms| C[\u6587\u4ef6\u5b58\u50a8]<br \/>\n  A &#8211;&gt;|\u2265100ms| D[\u5bf9\u8c61\u5b58\u50a8]<br \/>\n  E{\u6570\u636e\u89c4\u6a21} &#8211;&gt;|\u2264100TB| C<br \/>\n  E &#8211;&gt;|\u22651PB| D\n<\/li>\n<li>\n<p>\u200b\u786c\u4ef6\u6f14\u8fdb\u8d8b\u52bf\u200b&#xff1a;<\/p>\n<ul>\n<li>\u5757\u5b58\u50a8&#xff1a;PCIe 5.0&#043;DPU\u5378\u8f7d\u8ba1\u7b97<\/li>\n<li>\u6587\u4ef6\u5b58\u50a8&#xff1a;\u7528\u6237\u6001\u534f\u8bae\u6808&#xff08;eBPF\u52a0\u901f&#xff09;<\/li>\n<li>\u5bf9\u8c61\u5b58\u50a8&#xff1a;SCM\u6301\u4e45\u5316\u7d22\u5f15<\/li>\n<\/ul>\n<\/li>\n<p>\u6ce8&#xff1a;\u5b9e\u9645\u914d\u7f6e\u9700\u7ed3\u5408\u8d1f\u8f7d\u6a21\u578b&#xff08;\u5982IO\u5927\u5c0f\/\u961f\u5217\u6df1\u5ea6&#xff09;\u7ec6\u5316&#xff0c;\u5efa\u8bae\u7528fio\u538b\u6d4b\u9a8c\u8bc1\u74f6\u9888\u70b9\u3002<\/p>\n<h3>2.3 \u5757\u5b58\u50a8\u7684RAID\u7ea7\u522b\u548c\u7f13\u5b58\u7b56\u7565<\/h3>\n<p>\u9488\u5bf9OLTP&#xff08;\u5728\u7ebf\u4ea4\u6613\u5904\u7406&#xff09;\u548cOLAP&#xff08;\u5728\u7ebf\u5206\u6790\u5904\u7406&#xff09;\u7684\u4e1a\u52a1\u7279\u6027&#xff0c;\u5757\u5b58\u50a8\u7684RAID\u7ea7\u522b\u548c\u7f13\u5b58\u7b56\u7565\u9700\u5dee\u5f02\u5316\u914d\u7f6e\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u4f18\u5316\u65b9\u6848\u53ca\u6280\u672f\u9a8c\u8bc1\u65b9\u6cd5&#xff1a;<\/p>\n<hr \/>\n<h4>2.3.1\u3001OLTP\u573a\u666f\u4f18\u5316&#xff08;\u9ad8\u5e76\u53d1\u968f\u673a\u5199&#xff09;\u200b\u200b<\/h4>\n<h5>\u200b\u6838\u5fc3\u8d1f\u8f7d\u7279\u5f81\u200b<\/h5>\n<ul>\n<li>\u200bIO\u6a21\u5f0f\u200b&#xff1a;70%\u968f\u673a\u5199 &#043; 30%\u968f\u673a\u8bfb<\/li>\n<li>\u200bIO\u5927\u5c0f\u200b&#xff1a;4KB~16KB\u5c0fIO<\/li>\n<li>\u200b\u961f\u5217\u6df1\u5ea6\u200b&#xff1a;\u9ad8&#xff08;\u226532&#xff09;<\/li>\n<li>\u200b\u5ef6\u8fdf\u654f\u611f\u200b&#xff1a;\u8981\u6c42\u22641ms<\/li>\n<\/ul>\n<h5>\u200b\u63a8\u8350\u914d\u7f6e\u200b<\/h5>\n<table>\n<tr>\u200b\u7ec4\u4ef6\u200b\u200b\u914d\u7f6e\u65b9\u6848\u200b\u200b\u6280\u672f\u539f\u7406\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u200bRAID\u7ea7\u522b\u200b<\/td>\n<td>RAID 10<\/td>\n<td>\u65e0\u5199\u60e9\u7f5a&#xff0c;\u968f\u673a\u5199\u6027\u80fd\u6700\u4f18<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u7f13\u5b58\u6a21\u5f0f\u200b<\/td>\n<td>WriteBack &#043; BBU\u7535\u6c60\u4fdd\u62a4<\/td>\n<td>\u5199\u5408\u5e76\u964d\u4f4eIO\u6b21\u6570&#xff0c;BBU\u9632\u6389\u7535\u4e22\u6570\u636e<\/td>\n<\/tr>\n<tr>\n<td>\u200bSSD\u9009\u578b\u200b<\/td>\n<td>NVMe PCIe 4.0 SSD&#xff08;DWPD\u22653&#xff09;<\/td>\n<td>\u9ad8\u8010\u7528\u6027\u5e94\u5bf9\u9891\u7e41\u5199<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u6761\u5e26\u5927\u5c0f\u200b<\/td>\n<td>64KB<\/td>\n<td>\u5339\u914d\u6570\u636e\u5e93\u9875\u5927\u5c0f&#xff08;SQL Server 8KB&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u8bfb\u7f13\u5b58\u6bd4\u4f8b\u200b<\/td>\n<td>20%~30%<\/td>\n<td>\u9884\u7559\u5185\u5b58\u7ed9\u5199\u7f13\u5b58<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u200b\u6027\u80fd\u9a8c\u8bc1\u547d\u4ee4\u200b&#xff1a;<\/p>\n<p># \u6a21\u62dfOLTP\u8d1f\u8f7d (70%\u968f\u673a\u5199)<br \/>\nfio &#8211;name&#061;oltp-test &#8211;rw&#061;randwrite &#8211;bs&#061;4k &#8211;iodepth&#061;32 \\\\<br \/>\n    &#8211;size&#061;100G &#8211;runtime&#061;300 &#8211;time_based &#8211;direct&#061;1 \\\\<br \/>\n    &#8211;filename&#061;\/dev\/nvme0n1 &#8211;ioengine&#061;libaio &#8211;group_reporting<\/p>\n<p>\u200b\u5173\u952e\u6307\u6807\u200b&#xff1a;<\/p>\n<ul>\n<li>\u5199IOPS &gt; 80,000&#xff08;PCIe 4.0 NVMe&#xff09;<\/li>\n<li>\u5199\u5ef6\u8fdf &lt; 200\u03bcs<\/li>\n<\/ul>\n<hr \/>\n<h4>2.3.2\u3001OLAP\u573a\u666f\u4f18\u5316&#xff08;\u5927\u541e\u5410\u987a\u5e8f\u8bfb&#xff09;\u200b\u200b<\/h4>\n<h5>\u200b\u6838\u5fc3\u8d1f\u8f7d\u7279\u5f81\u200b<\/h5>\n<ul>\n<li>\u200bIO\u6a21\u5f0f\u200b&#xff1a;85%\u987a\u5e8f\u8bfb &#043; 15%\u987a\u5e8f\u5199<\/li>\n<li>\u200bIO\u5927\u5c0f\u200b&#xff1a;1MB~4MB\u5927IO<\/li>\n<li>\u200b\u961f\u5217\u6df1\u5ea6\u200b&#xff1a;\u4e2d&#xff08;8~16&#xff09;<\/li>\n<li>\u200b\u541e\u5410\u654f\u611f\u200b&#xff1a;\u8981\u6c42\u22652GB\/s<\/li>\n<\/ul>\n<h5>\u200b\u63a8\u8350\u914d\u7f6e\u200b<\/h5>\n<table>\n<tr>\u200b\u7ec4\u4ef6\u200b\u200b\u914d\u7f6e\u65b9\u6848\u200b\u200b\u6280\u672f\u539f\u7406\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u200bRAID\u7ea7\u522b\u200b<\/td>\n<td>RAID 6<\/td>\n<td>\u9ad8\u5bb9\u91cf\u5229\u7528\u7387&#xff0c;\u987a\u5e8f\u8bfb\u65e0\u635f<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u7f13\u5b58\u6a21\u5f0f\u200b<\/td>\n<td>WriteThrough &#043; ReadAhead<\/td>\n<td>\u907f\u514d\u5199\u7f13\u5b58\u6c61\u67d3&#xff0c;\u9884\u8bfb\u52a0\u901f\u987a\u5e8f\u8bbf\u95ee<\/td>\n<\/tr>\n<tr>\n<td>\u200bSSD\u9009\u578b\u200b<\/td>\n<td>QLC NVMe SSD&#xff08;\u8bfb\u5bc6\u96c6\u578b&#xff09;<\/td>\n<td>\u9ad8\u5bb9\u91cf\u4f4e\u6210\u672c&#xff0c;\u987a\u5e8f\u8bfb\u6027\u80fd\u4f73<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u6761\u5e26\u5927\u5c0f\u200b<\/td>\n<td>1MB<\/td>\n<td>\u5339\u914d\u5927IO\u5c3a\u5bf8&#xff0c;\u51cf\u5c11\u8de8\u76d8\u64cd\u4f5c<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u8bfb\u7f13\u5b58\u6bd4\u4f8b\u200b<\/td>\n<td>70%~80%<\/td>\n<td>\u6700\u5927\u5316\u70ed\u6570\u636e\u7f13\u5b58\u547d\u4e2d\u7387<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u200b\u6027\u80fd\u9a8c\u8bc1\u547d\u4ee4\u200b&#xff1a;<\/p>\n<p># \u6a21\u62dfOLAP\u8d1f\u8f7d (\u5927\u5757\u987a\u5e8f\u8bfb)<br \/>\nfio &#8211;name&#061;olap-test &#8211;rw&#061;read &#8211;bs&#061;1M &#8211;iodepth&#061;8 \\\\<br \/>\n    &#8211;size&#061;500G &#8211;runtime&#061;300 &#8211;time_based &#8211;direct&#061;1 \\\\<br \/>\n    &#8211;filename&#061;\/dev\/md0 &#8211;ioengine&#061;libaio &#8211;group_reporting<\/p>\n<p>\u200b\u5173\u952e\u6307\u6807\u200b&#xff1a;<\/p>\n<ul>\n<li>\u987a\u5e8f\u8bfb\u541e\u5410 &gt; 3.5GB\/s&#xff08;RAID6&#043;4x NVMe&#xff09;<\/li>\n<li>\u987a\u5e8f\u8bfb\u5ef6\u8fdf &lt; 500\u03bcs<\/li>\n<\/ul>\n<hr \/>\n<h4>2.3.3\u3001\u6df7\u5408\u8d1f\u8f7d\u52a8\u6001\u8c03\u6574&#xff08;OLTP&#043;OLAP\u5e76\u5b58&#xff09;\u200b\u200b<\/h4>\n<h5>\u200b\u667a\u80fd\u5206\u5c42\u7b56\u7565\u200b<\/h5>\n<p>graph TD<br \/>\n    A[\u5b9e\u65f6IO\u76d1\u63a7] &#8211;&gt;|\u8bc6\u522b\u8d1f\u8f7d\u7279\u5f81| B{\u8d1f\u8f7d\u7c7b\u578b\u5224\u5b9a}<br \/>\n    B &#8211;&gt;|OLTP\u7279\u5f81| C[\u542f\u7528WriteBack\u7f13\u5b58]<br \/>\n    B &#8211;&gt;|OLAP\u7279\u5f81| D[\u5207\u6362\u4e3aReadAhead]<br \/>\n    B &#8211;&gt;|\u6df7\u5408IO| E[\u52a8\u6001\u7f13\u5b58\u5206\u533a]<br \/>\n    E &#8211;&gt; F[70%\u7f13\u5b58\u7ed9OLTP\u5199]<br \/>\n    E &#8211;&gt; G[30%\u7f13\u5b58\u7ed9OLAP\u8bfb]<\/p>\n<h5>\u200b\u914d\u7f6e\u5b9e\u73b0\u200b<\/h5>\n<li>\n<p>\u200bRAID\u9009\u62e9\u200b&#xff1a;RAID 50&#xff08;\u5e73\u8861\u6027\u80fd\u4e0e\u5bb9\u91cf&#xff09;<\/p>\n<ul>\n<li>\u57fa\u7840\u7ec4&#xff1a;RAID 0\u6761\u5e26\u5316\u63d0\u5347\u901f\u5ea6<\/li>\n<li>\u5197\u4f59\u7ec4&#xff1a;RAID 5\u63d0\u4f9b\u5bb9\u9519<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u200b\u7f13\u5b58\u7b56\u7565\u200b&#xff1a;<\/p>\n<p># MegaCLI\u52a8\u6001\u8c03\u6574\u7f13\u5b58<br \/>\nmegacli -LDSetProp WB -L0 -a0      # OLTP\u65f6\u6bb5&#xff1a;\u5199\u56de\u6a21\u5f0f<br \/>\nmegacli -LDSetProp WT -L0 -a0      # OLAP\u65f6\u6bb5&#xff1a;\u5199\u900f\u6a21\u5f0f<br \/>\nmegacli -LDSetProp RA -L0 -a0      # \u542f\u7528\u9884\u8bfb\n<\/li>\n<li>\n<p>\u200bSSD\u5206\u5c42\u200b&#xff1a;<\/p>\n<ul>\n<li>\u70ed\u6570\u636e\u5c42&#xff1a;SLC\/MLC\u7f13\u5b58\u76d8&#xff08;e.g. Intel Optane&#xff09;<\/li>\n<li>\u6e29\u6570\u636e\u5c42&#xff1a;TLC SSD<\/li>\n<li>\u51b7\u6570\u636e\u5c42&#xff1a;QLC SSD<\/li>\n<\/ul>\n<\/li>\n<hr \/>\n<h4>2.3.4\u3001\u907f\u5751\u6307\u5357\u4e0e\u6027\u80fd\u9677\u9631\u200b<\/h4>\n<h5>\u200bRAID\u7ea7\u522b\u8bef\u7528\u98ce\u9669\u200b<\/h5>\n<table>\n<tr>\u200b\u9519\u8bef\u914d\u7f6e\u200b\u200b\u540e\u679c\u200b\u200b\u4fee\u6b63\u65b9\u6848\u200b<\/tr>\n<tbody>\n<tr>\n<td>OLTP\u7528RAID 5\/6<\/td>\n<td>\u5199\u6027\u80fd\u4e0b\u964d60%&#043;&#xff08;\u5199\u60e9\u7f5a\u95ee\u9898&#xff09;<\/td>\n<td>\u6362RAID 10<\/td>\n<\/tr>\n<tr>\n<td>OLAP\u7528RAID 10<\/td>\n<td>\u5bb9\u91cf\u6d6a\u8d3940%&#xff0c;\u541e\u5410\u53d7\u9650<\/td>\n<td>\u6362RAID 6<\/td>\n<\/tr>\n<tr>\n<td>\u6761\u5e26\u8fc7\u5927(OLTP)<\/td>\n<td>\u589e\u52a0IO\u5ef6\u8fdf&#xff08;\u8de8\u76d8\u5bfb\u9053&#xff09;<\/td>\n<td>\u8bbe\u4e3a64KB~128KB<\/td>\n<\/tr>\n<tr>\n<td>\u6761\u5e26\u8fc7\u5c0f(OLAP)<\/td>\n<td>\u964d\u4f4e\u987a\u5e8f\u541e\u5410\u91cf<\/td>\n<td>\u8bbe\u4e3a1MB~4MB<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>\u200b\u7f13\u5b58\u914d\u7f6e\u7981\u5fcc\u200b<\/h5>\n<ul>\n<li>\u200bWriteBack\u65e0BBU\u200b&#xff1a;<br \/>\n\u65ad\u7535\u5bfc\u81f4\u6570\u636e\u4e22\u5931 \u2192 \u200b\u5fc5\u987b\u914d\u7f6eBBU\u6216\u8d85\u7ea7\u7535\u5bb9\u200b<\/li>\n<li>\u200b\u5168\u5185\u5b58\u7f13\u5b58\u200b&#xff1a;<br \/>\n\u5927\u5185\u5b58\u5360\u7528\u5f15\u53d1OOM \u2192 \u200b\u9650\u5236\u7f13\u5b58\u5927\u5c0f&#xff08;\u226425%\u603b\u5185\u5b58&#xff09;\u200b\u200b<\/li>\n<li>\u200b\u9884\u8bfb\u8fc7\u5ea6\u200b&#xff1a;<br \/>\n\u7f13\u5b58\u6c61\u67d3\u964d\u4f4e\u547d\u4e2d\u7387 \u2192 \u200b\u8bbe\u7f6e\u9884\u8bfb\u9608\u503c&#xff08;e.g. \u8fde\u7eed2\u6b21\u8bbf\u95ee\u89e6\u53d1&#xff09;\u200b\u200b<\/li>\n<\/ul>\n<hr \/>\n<h4>2.3.5\u3001\u9ad8\u7ea7\u8c03\u4f18\u6280\u5de7\u200b<\/h4>\n<h5>1. \u200b\u6570\u636e\u5e93\u9002\u914d\u4f18\u5316\u200b<\/h5>\n<ul>\n<li>\u200bMySQL InnoDB\u200b&#xff1a;\n<p>[mysqld]<br \/>\ninnodb_flush_method &#061; O_DIRECT     # \u7ed5\u8fc7OS\u7f13\u5b58<br \/>\ninnodb_io_capacity &#061; 20000         # \u5339\u914dSSD IOPS\n<\/li>\n<li>\u200bOracle ASM\u200b&#xff1a;\n<p>ALTER DISKGROUP data SET ATTRIBUTE<br \/>\n  &#039;au_size&#039; &#061; &#039;4M&#039;,               &#8212; \u5339\u914d\u6761\u5e26\u5927\u5c0f<br \/>\n  &#039;compatible.rdbms&#039; &#061; &#039;19.0&#039;;\n<\/li>\n<\/ul>\n<h5>2. \u200b\u5185\u6838\u53c2\u6570\u8c03\u4f18\u200b<\/h5>\n<p># \u8c03\u6574IO\u8c03\u5ea6\u5668 (OLTP)<br \/>\necho kyber &gt; \/sys\/block\/nvme0n1\/queue\/scheduler<\/p>\n<p># \u589e\u5927\u961f\u5217\u6df1\u5ea6 (OLAP)<br \/>\necho 1024 &gt; \/sys\/block\/sda\/queue\/nr_requests<\/p>\n<h5>3. \u200b\u76d1\u63a7\u4e0e\u81ea\u6108\u200b<\/h5>\n<p># \u5b9e\u65f6\u68c0\u6d4b\u5199\u60e9\u7f5a<br \/>\niostat -xmd 1 | awk &#039;\/sd[a-z]\/ {if ($10 &gt; 0) print &#034;RAID Write Penalty:&#034;, $10}&#039;<\/p>\n<p># \u81ea\u52a8\u5207\u6362\u7f13\u5b58\u6a21\u5f0f (\u6839\u636e\u8d1f\u8f7d)<br \/>\nif [ $(iostat -dn | awk &#039;\/nvme0n1\/ {print $6}&#039;) -gt 10000 ]; then<br \/>\n   megacli -LDSetProp WT -L0 -a0    # \u9ad8IOPS\u5207\u5199\u900f<br \/>\nfi<\/p>\n<hr \/>\n<h4>\u00a0\u200b\u603b\u7ed3&#xff1a;\u51b3\u7b56\u77e9\u9635\u200b<\/h4>\n<table>\n<tr>\u200b\u573a\u666f\u200b\u200bRAID\u200b\u200b\u7f13\u5b58\u200b\u200bSSD\u7c7b\u578b\u200b\u200b\u6761\u5e26\u200b\u200b\u76d1\u63a7\u91cd\u70b9\u200b<\/tr>\n<tbody>\n<tr>\n<td>\u200b\u6838\u5fc3OLTP\u200b<\/td>\n<td>10<\/td>\n<td>WriteBack&#043;BBU<\/td>\n<td>\u9ad8\u8010\u7528NVMe<\/td>\n<td>64KB<\/td>\n<td>\u5199\u5ef6\u8fdf\/\u5199IOPS<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u5206\u6790\u578bOLAP<\/td>\n<td>6<\/td>\n<td>ReadAhead<\/td>\n<td>QLC SSD<\/td>\n<td>1MB<\/td>\n<td>\u987a\u5e8f\u541e\u5410\u91cf<\/td>\n<\/tr>\n<tr>\n<td>\u200b\u6df7\u5408\u8d1f\u8f7d\u200b<\/td>\n<td>50<\/td>\n<td>\u52a8\u6001\u5206\u533a<\/td>\n<td>SLC\u7f13\u5b58&#043;QLC<\/td>\n<td>256KB<\/td>\n<td>\u7f13\u5b58\u547d\u4e2d\u7387<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u200b\u6700\u7ec8\u5efa\u8bae\u200b&#xff1a;<\/p>\n<ul>\n<li>OLTP\u7cfb\u7edf\u6bcf1000 TPS\u9700\u914d\u7f6e\u22655,000 IOPS\u80fd\u529b<\/li>\n<li>OLAP\u7cfb\u7edf\u6bcfTB\u626b\u63cf\u91cf\u9700\u22651GB\/s\u987a\u5e8f\u541e\u5410<\/li>\n<li>\u4f7f\u7528blktrace\u5206\u6790\u771f\u5b9e\u8d1f\u8f7d\u6a21\u5f0f&#xff0c;\u907f\u514d\u7406\u8bba\u63a8\u6d4b<\/li>\n<\/ul>\n<h3>2.4 NFS\u4e0eSMB\u534f\u8bae\u9009\u62e9\u53ca\u786c\u4ef6\u8d44\u6e90\u5206\u914d\u5168\u6307\u5357<\/h3>\n<p>\u5728\u6587\u4ef6\u5b58\u50a8\u7cfb\u7edf\u4e2d&#xff0c;NFS\u548cSMB\u534f\u8bae\u7684\u9009\u62e9\u4e0e\u786c\u4ef6\u8d44\u6e90\u5206\u914d\u9700\u8981\u6839\u636e\u4e1a\u52a1\u573a\u666f\u3001\u5ba2\u6237\u7aef\u7c7b\u578b\u548c\u6027\u80fd\u9700\u6c42\u8fdb\u884c\u7cbe\u7ec6\u5e73\u8861\u3002<\/p>\n<hr \/>\n<h4>2.4.1\u3001\u534f\u8bae\u9009\u62e9\u51b3\u7b56\u77e9\u9635<\/h4>\n<p>\u9488\u5bf9\u4e0d\u540c\u534f\u8bae\u7279\u6027\u8fdb\u884c\u4e13\u9879\u4f18\u5316&#xff1a;<\/p>\n<li>CPU\u5206\u914d<\/li>\n<ul>\n<li>\n<p>SMB\u534f\u8bae\u6808\u6d88\u8017\u66f4\u591aCPU\u8d44\u6e90&#xff08;\u7279\u522b\u662f\u52a0\u5bc6\u573a\u666f&#xff09;<br \/>\n\u5efa\u8bae&#xff1a;\u4e3aSMB\u670d\u52a1\u9884\u7559\u66f4\u591aCPU\u6838\u5fc3&#xff0c;\u7279\u522b\u662f\u542f\u7528SMB\u52a0\u5bc6\u65f6<br \/>\n\u914d\u7f6e\u793a\u4f8b&#xff1a;Windows Server\u8bbe\u7f6eSMB\u670d\u52a1CPU\u4f18\u5148\u7ea7&#xff0c;Linux samba\u670d\u52a1\u7ed1\u5b9a\u4e13\u7528CPU<\/p>\n<\/li>\n<li>\n<p>NFS\u5728\u670d\u52a1\u7aefCPU\u5f00\u9500\u8f83\u4f4e<br \/>\n\u4f46NFSv4\u52a0\u5bc6&#xff08;\u5982Kerberos&#xff09;\u4f1a\u589e\u52a0CPU\u8d1f\u62c5<br \/>\n\u5efa\u8bae&#xff1a;\u4e3aNFS GSSD\u8fdb\u7a0b\u5206\u914d\u72ec\u7acbCPU\u8d44\u6e90<\/p>\n<\/li>\n<\/ul>\n<li>\u5185\u5b58\u4f18\u5316<\/li>\n<ul>\n<li>SMB\u7f13\u5b58\u673a\u5236&#xff1a;<br \/>\n\u52a8\u6001\u7f13\u5b58\u7ba1\u7406&#xff08;\u6839\u636e\u8fde\u63a5\u6570\u81ea\u52a8\u8c03\u6574&#xff09;<br \/>\n\u5173\u952e\u6ce8\u518c\u8868\u9879&#xff1a;Smb2CreditsMin\/Max<\/li>\n<li>NFS\u7f13\u5b58\u673a\u5236&#xff1a;<br \/>\n\u56fa\u5b9a\u5185\u5b58\u5206\u914d&#043;\u9875\u9762\u7f13\u5b58<br \/>\n\u5efa\u8bae&#xff1a;\u4e3aNFSd\u5206\u914d\u4e13\u7528\u5185\u5b58\u533a\u57df<\/li>\n<\/ul>\n<p>1. \u200b\u6838\u5fc3\u7279\u6027\u5bf9\u6bd4\u200b<\/p>\n<table>\n<tr>\n<p>\u200b\u7279\u6027\u200b<\/p>\n<p>\u200bNFS (v4.1&#043;)\u200b\u200b<\/p>\n<p>\u200bSMB (v3.0&#043;)\u200b\u200b<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>\u200b\u539f\u751f\u73af\u5883\u200b<\/p>\n<\/td>\n<td>\n<p>Linux\/Unix<\/p>\n<\/td>\n<td>\n<p>Windows<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200b\u8ba4\u8bc1\u673a\u5236\u200b<\/p>\n<\/td>\n<td>\n<p>Kerberos\/LDAP<\/p>\n<\/td>\n<td>\n<p>AD\u57df\u8ba4\u8bc1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200b\u6587\u4ef6\u9501\u200b<\/p>\n<\/td>\n<td>\n<p>\u5f3a\u4e00\u81f4\u6027\u9501<\/p>\n<\/td>\n<td>\n<p>\u673a\u4f1a\u9501(Oplock)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200b\u5e76\u884c\u8bbf\u95ee\u200b<\/p>\n<\/td>\n<td>\n<p>pNFS (Parallel NFS)<\/p>\n<\/td>\n<td>\n<p>SMB Multichannel<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200b\u52a0\u5bc6\u652f\u6301\u200b<\/p>\n<\/td>\n<td>\n<p>RPCSEC_GSS (AES-256)<\/p>\n<\/td>\n<td>\n<p>AES-128\/256 (SMB3\u52a0\u5bc6)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200b\u6700\u5927\u6587\u4ef6\u200b<\/p>\n<\/td>\n<td>\n<p>16EB<\/p>\n<\/td>\n<td>\n<p>1PB (SMB3)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200b\u534f\u8bae\u5f00\u9500\u200b<\/p>\n<\/td>\n<td>\n<p>\u4f4e (UDP\/RDMA\u652f\u6301)<\/p>\n<\/td>\n<td>\n<p>\u4e2d\u9ad8 (TCP\u5c01\u88c5)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>2. \u200b\u573a\u666f\u5316\u9009\u62e9\u6307\u5357\u200b<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1020\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730025731-68898a1b4238b.png\" width=\"1791\" \/><\/p>\n<p>3. \u200b\u6df7\u5408\u534f\u8bae\u90e8\u7f72\u65b9\u6848\u200b<\/p>\n<p># Samba\u914d\u7f6e\u540c\u65f6\u652f\u6301NFS\u548cSMB<br \/>\n\/etc\/samba\/smb.conf:<br \/>\n[global]<br \/>\n   server multi channel support &#061; yes<br \/>\n   vfs objects &#061; nfs4acl_xattr<\/p>\n<p>[shared]<br \/>\n   path &#061; \/export\/data<br \/>\n   nfs4:mode &#061; special<br \/>\n   nfs4:acedup &#061; merge<br \/>\n   nfs4:chown &#061; yes<\/p>\n<hr \/>\n<h4>2.4.2\u3001\u786c\u4ef6\u8d44\u6e90\u5206\u914d\u7b56\u7565<\/h4>\n<p>1. \u200bCPU\u8d44\u6e90\u5206\u914d\u200b<\/p>\n<table>\n<tr>\n<p>\u200b\u534f\u8bae\u200b<\/p>\n<p>\u200bCPU\u5bc6\u96c6\u578b\u64cd\u4f5c\u200b<\/p>\n<p>\u200b\u4f18\u5316\u5efa\u8bae\u200b<\/p>\n<p>\u200b\u5206\u914d\u6bd4\u4f8b\u200b<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>\u200bNFS\u200b<\/p>\n<\/td>\n<td>\n<p>\u5143\u6570\u636e\u64cd\u4f5c\u3001\u52a0\u5bc6\u89e3\u5bc6<\/p>\n<\/td>\n<td>\n<p>\u542f\u7528AES-NI\u6307\u4ee4\u52a0\u901f<\/p>\n<\/td>\n<td>\n<p>\u6bcf10Gbps\u5e26\u5bbd\u5206\u914d1\u7269\u7406\u6838<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200bSMB\u200b<\/p>\n<\/td>\n<td>\n<p>SMB\u52a0\u5bc6\u3001AD\u8ba4\u8bc1<\/p>\n<\/td>\n<td>\n<p>\u4f7f\u7528DPU\u5378\u8f7d\u52a0\u5bc6\u8ba1\u7b97<\/p>\n<\/td>\n<td>\n<p>\u6bcf1000\u5e76\u53d1\u8fde\u63a5\u5206\u914d2\u6838<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u200b\u914d\u7f6e\u793a\u4f8b\u200b&#xff1a;<\/p>\n<p># \u9650\u5236NFSd CPU\u4f7f\u7528<br \/>\necho &#034;50&#034; &gt; \/proc\/sys\/fs\/nfs\/nfsd_cpu_percent<\/p>\n<p># Samba CPU\u7ed1\u5b9a<br \/>\ntaskset -c 2-4 \/usr\/sbin\/smbd<\/p>\n<p>2. \u200b\u5185\u5b58\u4f18\u5316\u65b9\u6848\u200b<\/p>\n<table>\n<tr>\n<p>\u200b\u7ec4\u4ef6\u200b<\/p>\n<p>\u200bNFS\u4f18\u5316\u200b<\/p>\n<p>\u200bSMB\u4f18\u5316\u200b<\/p>\n<p>\u200b\u63a8\u8350\u5927\u5c0f\u200b<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>\u200b\u8bfb\u7f13\u5b58\u200b<\/p>\n<\/td>\n<td>\n<p>Page Cache\u81ea\u52a8\u7ba1\u7406<\/p>\n<\/td>\n<td>\n<p>\u52a8\u6001\u7f13\u5b58&#xff08;\u9700\u624b\u52a8\u8c03\u4f18&#xff09;<\/p>\n<\/td>\n<td>\n<p>\u603b\u5185\u5b58\u768440%<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200b\u5199\u7f13\u5b58\u200b<\/p>\n<\/td>\n<td>\n<p>\u5f02\u6b65\u5199\u5165&#043;fsync\u63a7\u5236<\/p>\n<\/td>\n<td>\n<p>\u5199\u5408\u5e76\u7f13\u5b58&#xff08;Oplock\u652f\u6301&#xff09;<\/p>\n<\/td>\n<td>\n<p>\u603b\u5185\u5b58\u768420%<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200b\u5143\u6570\u636e\u7f13\u5b58\u200b<\/p>\n<\/td>\n<td>\n<p>inode\/dentry\u7f13\u5b58<\/p>\n<\/td>\n<td>\n<p>\u76ee\u5f55\u7f13\u5b58&#xff08;dir_cache&#xff09;<\/p>\n<\/td>\n<td>\n<p>\u6bcfTB\u5b58\u50a8\u5206\u914d1GB<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u200b\u76d1\u63a7\u5de5\u5177\u200b&#xff1a;<\/p>\n<p># NFS\u7f13\u5b58\u547d\u4e2d\u7387<br \/>\nnfsstat -rc<\/p>\n<p># SMB\u7f13\u5b58\u6548\u7387<br \/>\nsmbstatus -v<\/p>\n<p>3. \u200b\u7f51\u7edc\u914d\u7f6e\u4f18\u5316<\/p>\n<\/p>\n<p>| \u534f\u8bae\u7279\u6027 | NFS\u4f18\u5316\u65b9\u6848 | SMB\u4f18\u5316\u65b9\u6848 |<br \/>\n|&#8212;&#8212;&#8212;|&#8212;&#8212;&#8212;&#8212;|&#8212;&#8212;&#8212;&#8212;|<br \/>\n| \u591a\u8def\u5f84   | pNFS\u5ba2\u6237\u7aef\u8d1f\u8f7d\u5747\u8861 | SMB Multichannel |<br \/>\n| RDMA\u652f\u6301 | NFSv4.1 over RDMA | SMB Direct over RDMA |<br \/>\n| \u62e5\u585e\u63a7\u5236 | BBR\u7b97\u6cd5 | CTCP\u7b97\u6cd5 |<br \/>\n| \u4f20\u8f93\u52a0\u5bc6 | Kerberos\u786c\u4ef6\u52a0\u901f | AES-NI\u6307\u4ee4\u96c6\u52a0\u901f |<\/p>\n<p>\u200b<\/p>\n<table>\n<tr>\n<p>\u200b\u53c2\u6570\u200b<\/p>\n<p>\u200bNFS\u4f18\u5316\u503c\u200b<\/p>\n<p>\u200bSMB\u4f18\u5316\u503c\u200b<\/p>\n<p>\u200b\u786c\u4ef6\u8981\u6c42\u200b<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>\u200bMTU\u200b<\/p>\n<\/td>\n<td>\n<p>9000 (Jumbo Frames)<\/p>\n<\/td>\n<td>\n<p>9000<\/p>\n<\/td>\n<td>\n<p>\u652f\u6301\u5de8\u5e27\u7684\u4ea4\u6362\u673a<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200b\u4f20\u8f93\u534f\u8bae\u200b<\/p>\n<\/td>\n<td>\n<p>RDMA (RoCEv2)<\/p>\n<\/td>\n<td>\n<p>SMB Direct (RDMA)<\/p>\n<\/td>\n<td>\n<p>100GbE\u7f51\u5361<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200b\u591a\u8def\u5f84\u200b<\/p>\n<\/td>\n<td>\n<p>pNFS (\u591a\u6570\u636e\u670d\u52a1\u5668)<\/p>\n<\/td>\n<td>\n<p>SMB Multichannel<\/p>\n<\/td>\n<td>\n<p>\u53cc\u7aef\u53e3\u7f51\u5361\u7ed1\u5b9a<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200b\u961f\u5217\u6df1\u5ea6\u200b<\/p>\n<\/td>\n<td>\n<p>1024<\/p>\n<\/td>\n<td>\n<p>512<\/p>\n<\/td>\n<td>\n<p>\u9ad8\u6027\u80fd\u7f51\u5361<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u200b\u914d\u7f6e\u793a\u4f8b\u200b&#xff1a;<\/p>\n<p># NFS over RDMA<br \/>\nmount -t nfs -o rdma,port&#061;20049 server:\/share \/mnt<\/p>\n<p># SMB Direct<br \/>\nSet-SmbServerConfiguration -EnableSMBDirect $true<\/p>\n<p>4. \u200b\u5b58\u50a8\u4ecb\u8d28\u9009\u578b\u200b<\/p>\n<table>\n<tr>\n<p>\u200bIO\u6a21\u5f0f\u200b<\/p>\n<p>\u200bNFS\u63a8\u8350\u5b58\u50a8\u200b<\/p>\n<p>\u200bSMB\u63a8\u8350\u5b58\u50a8\u200b<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>\u200b\u5c0f\u6587\u4ef6\u968f\u673a\u200b<\/p>\n<\/td>\n<td>\n<p>NVMe SSD RAID10<\/p>\n<\/td>\n<td>\n<p>Optane\u6301\u4e45\u5185\u5b58&#043;SSD<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200b\u5927\u6587\u4ef6\u987a\u5e8f\u200b<\/p>\n<\/td>\n<td>\n<p>QLC SSD RAID6<\/p>\n<\/td>\n<td>\n<p>HDD RAID6 &#043; SSD\u7f13\u5b58<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200b\u6df7\u5408\u8d1f\u8f7d\u200b<\/p>\n<\/td>\n<td>\n<p>TLC SSD\u5206\u5c42\u5b58\u50a8<\/p>\n<\/td>\n<td>\n<p>\u81ea\u52a8\u5206\u5c42(Storage Spaces)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>2.4.3\u3001\u6027\u80fd\u8c03\u4f18\u5b9e\u6218<\/h4>\n<p>1. \u200bNFS\u6027\u80fd\u4f18\u5316\u200b<\/p>\n<p># \u670d\u52a1\u5668\u7aef\u4f18\u5316<br \/>\necho &#034;262144&#034; &gt; \/proc\/sys\/fs\/nfs\/nfsd_max_threads  # \u589e\u52a0\u7ebf\u7a0b\u6570<br \/>\necho &#034;1&#034; &gt; \/sys\/module\/nfsd\/parameters\/nfsd_tcp    # \u542f\u7528TCP<br \/>\necho &#034;1048576&#034; &gt; \/proc\/sys\/fs\/nfs\/mem_threshold    # \u589e\u5927\u5185\u5b58\u9608\u503c<\/p>\n<p># \u5ba2\u6237\u7aef\u4f18\u5316<br \/>\nmount -t nfs -o rsize&#061;1048576,wsize&#061;1048576,hard,tcp,noatime server:\/share \/mnt<\/p>\n<p>2. \u200bSMB\u6027\u80fd\u4f18\u5316\u200b<\/p>\n<p># Windows\u670d\u52a1\u5668\u4f18\u5316<br \/>\nSet-SmbServerConfiguration -AsyncSmbRequestsEnabled $true<br \/>\nSet-SmbServerConfiguration -EnableMultiChannel $true<br \/>\nSet-SmbServerConfiguration -EnableLeasing $false  # \u5173\u95ed\u79df\u7ea6\u63d0\u5347\u5c0f\u6587\u4ef6\u6027\u80fd<\/p>\n<p># Linux Samba\u4f18\u5316<br \/>\nsmb.conf:<br \/>\n[global]<br \/>\n   aio read size &#061; 1<br \/>\n   aio write size &#061; 1<br \/>\n   use mmap &#061; yes<br \/>\n   min receivefile size &#061; 16384<\/p>\n<p>3. \u200b\u6df7\u5408\u8d1f\u8f7d\u5747\u8861\u200b<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"428\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730025733-68898a1d3ec6a.png\" width=\"1695\" \/><\/p>\n<hr \/>\n<h4>2.4.4\u3001\u5b89\u5168\u4e0e\u9ad8\u53ef\u7528<\/h4>\n<p>1. \u200b\u8ba4\u8bc1\u96c6\u6210\u65b9\u6848\u200b<\/p>\n<table>\n<tr>\n<p>\u200b\u534f\u8bae\u200b<\/p>\n<p>\u200b\u63a8\u8350\u8ba4\u8bc1\u65b9\u5f0f\u200b<\/p>\n<p>\u200b\u914d\u7f6e\u793a\u4f8b\u200b<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>\u200bNFS\u200b<\/p>\n<\/td>\n<td>\n<p>Kerberos &#043; FreeIPA<\/p>\n<\/td>\n<td>\n<p>sec&#061;krb5p \u6302\u8f7d\u9009\u9879<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200bSMB\u200b<\/p>\n<\/td>\n<td>\n<p>Active Directory<\/p>\n<\/td>\n<td>\n<p>security &#061; ads (Samba\u914d\u7f6e)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>2. \u200b\u9ad8\u53ef\u7528\u67b6\u6784\u200b<\/p>\n<p>\u200bNFS\u9ad8\u53ef\u7528\u200b&#xff1a;<\/p>\n<p># DRBD &#043; Pacemaker<br \/>\npcs resource create nfs Filesystem device&#061;&#034;\/dev\/drbd0&#034; directory&#061;&#034;\/export&#034; fstype&#061;&#034;ext4&#034;<br \/>\npcs resource create vip IPaddr2 ip&#061;192.168.1.100 cidr_netmask&#061;24<\/p>\n<p>\u200bSMB\u9ad8\u53ef\u7528\u200b&#xff1a;<\/p>\n<p># Windows\u6545\u969c\u8f6c\u79fb\u96c6\u7fa4<br \/>\nAdd-ClusterSharedVolume -Name &#034;ClusterDisk1&#034; -Volume &#034;Volume1&#034;<br \/>\nAdd-ClusterFileServerRole -Name SMBCluster -Storage &#034;ClusterDisk1&#034;<\/p>\n<hr \/>\n<h4>2.4.5\u3001\u76d1\u63a7\u4e0e\u8bca\u65ad<\/h4>\n<p>1. \u200b\u5173\u952e\u6027\u80fd\u6307\u6807\u200b<\/p>\n<table>\n<tr>\n<p>\u200b\u534f\u8bae\u200b<\/p>\n<p>\u200b\u6838\u5fc3\u6307\u6807\u200b<\/p>\n<p>\u200b\u76d1\u63a7\u5de5\u5177\u200b<\/p>\n<p>\u200b\u5065\u5eb7\u9608\u503c\u200b<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>\u200bNFS\u200b<\/p>\n<\/td>\n<td>\n<p>RPC\u8c03\u7528\u5ef6\u8fdf<\/p>\n<\/td>\n<td>\n<p>nfsstat -m<\/p>\n<\/td>\n<td>\n<p>&lt; 5ms<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<\/td>\n<td>\n<p>pNFS\u8d1f\u8f7d\u5747\u8861<\/p>\n<\/td>\n<td>\n<p>cat \/proc\/self\/mountstats<\/p>\n<\/td>\n<td>\n<p>\u5404\u8def\u5f84\u504f\u5dee&lt;10%<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u200bSMB\u200b<\/p>\n<\/td>\n<td>\n<p>SMB\u5e73\u5747\u54cd\u5e94\u65f6\u95f4<\/p>\n<\/td>\n<td>\n<p>Get-SmbSession<\/p>\n<\/td>\n<td>\n<p>&lt; 20ms<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<\/td>\n<td>\n<p>\u591a\u901a\u9053\u5229\u7528\u7387<\/p>\n<\/td>\n<td>\n<p>Get-SmbMultichannelConnection<\/p>\n<\/td>\n<td>\n<p>&gt; 80%<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>2. \u200b\u8bca\u65ad\u547d\u4ee4\u200b<\/p>\n<p># NFS\u8fde\u63a5\u5206\u6790<br \/>\nss -t -p | grep nfsd<\/p>\n<p># SMB\u6027\u80fd\u5206\u6790<br \/>\nsamba-tool perfcount list | grep -E &#039;latency|throughput&#039;<\/p>\n<hr \/>\n<h4>2.4.6\u3001\u6700\u4f73\u5b9e\u8df5\u603b\u7ed3<\/h4>\n<li>\n<p>\u200b\u534f\u8bae\u9009\u62e9\u9ec4\u91d1\u6cd5\u5219\u200b&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u200bLinux\u73af\u5883\u200b&#xff1a;\u9996\u9009NFSv4.1&#043;&#xff08;\u542f\u7528pNFS&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u200bWindows\u73af\u5883\u200b&#xff1a;\u5f3a\u5236\u4f7f\u7528SMB3.1.1<\/p>\n<\/li>\n<li>\n<p>\u200b\u6df7\u5408\u73af\u5883\u200b&#xff1a;\u90e8\u7f72\u7edf\u4e00\u547d\u540d\u7a7a\u95f4&#xff08;\u5982Samba&#043;GPFS&#xff09;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u200b\u786c\u4ef6\u5206\u914d\u6bd4\u4f8b\u200b&#xff1a;<\/p>\n<p>pie<br \/>\n    title \u8d44\u6e90\u5206\u914d\u6bd4\u4f8b<br \/>\n    \u201cCPU\u8d44\u6e90\u201d &#xff1a; 45<br \/>\n    \u201c\u5185\u5b58\u7f13\u5b58\u201d &#xff1a; 30<br \/>\n    \u201c\u7f51\u7edc\u5e26\u5bbd\u201d &#xff1a; 20<br \/>\n    \u201c\u5b58\u50a8IO\u201d &#xff1a; 5\n<\/li>\n<li>\n<p>\u200b\u6027\u80fd\u6781\u9650\u914d\u7f6e\u200b&#xff1a;<\/p>\n<table>\n<tr>\n<p>\u200b\u573a\u666f\u200b<\/p>\n<p>\u200bNFS\u914d\u7f6e\u200b<\/p>\n<p>\u200bSMB\u914d\u7f6e\u200b<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>HPC\u8ba1\u7b97<\/p>\n<\/td>\n<td>\n<p>RDMA&#043;NVMe-oF&#043;pNFS<\/p>\n<\/td>\n<td>\n<p>\u7981\u7528&#xff08;\u975e\u9002\u7528\u573a\u666f&#xff09;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u865a\u62df\u5316\u5b58\u50a8<\/p>\n<\/td>\n<td>\n<p>NFSv4.1&#043;\u786c\u94fe\u63a5\u652f\u6301<\/p>\n<\/td>\n<td>\n<p>SMB3&#043;\u6301\u7eed\u53ef\u7528\u6027<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u5907\u4efd\u5f52\u6863<\/p>\n<\/td>\n<td>\n<p>NFSv4.2&#043;\u7a7a\u95f4\u9884\u7559<\/p>\n<\/td>\n<td>\n<p>SMB3&#043;\u900f\u660e\u538b\u7f29<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p>\u200b\u707e\u96be\u6062\u590d\u7b56\u7565\u200b&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u200bNFS\u200b&#xff1a;\u4f7f\u7528rsync&#043;inotify\u5b9e\u65f6\u590d\u5236<\/p>\n<\/li>\n<li>\n<p>\u200bSMB\u200b&#xff1a;DFS\u590d\u5236\u7ec4\u8de8\u7ad9\u70b9\u540c\u6b65<\/p>\n<\/li>\n<li>\n<p>\u200b\u901a\u7528\u200b&#xff1a;\u5b58\u50a8\u5feb\u7167&#xff08;\u6bcf15\u5206\u949f&#xff09;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<p>\u200b\u6700\u7ec8\u5efa\u8bae\u200b&#xff1a;\u5728\u6df7\u5408\u73af\u5883\u4e2d&#xff0c;\u91c7\u7528\u534f\u8bae\u7f51\u5173\u62bd\u8c61\u5c42\u200b&#xff08;\u5982Red Hat Gluster Storage&#xff09;\u53ef\u7edf\u4e00\u7ba1\u7406NFS\/SMB\u8bbf\u95ee&#xff0c;\u540c\u65f6\u901a\u8fc7\u670d\u52a1\u8d28\u91cf(QoS)\u7b56\u7565\u6309\u534f\u8bae\u5206\u914d\u786c\u4ef6\u8d44\u6e90&#xff0c;\u5b9e\u73b0\u6027\u80fd\u9694\u79bb\u4e0e\u4fdd\u969c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e8\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u200b\u5b58\u7b97\u4e00\u4f53\u67b6\u6784\u200b\uff1aSamsung SmartSSD\uff08FPGA\u52a0\u901f\uff09ScaleFlux\u53ef\u8ba1\u7b97\u5b58\u50a8\u9a71\u52a8\u5668\u200b\u5149\u5b50\u5b58\u50a8\u200b\uff1aIBM\u5149\u5b50\u5185\u5b58\uff08\u5ef6\u8fdf\u964d\u81f3\u7eb3\u79d2\u7ea7\uff09\u200bDNA\u5b58\u50a8\u200b\uff1aMicrosoft Project Silica\uff08\u73bb\u7483\u4ecb\u8d28\u5b58\u50a8\u4e07\u5e74\uff09\u5b58\u50a8\u670d\u52a1\u5668\u6b63\u4ece\u201c\u6570\u636e\u5bb9\u5668\u201d\u5411\u201c\u667a\u80fd\u6570\u636e\u5904\u7406\u5668\u201d\u6f14\u8fdb\uff0c\u5efa\u8bae\u5173\u6ce8\u5b58\u7b97\u878d\u5408\u4e0e\u91cf\u5b50\u5b89\u5168\u6280\u672f\u8def\u7ebf\u3002\u4f01\u4e1a\u9009\u578b\u9700\u5e73\u8861\u6027\u80fd\u9700\u6c42\u4e0eTCO\uff08\u603b\u62e5\u6709\u6210\u672c\uff09\uff0c\u5168\u95ea\u5b58\u5316\u5df2\u6210\u4e3b\u6d41\uff0c\u6db2\u51b7\u4e0e\u518d\u751f\u80fd\u6e90\u4f9b\u7535\u5c06\u662f\u4e0b\u4e00\u4ee3\u7eff\u8272\u5b58\u50a8\u7684\u6838\u5fc3\u65b9\u5411\u3002\u200b\u200b\u573a\u666f\u200b\u200b\u200b\u200bZFS\u200b\u200b\u200b\u200bCeph\u200b\u200b\u200b\u3002_\u5b58\u50a8\u670d\u52a1\u5668<\/p>\n","protected":false},"author":2,"featured_media":48158,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[43,44],"topic":[],"class_list":["post-48162","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010\u5b58\u50a8\u3011\u5b58\u50a8\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/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.wsisp.com\/helps\/48162.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010\u5b58\u50a8\u3011\u5b58\u50a8\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e8\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u200b\u5b58\u7b97\u4e00\u4f53\u67b6\u6784\u200b\uff1aSamsung SmartSSD\uff08FPGA\u52a0\u901f\uff09ScaleFlux\u53ef\u8ba1\u7b97\u5b58\u50a8\u9a71\u52a8\u5668\u200b\u5149\u5b50\u5b58\u50a8\u200b\uff1aIBM\u5149\u5b50\u5185\u5b58\uff08\u5ef6\u8fdf\u964d\u81f3\u7eb3\u79d2\u7ea7\uff09\u200bDNA\u5b58\u50a8\u200b\uff1aMicrosoft Project Silica\uff08\u73bb\u7483\u4ecb\u8d28\u5b58\u50a8\u4e07\u5e74\uff09\u5b58\u50a8\u670d\u52a1\u5668\u6b63\u4ece\u201c\u6570\u636e\u5bb9\u5668\u201d\u5411\u201c\u667a\u80fd\u6570\u636e\u5904\u7406\u5668\u201d\u6f14\u8fdb\uff0c\u5efa\u8bae\u5173\u6ce8\u5b58\u7b97\u878d\u5408\u4e0e\u91cf\u5b50\u5b89\u5168\u6280\u672f\u8def\u7ebf\u3002\u4f01\u4e1a\u9009\u578b\u9700\u5e73\u8861\u6027\u80fd\u9700\u6c42\u4e0eTCO\uff08\u603b\u62e5\u6709\u6210\u672c\uff09\uff0c\u5168\u95ea\u5b58\u5316\u5df2\u6210\u4e3b\u6d41\uff0c\u6db2\u51b7\u4e0e\u518d\u751f\u80fd\u6e90\u4f9b\u7535\u5c06\u662f\u4e0b\u4e00\u4ee3\u7eff\u8272\u5b58\u50a8\u7684\u6838\u5fc3\u65b9\u5411\u3002\u200b\u200b\u573a\u666f\u200b\u200b\u200b\u200bZFS\u200b\u200b\u200b\u200bCeph\u200b\u200b\u200b\u3002_\u5b58\u50a8\u670d\u52a1\u5668\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/48162.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-30T02:57:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730025728-68898a188bd06.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"29 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/48162.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/48162.html\",\"name\":\"\u3010\u5b58\u50a8\u3011\u5b58\u50a8\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-07-30T02:57:35+00:00\",\"dateModified\":\"2025-07-30T02:57:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/48162.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/48162.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/48162.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010\u5b58\u50a8\u3011\u5b58\u50a8\u670d\u52a1\u5668\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010\u5b58\u50a8\u3011\u5b58\u50a8\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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.wsisp.com\/helps\/48162.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010\u5b58\u50a8\u3011\u5b58\u50a8\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e8\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u200b\u5b58\u7b97\u4e00\u4f53\u67b6\u6784\u200b\uff1aSamsung SmartSSD\uff08FPGA\u52a0\u901f\uff09ScaleFlux\u53ef\u8ba1\u7b97\u5b58\u50a8\u9a71\u52a8\u5668\u200b\u5149\u5b50\u5b58\u50a8\u200b\uff1aIBM\u5149\u5b50\u5185\u5b58\uff08\u5ef6\u8fdf\u964d\u81f3\u7eb3\u79d2\u7ea7\uff09\u200bDNA\u5b58\u50a8\u200b\uff1aMicrosoft Project Silica\uff08\u73bb\u7483\u4ecb\u8d28\u5b58\u50a8\u4e07\u5e74\uff09\u5b58\u50a8\u670d\u52a1\u5668\u6b63\u4ece\u201c\u6570\u636e\u5bb9\u5668\u201d\u5411\u201c\u667a\u80fd\u6570\u636e\u5904\u7406\u5668\u201d\u6f14\u8fdb\uff0c\u5efa\u8bae\u5173\u6ce8\u5b58\u7b97\u878d\u5408\u4e0e\u91cf\u5b50\u5b89\u5168\u6280\u672f\u8def\u7ebf\u3002\u4f01\u4e1a\u9009\u578b\u9700\u5e73\u8861\u6027\u80fd\u9700\u6c42\u4e0eTCO\uff08\u603b\u62e5\u6709\u6210\u672c\uff09\uff0c\u5168\u95ea\u5b58\u5316\u5df2\u6210\u4e3b\u6d41\uff0c\u6db2\u51b7\u4e0e\u518d\u751f\u80fd\u6e90\u4f9b\u7535\u5c06\u662f\u4e0b\u4e00\u4ee3\u7eff\u8272\u5b58\u50a8\u7684\u6838\u5fc3\u65b9\u5411\u3002\u200b\u200b\u573a\u666f\u200b\u200b\u200b\u200bZFS\u200b\u200b\u200b\u200bCeph\u200b\u200b\u200b\u3002_\u5b58\u50a8\u670d\u52a1\u5668","og_url":"https:\/\/www.wsisp.com\/helps\/48162.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-07-30T02:57:35+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730025728-68898a188bd06.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"29 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/48162.html","url":"https:\/\/www.wsisp.com\/helps\/48162.html","name":"\u3010\u5b58\u50a8\u3011\u5b58\u50a8\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-07-30T02:57:35+00:00","dateModified":"2025-07-30T02:57:35+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/48162.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/48162.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/48162.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010\u5b58\u50a8\u3011\u5b58\u50a8\u670d\u52a1\u5668"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/48162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=48162"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/48162\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/48158"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=48162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=48162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=48162"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=48162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}