diff --git a/404.html b/404.html index 67894cb84..717d7f215 100644 --- a/404.html +++ b/404.html @@ -13,13 +13,13 @@ gtag('config', 'G-SMSDTMGLTV'); - +

404

There's nothing here.
Take me home.
- + diff --git a/_Footer.html b/_Footer.html index 458bd899e..b1176c3f8 100644 --- a/_Footer.html +++ b/_Footer.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -38,6 +38,6 @@

See something missing? Have tips to share? File an issue (opens new window), and we'll follow up as soon as possible. (If you have write permission in this repo, feel free to edit directly.)

- + diff --git a/about/index.html b/about/index.html index 2159179ed..47e57dee1 100644 --- a/about/index.html +++ b/about/index.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -38,6 +38,6 @@

# Mission, Vision, Value

# Contacts

# Resources

- + diff --git a/assets/js/10.538010de.js b/assets/js/10.f0629376.js similarity index 57% rename from assets/js/10.538010de.js rename to assets/js/10.f0629376.js index d8828af06..f808e8144 100644 --- a/assets/js/10.538010de.js +++ b/assets/js/10.f0629376.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{332:function(t,s,e){t.exports=e.p+"assets/img/one-pager-venus.ba147919.png"},408:function(t,s,e){"use strict";e.r(s);var n=e(17),r=Object(n.a)({},(function(){var t=this.$createElement,s=this._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[s("p",[s("img",{attrs:{src:e(332),alt:"venus-cluster"}})])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{331:function(t,s,e){t.exports=e.p+"assets/img/one-pager-venus.ba147919.png"},407:function(t,s,e){"use strict";e.r(s);var n=e(17),r=Object(n.a)({},(function(){var t=this.$createElement,s=this._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[s("p",[s("img",{attrs:{src:e(331),alt:"venus-cluster"}})])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/11.fc475d76.js b/assets/js/11.f97206d7.js similarity index 77% rename from assets/js/11.fc475d76.js rename to assets/js/11.f97206d7.js index aa4c287ec..ea2c696cb 100644 --- a/assets/js/11.fc475d76.js +++ b/assets/js/11.f97206d7.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{331:function(n,o,e){n.exports=e.p+"assets/img/sophon-banner.6a83f125.jpg"},407:function(n,o,e){"use strict";e.r(o);var t=e(17),s=Object(t.a)({},(function(){var n=this,o=n.$createElement,t=n._self._c||o;return t("ContentSlotsDistributor",{attrs:{"slot-key":n.$parent.slotKey}},[t("p",[t("img",{attrs:{src:e(331),alt:"sophon"}})]),n._v(" "),t("h3",{attrs:{id:"sophon"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sophon"}},[n._v("#")]),n._v(" Sophon")]),n._v(" "),t("p",[n._v("Sophon, formerly known as Venus chain service, is THE Filecoin super node solution. Learn more about Sophon "),t("a",{attrs:{href:"https://sophon.venus-fil.io/",target:"_blank",rel:"noopener noreferrer"}},[n._v("here"),t("OutboundLink")],1),n._v(".")])])}),[],!1,null,null,null);o.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{332:function(n,o,e){n.exports=e.p+"assets/img/sophon-banner.6a83f125.jpg"},408:function(n,o,e){"use strict";e.r(o);var t=e(17),s=Object(t.a)({},(function(){var n=this,o=n.$createElement,t=n._self._c||o;return t("ContentSlotsDistributor",{attrs:{"slot-key":n.$parent.slotKey}},[t("p",[t("img",{attrs:{src:e(332),alt:"sophon"}})]),n._v(" "),t("h3",{attrs:{id:"sophon"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sophon"}},[n._v("#")]),n._v(" Sophon")]),n._v(" "),t("p",[n._v("Sophon, formerly known as Venus chain service, is THE Filecoin super node solution. Learn more about Sophon "),t("a",{attrs:{href:"https://sophon.venus-fil.io/",target:"_blank",rel:"noopener noreferrer"}},[n._v("here"),t("OutboundLink")],1),n._v(".")])])}),[],!1,null,null,null);o.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/15.cd14b5cc.js b/assets/js/15.2770a953.js similarity index 71% rename from assets/js/15.cd14b5cc.js rename to assets/js/15.2770a953.js index 5031f71d2..64c2029e9 100644 --- a/assets/js/15.cd14b5cc.js +++ b/assets/js/15.2770a953.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{332:function(t,s,e){t.exports=e.p+"assets/img/one-pager-venus.ba147919.png"},430:function(t,s,e){"use strict";e.r(s);var n=e(17),r=Object(n.a)({},(function(){var t=this.$createElement,s=this._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[s("p",[s("img",{attrs:{src:e(332),alt:"venus-cluster"}})])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{331:function(t,s,e){t.exports=e.p+"assets/img/one-pager-venus.ba147919.png"},430:function(t,s,e){"use strict";e.r(s);var n=e(17),r=Object(n.a)({},(function(){var t=this.$createElement,s=this._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[s("p",[s("img",{attrs:{src:e(331),alt:"venus-cluster"}})])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/16.b517901c.js b/assets/js/16.c99ecbd6.js similarity index 77% rename from assets/js/16.b517901c.js rename to assets/js/16.c99ecbd6.js index 04269e084..18803b3b1 100644 --- a/assets/js/16.b517901c.js +++ b/assets/js/16.c99ecbd6.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{331:function(t,e,n){t.exports=n.p+"assets/img/sophon-banner.6a83f125.jpg"},432:function(t,e,n){"use strict";n.r(e);var s=n(17),r=Object(s.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("p",[s("img",{attrs:{src:n(331),alt:"sophon"}})]),t._v(" "),s("h3",{attrs:{id:"智子"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#智子"}},[t._v("#")]),t._v(" 智子")]),t._v(" "),s("p",[t._v("智子,原 Venus 链服务,是一个 Filecoin 超级节点解决方案。请在"),s("a",{attrs:{href:"https://sophon.venus-fil.io/zh/",target:"_blank",rel:"noopener noreferrer"}},[t._v("此"),s("OutboundLink")],1),t._v("了解更多关于智子的信息。")])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{332:function(t,e,n){t.exports=n.p+"assets/img/sophon-banner.6a83f125.jpg"},431:function(t,e,n){"use strict";n.r(e);var s=n(17),r=Object(s.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("p",[s("img",{attrs:{src:n(332),alt:"sophon"}})]),t._v(" "),s("h3",{attrs:{id:"智子"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#智子"}},[t._v("#")]),t._v(" 智子")]),t._v(" "),s("p",[t._v("智子,原 Venus 链服务,是一个 Filecoin 超级节点解决方案。请在"),s("a",{attrs:{href:"https://sophon.venus-fil.io/zh/",target:"_blank",rel:"noopener noreferrer"}},[t._v("此"),s("OutboundLink")],1),t._v("了解更多关于智子的信息。")])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/23.d61f9472.js b/assets/js/23.09d8a9a8.js similarity index 98% rename from assets/js/23.d61f9472.js rename to assets/js/23.09d8a9a8.js index e69e29c94..c4de76f31 100644 --- a/assets/js/23.d61f9472.js +++ b/assets/js/23.09d8a9a8.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{404:function(t,s,n){"use strict";n.r(s);var a=n(17),e=Object(a.a)({},(function(){var t=this,s=t.$createElement,n=t._self._c||s;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h2",{attrs:{id:"contributing"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#contributing"}},[t._v("#")]),t._v(" Contributing")]),t._v(" "),n("p",[t._v("PRs, bug reports, and issue suggestions are welcome! For major changes, please propose in an issue first so benefits and impacts can be discussed.")]),t._v(" "),n("p",[t._v("👉 You can also click on click on "),n("code",[t._v("Edit this page")]),t._v(" links at the bottom of each page to jump directly to Edit mode.")]),t._v(" "),n("h2",{attrs:{id:"deployment"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#deployment"}},[t._v("#")]),t._v(" Deployment")]),t._v(" "),n("h3",{attrs:{id:"running-locally"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#running-locally"}},[t._v("#")]),t._v(" Running locally")]),t._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v(" $ yarn install\n $ yarn docs:dev \n")])])]),n("h3",{attrs:{id:"building"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#building"}},[t._v("#")]),t._v(" Building")]),t._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v(" $ yarn docs:links # verify all links are well-formed\n $ yarn docs:build\n")])])]),n("p",[t._v("Then deploy the "),n("code",[t._v("docs/.vuepress/dist")]),t._v(" directory to the "),n("code",[t._v("gh-pages")]),t._v(" branch of this repo.")]),t._v(" "),n("h3",{attrs:{id:"deploy-script"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#deploy-script"}},[t._v("#")]),t._v(" Deploy script")]),t._v(" "),n("p",[t._v("You can also run the following script to combine building and deployment together. Make sure everything is running okay locally.")]),t._v(" "),n("div",{staticClass:"language-bash extra-class"},[n("pre",{pre:!0,attrs:{class:"language-bash"}},[n("code",[n("span",{pre:!0,attrs:{class:"token shebang important"}},[t._v("#!/usr/bin/env sh")]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# abort on errors")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("set")]),t._v(" -e\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# build")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("npm")]),t._v(" run docs:build\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# navigate into the build output directory")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" docs/.vuepress/dist\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# if you are deploying to a custom domain")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("echo")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v("'venus.filecoin.io'")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" CNAME\n\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" init\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("add")]),t._v(" -A\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" commit -m "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v("'deploy'")]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# if you are deploying to https://.github.io")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# git push -f git@github.com:/.github.io.git master")]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# if you are deploying to https://.github.io/")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" push -f git@github.com:filecoin-project/venus-docs.git master:gh-pages\n\n"),n("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" -\n")])])]),n("h3",{attrs:{id:"notes"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#notes"}},[t._v("#")]),t._v(" Notes:")]),t._v(" "),n("ul",[n("li",[t._v("When new documentation pages are added "),n("code",[t._v("./docs/config.js")]),t._v(" will need to be "),n("strong",[t._v("manually updated")]),t._v(" in this repo")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{405:function(t,s,n){"use strict";n.r(s);var a=n(17),e=Object(a.a)({},(function(){var t=this,s=t.$createElement,n=t._self._c||s;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h2",{attrs:{id:"contributing"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#contributing"}},[t._v("#")]),t._v(" Contributing")]),t._v(" "),n("p",[t._v("PRs, bug reports, and issue suggestions are welcome! For major changes, please propose in an issue first so benefits and impacts can be discussed.")]),t._v(" "),n("p",[t._v("👉 You can also click on click on "),n("code",[t._v("Edit this page")]),t._v(" links at the bottom of each page to jump directly to Edit mode.")]),t._v(" "),n("h2",{attrs:{id:"deployment"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#deployment"}},[t._v("#")]),t._v(" Deployment")]),t._v(" "),n("h3",{attrs:{id:"running-locally"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#running-locally"}},[t._v("#")]),t._v(" Running locally")]),t._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v(" $ yarn install\n $ yarn docs:dev \n")])])]),n("h3",{attrs:{id:"building"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#building"}},[t._v("#")]),t._v(" Building")]),t._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v(" $ yarn docs:links # verify all links are well-formed\n $ yarn docs:build\n")])])]),n("p",[t._v("Then deploy the "),n("code",[t._v("docs/.vuepress/dist")]),t._v(" directory to the "),n("code",[t._v("gh-pages")]),t._v(" branch of this repo.")]),t._v(" "),n("h3",{attrs:{id:"deploy-script"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#deploy-script"}},[t._v("#")]),t._v(" Deploy script")]),t._v(" "),n("p",[t._v("You can also run the following script to combine building and deployment together. Make sure everything is running okay locally.")]),t._v(" "),n("div",{staticClass:"language-bash extra-class"},[n("pre",{pre:!0,attrs:{class:"language-bash"}},[n("code",[n("span",{pre:!0,attrs:{class:"token shebang important"}},[t._v("#!/usr/bin/env sh")]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# abort on errors")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("set")]),t._v(" -e\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# build")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("npm")]),t._v(" run docs:build\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# navigate into the build output directory")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" docs/.vuepress/dist\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# if you are deploying to a custom domain")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("echo")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v("'venus.filecoin.io'")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" CNAME\n\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" init\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("add")]),t._v(" -A\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" commit -m "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v("'deploy'")]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# if you are deploying to https://.github.io")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# git push -f git@github.com:/.github.io.git master")]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# if you are deploying to https://.github.io/")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" push -f git@github.com:filecoin-project/venus-docs.git master:gh-pages\n\n"),n("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" -\n")])])]),n("h3",{attrs:{id:"notes"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#notes"}},[t._v("#")]),t._v(" Notes:")]),t._v(" "),n("ul",[n("li",[t._v("When new documentation pages are added "),n("code",[t._v("./docs/config.js")]),t._v(" will need to be "),n("strong",[t._v("manually updated")]),t._v(" in this repo")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/24.665a40db.js b/assets/js/24.2efc475d.js similarity index 99% rename from assets/js/24.665a40db.js rename to assets/js/24.2efc475d.js index 741cf00d5..8e43d1e20 100644 --- a/assets/js/24.665a40db.js +++ b/assets/js/24.2efc475d.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{409:function(e,s,t){"use strict";t.r(s);var a=t(17),r=Object(a.a)({},(function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h2",{attrs:{id:"find-your-optimal-configurations"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#find-your-optimal-configurations"}},[e._v("#")]),e._v(" Find your optimal configurations")]),e._v(" "),t("p",[e._v("Get your filecoin mining operation up and running is hard. Expanding growth of your system is even harder. It will take a lot of time to scale growth and make sure your setup running without errors.")]),e._v(" "),t("h2",{attrs:{id:"overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#overview"}},[e._v("#")]),e._v(" Overview")]),e._v(" "),t("p",[e._v("General guidelines to follow when optimizing your sealing pipeline.")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("Pledge 2 to 4 sectors and record the exact time of each task (AP, P1, P2, C2) takes to finish")])]),e._v(" "),t("li",[t("p",[e._v("Make sure all your boxes have tasks assigned to them all the time")])]),e._v(" "),t("li",[t("p",[e._v("Automate your "),t("code",[e._v("sector pledge")]),e._v(" command with "),t("a",{attrs:{href:"https://filecoinproject.slack.com/archives/CPFTWMY7N/p1628092388117700?thread_ts=1628092099.117600&cid=CPFTWMY7N",target:"_blank",rel:"noopener noreferrer"}},[e._v("script"),t("OutboundLink")],1),e._v("/cron")])]),e._v(" "),t("li",[t("p",[e._v("Use "),t("code",[e._v("MaxSealingSectors")]),e._v(" to cap maximum number of sectors sealing in parallel")])]),e._v(" "),t("li",[t("p",[e._v("Every worker can be assigned with a subset of tasks (AP, P1, P2, C2) to specialize")])])]),e._v(" "),t("h2",{attrs:{id:"record-time-for-each-task"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#record-time-for-each-task"}},[e._v("#")]),e._v(" Record time for each task")]),e._v(" "),t("p",[e._v("Types of task that a worker can do.")]),e._v(" "),t("div",{staticClass:"language-go extra-class"},[t("pre",{pre:!0,attrs:{class:"language-go"}},[t("code",[e._v("TTAddPiece TaskType "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"seal/v0/addpiece"')]),e._v("\nTTPreCommit1 TaskType "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"seal/v0/precommit/1"')]),e._v("\nTTPreCommit2 TaskType "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"seal/v0/precommit/2"')]),e._v("\nTTCommit1 TaskType "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"seal/v0/commit/1"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("// NOTE: We use this to transfer the sector into miner-local storage for now; Don't use on workers!")]),e._v("\nTTCommit2 TaskType "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"seal/v0/commit/2"')]),e._v("\n\nTTFinalize TaskType "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"seal/v0/finalize"')]),e._v("\nTTFetch TaskType "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"seal/v0/fetch"')]),e._v("\nTTUnseal TaskType "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"seal/v0/unseal"')]),e._v("\n")])])]),t("p",[e._v("Each task shows up in log first with key word of "),t("code",[e._v("prepare")]),e._v(" (start and end) then with key word of "),t("code",[e._v("work")]),e._v(" as another log entry (also start and end).")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# seal/v0/fetch")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T14:00:07.925+0800 INFO advmgr sector-storage/sched_worker.go:401 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" prepare "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/fetch "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T14:05:36.772+0800 INFO advmgr sector-storage/sched_worker.go:403 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" prepare "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/fetch end "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T14:05:36.772+0800 INFO advmgr sector-storage/sched_worker.go:442 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" work "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/fetch "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T14:05:36.774+0800 INFO advmgr sector-storage/sched_worker.go:444 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" work "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/fetch end "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# seal/v0/addpiece")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:38:37.977+0800 INFO advmgr sector-storage/sched_worker.go:401 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("8")]),e._v(" prepare "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/addpiece "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:38:37.978+0800 INFO advmgr sector-storage/sched_worker.go:403 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("8")]),e._v(" prepare "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/addpiece end "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:38:37.978+0800 INFO advmgr sector-storage/sched_worker.go:442 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("8")]),e._v(" work "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/addpiece "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:44:26.295+0800 INFO advmgr sector-storage/sched_worker.go:444 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("8")]),e._v(" work "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/addpiece end "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# seal/v0/commit/2")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:26:02.119+0800 INFO advmgr sector-storage/sched_worker.go:401 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" prepare "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/commit/2 "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:26:02.119+0800 INFO advmgr sector-storage/sched_worker.go:403 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" prepare "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/commit/2 end "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:26:02.119+0800 INFO advmgr sector-storage/sched_worker.go:442 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" work "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/commit/2 "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:49:46.180+0800 INFO advmgr sector-storage/sched_worker.go:444 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" work "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/commit/2 end "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# seal/v0/finalize")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:54:17.414+0800 INFO advmgr sector-storage/sched_worker.go:401 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" prepare "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/finalize "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:59:30.471+0800 INFO advmgr sector-storage/sched_worker.go:403 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" prepare "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/finalize end "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:59:30.471+0800 INFO advmgr sector-storage/sched_worker.go:442 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" work "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/finalize "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T14:00:07.915+0800 INFO advmgr sector-storage/sched_worker.go:444 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" work "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/finalize end "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n")])])]),t("p",[e._v("Some task may take more time in "),t("code",[e._v("prepare")]),e._v(" than"),t("code",[e._v("work")]),e._v(" and some are the other way around. Generally speaking, when task requires network transfer/bandwidth it will consume more time in "),t("code",[e._v("prepare")]),e._v(" while if the task require more computation resources it will consume more time in "),t("code",[e._v("work")]),e._v(". Eg, AP, P1, P2, C2.")]),e._v(" "),t("p",[e._v("To record time of core tasks like AP, P1, P2 and C2, we aggregate both the time of "),t("code",[e._v("fetch")]),e._v(" before it and the task itself. For example, time of P1 = time of P1 + time of fetch before P1.")]),e._v(" "),t("h2",{attrs:{id:"performance-factors"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#performance-factors"}},[e._v("#")]),e._v(" Performance factors")]),e._v(" "),t("p",[e._v("There are many factors cobtributes to the performance of your sealing pipeline.")]),e._v(" "),t("h3",{attrs:{id:"sealing-storage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sealing-storage"}},[e._v("#")]),e._v(" Sealing storage")]),e._v(" "),t("p",[e._v("During sealing of a sector, cahce files will be generated by the proof algorithm which requires high disk IO speed. Low IO speed may result in idling of your computation resources (CPUs/GPUs).")]),e._v(" "),t("p",[e._v("Choose apropriate hardware using forumla below.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("file")]),e._v(" size * number of parallel threads / operation "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("time")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" average "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("file")]),e._v(" IO speed\n")])])]),t("p",[e._v("To get more precise estimations, sum up per task IO throughput.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("AP IO throughput "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" AP "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("read")]),e._v(" + AP "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("write")]),e._v("\nP1 IO throughput "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" P1 "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("read")]),e._v(" + P1 "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("write")]),e._v("\nP2 IO throughput "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" P2 "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("read")]),e._v(" + P2 "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("write")]),e._v("\nC2 IO throughput "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" C2 "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("read")]),e._v(" + C2 "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("write")]),e._v("\n")])])]),t("p",[e._v("SSD and NVMe are commonly used for sealing storages. To ensure effcient usage of these faster storage, it is recommended to use software RAID on these SSDs.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("mdadm")]),e._v(" -C /dev/md1 -l "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v(" -n "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(" /dev/sdb1 /dev/sdc1\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("mdadm")]),e._v(" -C /dev/md2 -l "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("5")]),e._v(" -n "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("6")]),e._v(" /dev/sd"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("b-g"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Options")]),e._v("\n-C, --create\nCreate a new array.\n-l, --level"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("\nSet RAID level. \n-n, --raid-devices"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("\nSpecify the number of active devices "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("in")]),e._v(" the array.\n-x, --spare-devices"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("\nSpecify the number of spare "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("eXtra"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v(" devices "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("in")]),e._v(" the initial array.\n-A, --assemble\nAssemble a pre-existing array.\n")])])]),t("p",[e._v("More on "),t("code",[e._v("mdadm")]),e._v(", please visit "),t("a",{attrs:{href:"http://raid.wiki.kernel.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1),e._v(". Get latest version from "),t("a",{attrs:{href:"http://www.kernel.org/pub/linux/utils/raid/mdadm/",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h3",{attrs:{id:"permenant-storage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#permenant-storage"}},[e._v("#")]),e._v(" Permenant storage")]),e._v(" "),t("p",[e._v("Possible adversaries to overcome when setting up permenant storage.")]),e._v(" "),t("ol",[t("li",[e._v("When a sector is sealed, it will be transferred from sealer to permenant storage which takes up network bandwidth and disk IOs.")]),e._v(" "),t("li",[e._v("During a "),t("code",[e._v("windowPost")]),e._v(", random selections files will be read in large number. Slow read may result in failed "),t("code",[e._v("windowPost")]),e._v(".")]),e._v(" "),t("li",[e._v("Choose high RAID level to have redunancy when possible. Eg, RAID5, RAID6, RAID10.")]),e._v(" "),t("li",[e._v("Monitor usage of your disk array.")])]),e._v(" "),t("h3",{attrs:{id:"network-transfer"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#network-transfer"}},[e._v("#")]),e._v(" Network transfer")]),e._v(" "),t("p",[e._v("During sealing, if you specialize your worker in one type of task (to increase efficiency of your resources), it will result in file transfer over the network. If file being copied too slowly over the network, it will drag the speed of your sealing pipeline down. Closely monitor your computation resources and see if there is any idling. For example, if PC2 takes 25 minutes, reads ~400G and writes ~100G, then IO throughput will be ~368 MB/s ("),t("code",[e._v("440 * 1024 / 25 / 60 + 100 * 1024 / 25 / 60")]),e._v(").")]),e._v(" "),t("p",[e._v("After sealing, the sealed sector need to be transferred to permanent storage which can be bottlenecked by the network bandwidth connecting your "),t("code",[e._v("venus-sealer")]),e._v(" and your HDD disk array.")]),e._v(" "),t("h3",{attrs:{id:"environment-variables"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#environment-variables"}},[e._v("#")]),e._v(" Environment variables")]),e._v(" "),t("p",[e._v("SHA extension would make a huge difference in computing P1 tasks. P1 could cost around 250 minutes with SHA extension enabled while may cost 420+ minutes without SHA.")]),e._v(" "),t("p",[e._v("When compiling "),t("code",[e._v("venus-sealer")]),e._v(", make sure you have set "),t("code",[e._v('RUSTFLAGS="-C target-cpu=native -g" FFI_BUILD_FROM_SOURCE="1"')]),e._v(" flags and you shall see the following example output.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("+ "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("trap")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'{ rm -f "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$__build_output_log_tmp")]),e._v("; }'")]),e._v(" EXIT\n+ "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("local")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'__rust_flags=--print native-static-libs -C target-feature=+sse2'")]),e._v("\n+ "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("RUSTFLAGS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'--print native-static-libs -C target-feature=+sse2'")]),e._v("\n+ cargo +nightly-2021-04-24 build --release --no-default-features --features multicore-sdr --features pairing,gpu\n+ "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("tee")]),e._v(" /tmp/tmp.IYtnd3xka9\n Compiling autocfg v1.0.1\n Compiling libc v0.2.97\n Compiling cfg-if v1.0.0\n Compiling proc-macro2 v1.0.27\n Compiling unicode-xid v0.2.2\n Compiling syn v1.0.73\n Compiling lazy_static v1.4.0\n Compiling cc v1.0.68\n Compiling typenum v1.13.0\n Compiling serde_derive v1.0.126\n Compiling serde v1.0.126\n")])])]),t("h3",{attrs:{id:"core-restriction"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#core-restriction"}},[e._v("#")]),e._v(" Core restriction")]),e._v(" "),t("p",[e._v("When running two types of tasks on same box, you may want to restrict CPU cores each task may use without competing for resources of the other.")]),e._v(" "),t("p",[e._v("Through "),t("code",[e._v("taskset")]),e._v(". Note you cannot dynamically change core restrictions during execution of the program.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("TRUST_PARAMS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("nohup")]),e._v(" taskset -c "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v("-32 ./venus-worker run\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Non-consecutive core selection ")]),e._v("\ntaskset -c "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v("-9,19-29,39-49\n")])])]),t("p",[e._v("Or through "),t("code",[e._v("Cgrep")]),e._v(", which supports dynamic core restrictions during program execution.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("mkdir")]),e._v(" -p /sys/fs/cgroup/cpuset/Pre1-worker\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("echo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v("-31 "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(">")]),e._v(" /sys/fs/cgroup/cpuset/Pre1-worker/cpuset.cpus\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("echo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("<")]),e._v("PID"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(">")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(">")]),e._v(" /sys/fs/cgroup/cpuset/Pre1-worker/cgroup.procs\n")])])]),t("h2",{attrs:{id:"worker-optimization"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#worker-optimization"}},[e._v("#")]),e._v(" Worker optimization")]),e._v(" "),t("p",[e._v("All numbers are for 32G sectors. For 64G sectors, double what the numbers of 32G sector.")]),e._v(" "),t("h3",{attrs:{id:"p1-optimization"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#p1-optimization"}},[e._v("#")]),e._v(" P1 optimization")]),e._v(" "),t("p",[e._v("Set following environment variable to speed up P1.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Store cache files in RAM; for 32G sectors, it will cost 56G RAM")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("FIL_PROOFS_MAXIMIZE_CACHING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v(" \n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Use mutiple cores for P1")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("FIL_PROOFS_USE_MULTICORE_SDR")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v("\n")])])]),t("p",[e._v("P1 RAM usage includes 56G cache file and 2 layers of the sector for each sector sealing in parallel.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Assume 10 sector running in parallel")]),e._v("\n56G + 32G * "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(" * "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("10")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" 696G\n")])])]),t("p",[e._v("P1 SSD usage includes 11 layers of the sector, 64G of "),t("code",[e._v("tree-d")]),e._v(" file and 32G of the unsealed sector.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# For 1 sector")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("11")]),e._v(" * 32G + "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("64")]),e._v(" + "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("32")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" 440G\n")])])]),t("h3",{attrs:{id:"p2-optimization"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#p2-optimization"}},[e._v("#")]),e._v(" P2 optimization")]),e._v(" "),t("p",[e._v("Set following environment variable to speed up P2.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Use GPU for tree-r-last")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("FIL_PROOFS_USE_GPU_COLUMN_BUILDER")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v(" \n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Use GPU for tree-c")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("FIL_PROOFS_USE_GPU_TREE_BUILDER")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v(" \n")])])]),t("p",[e._v("P2 RAM usage is 96G.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Assume 10 sector running in parallel")]),e._v("\n96G * "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("10")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" 960G\n")])])]),t("p",[e._v("P1 SSD usage includes 4.6G tree-c file * 8, 9.2M tree-r-last file * 8, 4K t_aux file, 4K p_aux file and 32G unsealed sector file.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token number"}},[e._v("4")]),e._v(".6G * "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("8")]),e._v(" + "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("8")]),e._v(" * "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("9")]),e._v(".2M + 4K * "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(" + 32G "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" ~70G\n")])])]),t("h3",{attrs:{id:"commit"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#commit"}},[e._v("#")]),e._v(" Commit")]),e._v(" "),t("p",[e._v("C1 cost little CPU usage, but require sum of P1 and P2 SSD usage.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("P1 440G + P2 79G "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" 519G\n")])])]),t("p",[e._v("C2 environment variable")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BELLMAN_NO_GPU")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Example, if you are using 3090")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("GPUBELLMAN_CUSTOM_GPU")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"GeForce RTX 3090:10496"')]),e._v(" \n")])])]),t("p",[e._v("C2 RAM usage.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("128G + 64G "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" 192G\n")])])]),t("h2",{attrs:{id:"optimize-sealing-pipeline"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#optimize-sealing-pipeline"}},[e._v("#")]),e._v(" Optimize sealing pipeline")]),e._v(" "),t("h3",{attrs:{id:"calculate-your-daily-growth"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#calculate-your-daily-growth"}},[e._v("#")]),e._v(" Calculate your daily growth")]),e._v(" "),t("p",[e._v("Calculate how many tasks your sealing pipeline can process.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# for each type of task")]),e._v("\ntasks "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("done")]),e._v(" / "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("time")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" production rate\ndaily production rate * "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("32G OR 64G"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" daily growth "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("in")]),e._v(" power\n")])])]),t("p",[e._v("For example, if we have one box and can finish P1 in 240 minutes, P2 in 30 minutes and Commit in 35 minutes, then you can derive daily growth by the following chart.")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("Task")]),e._v(" "),t("th",[e._v("Minute")]),e._v(" "),t("th",[e._v("Parallel")]),e._v(" "),t("th",[e._v("Hourly production rate")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("P1")]),e._v(" "),t("td",[e._v("240")]),e._v(" "),t("td",[e._v("1")]),e._v(" "),t("td",[e._v("0.25 = 1 / (240 /60)")])]),e._v(" "),t("tr",[t("td",[e._v("P2")]),e._v(" "),t("td",[e._v("30")]),e._v(" "),t("td",[e._v("1")]),e._v(" "),t("td",[e._v("2 = 1 / (30 /60)")])]),e._v(" "),t("tr",[t("td",[e._v("Commit")]),e._v(" "),t("td",[e._v("35")]),e._v(" "),t("td",[e._v("1")]),e._v(" "),t("td",[e._v("1.71 = 1 / (35 /60)")])])])]),e._v(" "),t("h3",{attrs:{id:"finding-optimal-task-configurations"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#finding-optimal-task-configurations"}},[e._v("#")]),e._v(" Finding optimal task configurations")]),e._v(" "),t("p",[e._v("From the table above, we know that daily growth will be bottlenecked by P1. Adjust number of parallel tasks for different types of task to achieve maximum efficiency.")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("Task")]),e._v(" "),t("th",[e._v("Minutes")]),e._v(" "),t("th",[e._v("Parallel")]),e._v(" "),t("th",[e._v("Hourly productin")]),e._v(" "),t("th",[e._v("Output")]),e._v(" "),t("th",[e._v("Memory consumption")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("P1")]),e._v(" "),t("td",[e._v("240")]),e._v(" "),t("td",[e._v("7")]),e._v(" "),t("td",[e._v("1.75 = 7 / (240 /60)")]),e._v(" "),t("td",[e._v("1344 G")]),e._v(" "),t("td",[e._v("504 G = 7*64+56")])]),e._v(" "),t("tr",[t("td",[e._v("P2")]),e._v(" "),t("td",[e._v("30")]),e._v(" "),t("td",[e._v("1")]),e._v(" "),t("td",[e._v("2 = 1 / (30 /60)")]),e._v(" "),t("td",[e._v("1536 G")]),e._v(" "),t("td",[e._v("96 G = 1*96")])]),e._v(" "),t("tr",[t("td",[e._v("Commit")]),e._v(" "),t("td",[e._v("35")]),e._v(" "),t("td",[e._v("1")]),e._v(" "),t("td",[e._v("1.71 = 1 / (35 /60)")]),e._v(" "),t("td",[e._v("1316 G")]),e._v(" "),t("td",[e._v("192 G = 1*128+64")])])])]),e._v(" "),t("p",[e._v("The goal is to have "),t("code",[e._v("output")]),e._v(" for each task to be as close as possilbe so that the sealing pipeline runs in its maximum efficiency. Things to watchout for includes...")]),e._v(" "),t("ol",[t("li",[t("code",[e._v("hourly production")]),e._v(" for Commit is lower than P1, which may result in tasks backlogged in Commit phase.")]),e._v(" "),t("li",[e._v("When one type of tasks being overly efficient than others, resources may become idle.")]),e._v(" "),t("li",[e._v("Miro management is needed to have highest possible efficiency.")])]),e._v(" "),t("h3",{attrs:{id:"finding-optimal-pledging"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#finding-optimal-pledging"}},[e._v("#")]),e._v(" Finding optimal pledging")]),e._v(" "),t("p",[e._v("For example, if you find 7 P1 task to the optimal for your system, change the following venus-sealer configurations.")]),e._v(" "),t("div",{staticClass:"language-toml extra-class"},[t("pre",{pre:!0,attrs:{class:"language-toml"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token table class-name"}},[e._v("Sealing")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v(" \n "),t("span",{pre:!0,attrs:{class:"token key property"}},[e._v("MaxSealingSectors")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v("\n")])])]),t("h2",{attrs:{id:"stop-loss"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#stop-loss"}},[e._v("#")]),e._v(" Stop-loss")]),e._v(" "),t("p",[e._v("If one of tasks fails too many times, manual intervention is needed to get sealing pipeline back to its normal output.")]),e._v(" "),t("p",[e._v("Remove sectors when you have the following issues.")]),e._v(" "),t("ol",[t("li",[e._v("Expired ticket")]),e._v(" "),t("li",[e._v("Expired Commit")]),e._v(" "),t("li",[e._v("Corrupted proof params")])]),e._v(" "),t("p",[e._v("To remove incomplete sectors.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("venus-sealer sectors remove --really-do-it "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("<")]),e._v("sectorNum"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(">")]),e._v("\n")])])])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{411:function(e,s,t){"use strict";t.r(s);var a=t(17),r=Object(a.a)({},(function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h2",{attrs:{id:"find-your-optimal-configurations"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#find-your-optimal-configurations"}},[e._v("#")]),e._v(" Find your optimal configurations")]),e._v(" "),t("p",[e._v("Get your filecoin mining operation up and running is hard. Expanding growth of your system is even harder. It will take a lot of time to scale growth and make sure your setup running without errors.")]),e._v(" "),t("h2",{attrs:{id:"overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#overview"}},[e._v("#")]),e._v(" Overview")]),e._v(" "),t("p",[e._v("General guidelines to follow when optimizing your sealing pipeline.")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("Pledge 2 to 4 sectors and record the exact time of each task (AP, P1, P2, C2) takes to finish")])]),e._v(" "),t("li",[t("p",[e._v("Make sure all your boxes have tasks assigned to them all the time")])]),e._v(" "),t("li",[t("p",[e._v("Automate your "),t("code",[e._v("sector pledge")]),e._v(" command with "),t("a",{attrs:{href:"https://filecoinproject.slack.com/archives/CPFTWMY7N/p1628092388117700?thread_ts=1628092099.117600&cid=CPFTWMY7N",target:"_blank",rel:"noopener noreferrer"}},[e._v("script"),t("OutboundLink")],1),e._v("/cron")])]),e._v(" "),t("li",[t("p",[e._v("Use "),t("code",[e._v("MaxSealingSectors")]),e._v(" to cap maximum number of sectors sealing in parallel")])]),e._v(" "),t("li",[t("p",[e._v("Every worker can be assigned with a subset of tasks (AP, P1, P2, C2) to specialize")])])]),e._v(" "),t("h2",{attrs:{id:"record-time-for-each-task"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#record-time-for-each-task"}},[e._v("#")]),e._v(" Record time for each task")]),e._v(" "),t("p",[e._v("Types of task that a worker can do.")]),e._v(" "),t("div",{staticClass:"language-go extra-class"},[t("pre",{pre:!0,attrs:{class:"language-go"}},[t("code",[e._v("TTAddPiece TaskType "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"seal/v0/addpiece"')]),e._v("\nTTPreCommit1 TaskType "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"seal/v0/precommit/1"')]),e._v("\nTTPreCommit2 TaskType "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"seal/v0/precommit/2"')]),e._v("\nTTCommit1 TaskType "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"seal/v0/commit/1"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("// NOTE: We use this to transfer the sector into miner-local storage for now; Don't use on workers!")]),e._v("\nTTCommit2 TaskType "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"seal/v0/commit/2"')]),e._v("\n\nTTFinalize TaskType "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"seal/v0/finalize"')]),e._v("\nTTFetch TaskType "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"seal/v0/fetch"')]),e._v("\nTTUnseal TaskType "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"seal/v0/unseal"')]),e._v("\n")])])]),t("p",[e._v("Each task shows up in log first with key word of "),t("code",[e._v("prepare")]),e._v(" (start and end) then with key word of "),t("code",[e._v("work")]),e._v(" as another log entry (also start and end).")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# seal/v0/fetch")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T14:00:07.925+0800 INFO advmgr sector-storage/sched_worker.go:401 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" prepare "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/fetch "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T14:05:36.772+0800 INFO advmgr sector-storage/sched_worker.go:403 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" prepare "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/fetch end "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T14:05:36.772+0800 INFO advmgr sector-storage/sched_worker.go:442 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" work "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/fetch "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T14:05:36.774+0800 INFO advmgr sector-storage/sched_worker.go:444 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" work "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/fetch end "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# seal/v0/addpiece")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:38:37.977+0800 INFO advmgr sector-storage/sched_worker.go:401 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("8")]),e._v(" prepare "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/addpiece "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:38:37.978+0800 INFO advmgr sector-storage/sched_worker.go:403 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("8")]),e._v(" prepare "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/addpiece end "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:38:37.978+0800 INFO advmgr sector-storage/sched_worker.go:442 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("8")]),e._v(" work "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/addpiece "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:44:26.295+0800 INFO advmgr sector-storage/sched_worker.go:444 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("8")]),e._v(" work "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/addpiece end "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# seal/v0/commit/2")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:26:02.119+0800 INFO advmgr sector-storage/sched_worker.go:401 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" prepare "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/commit/2 "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:26:02.119+0800 INFO advmgr sector-storage/sched_worker.go:403 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" prepare "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/commit/2 end "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:26:02.119+0800 INFO advmgr sector-storage/sched_worker.go:442 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" work "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/commit/2 "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:49:46.180+0800 INFO advmgr sector-storage/sched_worker.go:444 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" work "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/commit/2 end "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# seal/v0/finalize")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:54:17.414+0800 INFO advmgr sector-storage/sched_worker.go:401 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" prepare "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/finalize "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:59:30.471+0800 INFO advmgr sector-storage/sched_worker.go:403 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" prepare "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/finalize end "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T13:59:30.471+0800 INFO advmgr sector-storage/sched_worker.go:442 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" work "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/finalize "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2021")]),e._v("-08-03T14:00:07.915+0800 INFO advmgr sector-storage/sched_worker.go:444 Sector "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(" work "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("for")]),e._v(" seal/v0/finalize end "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v(".\n")])])]),t("p",[e._v("Some task may take more time in "),t("code",[e._v("prepare")]),e._v(" than"),t("code",[e._v("work")]),e._v(" and some are the other way around. Generally speaking, when task requires network transfer/bandwidth it will consume more time in "),t("code",[e._v("prepare")]),e._v(" while if the task require more computation resources it will consume more time in "),t("code",[e._v("work")]),e._v(". Eg, AP, P1, P2, C2.")]),e._v(" "),t("p",[e._v("To record time of core tasks like AP, P1, P2 and C2, we aggregate both the time of "),t("code",[e._v("fetch")]),e._v(" before it and the task itself. For example, time of P1 = time of P1 + time of fetch before P1.")]),e._v(" "),t("h2",{attrs:{id:"performance-factors"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#performance-factors"}},[e._v("#")]),e._v(" Performance factors")]),e._v(" "),t("p",[e._v("There are many factors cobtributes to the performance of your sealing pipeline.")]),e._v(" "),t("h3",{attrs:{id:"sealing-storage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sealing-storage"}},[e._v("#")]),e._v(" Sealing storage")]),e._v(" "),t("p",[e._v("During sealing of a sector, cahce files will be generated by the proof algorithm which requires high disk IO speed. Low IO speed may result in idling of your computation resources (CPUs/GPUs).")]),e._v(" "),t("p",[e._v("Choose apropriate hardware using forumla below.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("file")]),e._v(" size * number of parallel threads / operation "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("time")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" average "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("file")]),e._v(" IO speed\n")])])]),t("p",[e._v("To get more precise estimations, sum up per task IO throughput.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("AP IO throughput "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" AP "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("read")]),e._v(" + AP "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("write")]),e._v("\nP1 IO throughput "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" P1 "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("read")]),e._v(" + P1 "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("write")]),e._v("\nP2 IO throughput "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" P2 "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("read")]),e._v(" + P2 "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("write")]),e._v("\nC2 IO throughput "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" C2 "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("read")]),e._v(" + C2 "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("write")]),e._v("\n")])])]),t("p",[e._v("SSD and NVMe are commonly used for sealing storages. To ensure effcient usage of these faster storage, it is recommended to use software RAID on these SSDs.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("mdadm")]),e._v(" -C /dev/md1 -l "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v(" -n "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(" /dev/sdb1 /dev/sdc1\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("mdadm")]),e._v(" -C /dev/md2 -l "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("5")]),e._v(" -n "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("6")]),e._v(" /dev/sd"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("b-g"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Options")]),e._v("\n-C, --create\nCreate a new array.\n-l, --level"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("\nSet RAID level. \n-n, --raid-devices"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("\nSpecify the number of active devices "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("in")]),e._v(" the array.\n-x, --spare-devices"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("\nSpecify the number of spare "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("eXtra"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v(" devices "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("in")]),e._v(" the initial array.\n-A, --assemble\nAssemble a pre-existing array.\n")])])]),t("p",[e._v("More on "),t("code",[e._v("mdadm")]),e._v(", please visit "),t("a",{attrs:{href:"http://raid.wiki.kernel.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1),e._v(". Get latest version from "),t("a",{attrs:{href:"http://www.kernel.org/pub/linux/utils/raid/mdadm/",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h3",{attrs:{id:"permenant-storage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#permenant-storage"}},[e._v("#")]),e._v(" Permenant storage")]),e._v(" "),t("p",[e._v("Possible adversaries to overcome when setting up permenant storage.")]),e._v(" "),t("ol",[t("li",[e._v("When a sector is sealed, it will be transferred from sealer to permenant storage which takes up network bandwidth and disk IOs.")]),e._v(" "),t("li",[e._v("During a "),t("code",[e._v("windowPost")]),e._v(", random selections files will be read in large number. Slow read may result in failed "),t("code",[e._v("windowPost")]),e._v(".")]),e._v(" "),t("li",[e._v("Choose high RAID level to have redunancy when possible. Eg, RAID5, RAID6, RAID10.")]),e._v(" "),t("li",[e._v("Monitor usage of your disk array.")])]),e._v(" "),t("h3",{attrs:{id:"network-transfer"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#network-transfer"}},[e._v("#")]),e._v(" Network transfer")]),e._v(" "),t("p",[e._v("During sealing, if you specialize your worker in one type of task (to increase efficiency of your resources), it will result in file transfer over the network. If file being copied too slowly over the network, it will drag the speed of your sealing pipeline down. Closely monitor your computation resources and see if there is any idling. For example, if PC2 takes 25 minutes, reads ~400G and writes ~100G, then IO throughput will be ~368 MB/s ("),t("code",[e._v("440 * 1024 / 25 / 60 + 100 * 1024 / 25 / 60")]),e._v(").")]),e._v(" "),t("p",[e._v("After sealing, the sealed sector need to be transferred to permanent storage which can be bottlenecked by the network bandwidth connecting your "),t("code",[e._v("venus-sealer")]),e._v(" and your HDD disk array.")]),e._v(" "),t("h3",{attrs:{id:"environment-variables"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#environment-variables"}},[e._v("#")]),e._v(" Environment variables")]),e._v(" "),t("p",[e._v("SHA extension would make a huge difference in computing P1 tasks. P1 could cost around 250 minutes with SHA extension enabled while may cost 420+ minutes without SHA.")]),e._v(" "),t("p",[e._v("When compiling "),t("code",[e._v("venus-sealer")]),e._v(", make sure you have set "),t("code",[e._v('RUSTFLAGS="-C target-cpu=native -g" FFI_BUILD_FROM_SOURCE="1"')]),e._v(" flags and you shall see the following example output.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("+ "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("trap")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'{ rm -f "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$__build_output_log_tmp")]),e._v("; }'")]),e._v(" EXIT\n+ "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("local")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'__rust_flags=--print native-static-libs -C target-feature=+sse2'")]),e._v("\n+ "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("RUSTFLAGS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'--print native-static-libs -C target-feature=+sse2'")]),e._v("\n+ cargo +nightly-2021-04-24 build --release --no-default-features --features multicore-sdr --features pairing,gpu\n+ "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("tee")]),e._v(" /tmp/tmp.IYtnd3xka9\n Compiling autocfg v1.0.1\n Compiling libc v0.2.97\n Compiling cfg-if v1.0.0\n Compiling proc-macro2 v1.0.27\n Compiling unicode-xid v0.2.2\n Compiling syn v1.0.73\n Compiling lazy_static v1.4.0\n Compiling cc v1.0.68\n Compiling typenum v1.13.0\n Compiling serde_derive v1.0.126\n Compiling serde v1.0.126\n")])])]),t("h3",{attrs:{id:"core-restriction"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#core-restriction"}},[e._v("#")]),e._v(" Core restriction")]),e._v(" "),t("p",[e._v("When running two types of tasks on same box, you may want to restrict CPU cores each task may use without competing for resources of the other.")]),e._v(" "),t("p",[e._v("Through "),t("code",[e._v("taskset")]),e._v(". Note you cannot dynamically change core restrictions during execution of the program.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("TRUST_PARAMS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("nohup")]),e._v(" taskset -c "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v("-32 ./venus-worker run\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Non-consecutive core selection ")]),e._v("\ntaskset -c "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v("-9,19-29,39-49\n")])])]),t("p",[e._v("Or through "),t("code",[e._v("Cgrep")]),e._v(", which supports dynamic core restrictions during program execution.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("mkdir")]),e._v(" -p /sys/fs/cgroup/cpuset/Pre1-worker\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("echo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v("-31 "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(">")]),e._v(" /sys/fs/cgroup/cpuset/Pre1-worker/cpuset.cpus\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("echo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("<")]),e._v("PID"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(">")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(">")]),e._v(" /sys/fs/cgroup/cpuset/Pre1-worker/cgroup.procs\n")])])]),t("h2",{attrs:{id:"worker-optimization"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#worker-optimization"}},[e._v("#")]),e._v(" Worker optimization")]),e._v(" "),t("p",[e._v("All numbers are for 32G sectors. For 64G sectors, double what the numbers of 32G sector.")]),e._v(" "),t("h3",{attrs:{id:"p1-optimization"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#p1-optimization"}},[e._v("#")]),e._v(" P1 optimization")]),e._v(" "),t("p",[e._v("Set following environment variable to speed up P1.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Store cache files in RAM; for 32G sectors, it will cost 56G RAM")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("FIL_PROOFS_MAXIMIZE_CACHING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v(" \n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Use mutiple cores for P1")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("FIL_PROOFS_USE_MULTICORE_SDR")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v("\n")])])]),t("p",[e._v("P1 RAM usage includes 56G cache file and 2 layers of the sector for each sector sealing in parallel.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Assume 10 sector running in parallel")]),e._v("\n56G + 32G * "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(" * "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("10")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" 696G\n")])])]),t("p",[e._v("P1 SSD usage includes 11 layers of the sector, 64G of "),t("code",[e._v("tree-d")]),e._v(" file and 32G of the unsealed sector.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# For 1 sector")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("11")]),e._v(" * 32G + "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("64")]),e._v(" + "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("32")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" 440G\n")])])]),t("h3",{attrs:{id:"p2-optimization"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#p2-optimization"}},[e._v("#")]),e._v(" P2 optimization")]),e._v(" "),t("p",[e._v("Set following environment variable to speed up P2.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Use GPU for tree-r-last")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("FIL_PROOFS_USE_GPU_COLUMN_BUILDER")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v(" \n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Use GPU for tree-c")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("FIL_PROOFS_USE_GPU_TREE_BUILDER")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v(" \n")])])]),t("p",[e._v("P2 RAM usage is 96G.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Assume 10 sector running in parallel")]),e._v("\n96G * "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("10")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" 960G\n")])])]),t("p",[e._v("P1 SSD usage includes 4.6G tree-c file * 8, 9.2M tree-r-last file * 8, 4K t_aux file, 4K p_aux file and 32G unsealed sector file.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token number"}},[e._v("4")]),e._v(".6G * "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("8")]),e._v(" + "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("8")]),e._v(" * "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("9")]),e._v(".2M + 4K * "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(" + 32G "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" ~70G\n")])])]),t("h3",{attrs:{id:"commit"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#commit"}},[e._v("#")]),e._v(" Commit")]),e._v(" "),t("p",[e._v("C1 cost little CPU usage, but require sum of P1 and P2 SSD usage.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("P1 440G + P2 79G "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" 519G\n")])])]),t("p",[e._v("C2 environment variable")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BELLMAN_NO_GPU")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Example, if you are using 3090")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("GPUBELLMAN_CUSTOM_GPU")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"GeForce RTX 3090:10496"')]),e._v(" \n")])])]),t("p",[e._v("C2 RAM usage.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("128G + 64G "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" 192G\n")])])]),t("h2",{attrs:{id:"optimize-sealing-pipeline"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#optimize-sealing-pipeline"}},[e._v("#")]),e._v(" Optimize sealing pipeline")]),e._v(" "),t("h3",{attrs:{id:"calculate-your-daily-growth"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#calculate-your-daily-growth"}},[e._v("#")]),e._v(" Calculate your daily growth")]),e._v(" "),t("p",[e._v("Calculate how many tasks your sealing pipeline can process.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# for each type of task")]),e._v("\ntasks "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("done")]),e._v(" / "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("time")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" production rate\ndaily production rate * "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("32G OR 64G"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" daily growth "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("in")]),e._v(" power\n")])])]),t("p",[e._v("For example, if we have one box and can finish P1 in 240 minutes, P2 in 30 minutes and Commit in 35 minutes, then you can derive daily growth by the following chart.")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("Task")]),e._v(" "),t("th",[e._v("Minute")]),e._v(" "),t("th",[e._v("Parallel")]),e._v(" "),t("th",[e._v("Hourly production rate")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("P1")]),e._v(" "),t("td",[e._v("240")]),e._v(" "),t("td",[e._v("1")]),e._v(" "),t("td",[e._v("0.25 = 1 / (240 /60)")])]),e._v(" "),t("tr",[t("td",[e._v("P2")]),e._v(" "),t("td",[e._v("30")]),e._v(" "),t("td",[e._v("1")]),e._v(" "),t("td",[e._v("2 = 1 / (30 /60)")])]),e._v(" "),t("tr",[t("td",[e._v("Commit")]),e._v(" "),t("td",[e._v("35")]),e._v(" "),t("td",[e._v("1")]),e._v(" "),t("td",[e._v("1.71 = 1 / (35 /60)")])])])]),e._v(" "),t("h3",{attrs:{id:"finding-optimal-task-configurations"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#finding-optimal-task-configurations"}},[e._v("#")]),e._v(" Finding optimal task configurations")]),e._v(" "),t("p",[e._v("From the table above, we know that daily growth will be bottlenecked by P1. Adjust number of parallel tasks for different types of task to achieve maximum efficiency.")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("Task")]),e._v(" "),t("th",[e._v("Minutes")]),e._v(" "),t("th",[e._v("Parallel")]),e._v(" "),t("th",[e._v("Hourly productin")]),e._v(" "),t("th",[e._v("Output")]),e._v(" "),t("th",[e._v("Memory consumption")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("P1")]),e._v(" "),t("td",[e._v("240")]),e._v(" "),t("td",[e._v("7")]),e._v(" "),t("td",[e._v("1.75 = 7 / (240 /60)")]),e._v(" "),t("td",[e._v("1344 G")]),e._v(" "),t("td",[e._v("504 G = 7*64+56")])]),e._v(" "),t("tr",[t("td",[e._v("P2")]),e._v(" "),t("td",[e._v("30")]),e._v(" "),t("td",[e._v("1")]),e._v(" "),t("td",[e._v("2 = 1 / (30 /60)")]),e._v(" "),t("td",[e._v("1536 G")]),e._v(" "),t("td",[e._v("96 G = 1*96")])]),e._v(" "),t("tr",[t("td",[e._v("Commit")]),e._v(" "),t("td",[e._v("35")]),e._v(" "),t("td",[e._v("1")]),e._v(" "),t("td",[e._v("1.71 = 1 / (35 /60)")]),e._v(" "),t("td",[e._v("1316 G")]),e._v(" "),t("td",[e._v("192 G = 1*128+64")])])])]),e._v(" "),t("p",[e._v("The goal is to have "),t("code",[e._v("output")]),e._v(" for each task to be as close as possilbe so that the sealing pipeline runs in its maximum efficiency. Things to watchout for includes...")]),e._v(" "),t("ol",[t("li",[t("code",[e._v("hourly production")]),e._v(" for Commit is lower than P1, which may result in tasks backlogged in Commit phase.")]),e._v(" "),t("li",[e._v("When one type of tasks being overly efficient than others, resources may become idle.")]),e._v(" "),t("li",[e._v("Miro management is needed to have highest possible efficiency.")])]),e._v(" "),t("h3",{attrs:{id:"finding-optimal-pledging"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#finding-optimal-pledging"}},[e._v("#")]),e._v(" Finding optimal pledging")]),e._v(" "),t("p",[e._v("For example, if you find 7 P1 task to the optimal for your system, change the following venus-sealer configurations.")]),e._v(" "),t("div",{staticClass:"language-toml extra-class"},[t("pre",{pre:!0,attrs:{class:"language-toml"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token table class-name"}},[e._v("Sealing")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v(" \n "),t("span",{pre:!0,attrs:{class:"token key property"}},[e._v("MaxSealingSectors")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v("\n")])])]),t("h2",{attrs:{id:"stop-loss"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#stop-loss"}},[e._v("#")]),e._v(" Stop-loss")]),e._v(" "),t("p",[e._v("If one of tasks fails too many times, manual intervention is needed to get sealing pipeline back to its normal output.")]),e._v(" "),t("p",[e._v("Remove sectors when you have the following issues.")]),e._v(" "),t("ol",[t("li",[e._v("Expired ticket")]),e._v(" "),t("li",[e._v("Expired Commit")]),e._v(" "),t("li",[e._v("Corrupted proof params")])]),e._v(" "),t("p",[e._v("To remove incomplete sectors.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("venus-sealer sectors remove --really-do-it "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("<")]),e._v("sectorNum"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(">")]),e._v("\n")])])])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/26.b79cdbaa.js b/assets/js/26.12b704e6.js similarity index 99% rename from assets/js/26.b79cdbaa.js rename to assets/js/26.12b704e6.js index 39d781bd1..dd3d7fe8b 100644 --- a/assets/js/26.b79cdbaa.js +++ b/assets/js/26.12b704e6.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{411:function(a,s,t){"use strict";t.r(s);var e=t(17),n=Object(e.a)({},(function(){var a=this,s=a.$createElement,t=a._self._c||s;return t("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[t("h2",{attrs:{id:"initial-setup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#initial-setup"}},[a._v("#")]),a._v(" Initial setup")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ systemctl stop firewalld \n$ systemctl disbale firewalld\n$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" /etc/selinux/config\n\n$ "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("SELINUX")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("disabled "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# change selinux to disabled")]),a._v("\n$ setenforce "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("0")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# temporarily change selinux status")]),a._v("\n$ getenforce "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# check selinux status")]),a._v("\n")])])]),t("h2",{attrs:{id:"install-software-dependencies"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-software-dependencies"}},[a._v("#")]),a._v(" Install software dependencies")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("rpm")]),a._v(" -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm\n$ yum clean all "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("&&")]),a._v(" yum makecache\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Install zabbix-server and zabbix-agent")]),a._v("\n$ yum "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" zabbix-server-mysql zabbix-agent -y\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Install zabbix-ready nginx")]),a._v("\n$ yum "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" centos-release-scl -y\n$ yum "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" rh-php72-php-mysqlnd zabbix-nginx-conf-scl -y\n")])])]),t("p",[a._v("Change zabbix configurations and start Web GUI.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" /etc/yum.repos.d/zabbix.repo \n")])])]),t("div",{staticClass:"language-toml extra-class"},[t("pre",{pre:!0,attrs:{class:"language-toml"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("[")]),t("span",{pre:!0,attrs:{class:"token table class-name"}},[a._v("zabbix-frontend")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("]")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token key property"}},[a._v("name")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("=")]),a._v("Zabbix Official Repository frontend - $basearch\n "),t("span",{pre:!0,attrs:{class:"token key property"}},[a._v("baseurl")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("=")]),a._v("http://repo"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(".")]),a._v("zabbix"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(".")]),a._v("com/zabbix/"),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("5.0")]),a._v("/rhel/"),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("7")]),a._v("/$basearch/frontend\n "),t("span",{pre:!0,attrs:{class:"token key property"}},[a._v("enabled")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("1")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# change to 1")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token key property"}},[a._v("gpgcheck")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("1")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token key property"}},[a._v("gpgkey")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("=")]),a._v("file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591\n")])])]),t("h2",{attrs:{id:"install-mysql"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-mysql"}},[a._v("#")]),a._v(" Install MySQL")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mkdir")]),a._v(" mysql-dir\n$ "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" mysql-dir\n$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("wget")]),a._v(" https://downloads.mysql.com/archives/get/p/23/file/mysql-5.7.30-1.el7.x86_64.rpm-bundle.tar\n$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("tar")]),a._v(" -zxvf mysql-5.7.32-1.el7.x86_64.rpm-bundle.tar\n$ yum "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" *.rpm -y\n")])])]),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ systemctl start mysqld\n")])])]),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("cat")]),a._v(" /var/log/mysqld.log "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("grep")]),a._v(" root\n")])])]),t("p",[a._v("Grep default password.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token number"}},[a._v("2021")]),a._v("-07-26T10:50:49.538494Z "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("1")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("[")]),a._v("Note"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("]")]),a._v(" A temporary password is generated "),t("span",{pre:!0,attrs:{class:"token keyword"}},[a._v("for")]),a._v(" root@localhost: **20yyk:Ar67S"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("**\n")])])]),t("p",[a._v("Login to database.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ mysql -uroot -p\nEnter password: 20yyk:Ar67S"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\n")])])]),t("p",[a._v("Config database.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("set")]),a._v(" global "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("validate_password_policy")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("0")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("set")]),a._v(" global "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("validate_password_length")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("1")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\nalter user "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'root'")]),a._v("@"),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'localhost'")]),a._v(" identified by "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'venus'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Change root password ")]),a._v("\n\nuse mysql"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\nupdate user "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("set")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("host")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'%'")]),a._v(" where user "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'root'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\ncreate user "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'zabbix'")]),a._v("@"),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'%'")]),a._v(" identified by "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'123456'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\ngrant all privileges on zabbix.* to "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'zabbix'")]),a._v("@"),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'%'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\nflush privileges"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Create tables for Zabbix ")]),a._v("\ncreate database zabbix character "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("set")]),a._v(" utf8 collate utf8_bin"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\n")])])]),t("p",[a._v("Import zabbix template files.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ zcat /usr/share/doc/zabbix-server-mysql-5.0.14/create.sql.gz "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" mysql -uzabbix -p123456 zabbix\n")])])]),t("h2",{attrs:{id:"configure-zabbix"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configure-zabbix"}},[a._v("#")]),a._v(" Configure zabbix")]),a._v(" "),t("p",[a._v("Change database password.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" /etc/zabbix/zabbix_server.conf\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("DBPassword")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("123456")]),a._v("\n")])])]),t("p",[a._v("Configure Nginx.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf\n")])])]),t("p",[a._v("Append "),t("code",[a._v("nginx")]),a._v(" at the end of line 6.")]),a._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[a._v("listen.acl_users = apache,nginx\n")])])]),t("p",[a._v("Change location to your choice at line 24.")]),a._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[a._v("php_value[date.timezone] = Asia/shanghai\n")])])]),t("p",[a._v("Configure port.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" /etc/opt/rh/rh-nginx116/nginx/conf.d/zabbix.conf\nserver "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("{")]),a._v("\n listen "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("80")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# uncomment this line ")]),a._v("\n server_name test.zabbix.com"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# uncomment and change to your own ip")]),a._v("\n")])])]),t("p",[a._v("Change your hosts file too if using hostname.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" /etc/hosts\n"),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("192.168")]),a._v(".xx.xx test.zabbix.com\n")])])]),t("p",[a._v("If you are using windows.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# for window hosts")]),a._v("\nC:"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("Windows"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("System32"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("drivers"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("etc"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("hosts\n"),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("192.168")]),a._v(".xxx.xxx test.zabbix.com \n")])])]),t("p",[a._v("Start service and configure to run on boot.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("systemctl restart zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm\nsystemctl "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("enable")]),a._v(" zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm\n")])])]),t("p",[a._v("Change zabbix agent config fie")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("cat")]),a._v(" /etc/zabbix/zabbix_agentd.conf "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("egrep")]),a._v(" -v "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"^$|^#"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("PidFile")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("/var/run/zabbix/zabbix_agentd.pid\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("LogFile")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("/var/log/zabbix/zabbix_agentd.log\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("LogFileSize")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("0")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("Server")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("192.168")]),a._v(".88.11 "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# point to ip of zabbix-server")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("Hostname")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("venus-sealer\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("Include")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("/etc/zabbix/zabbix_agentd.d/*.conf\n")])])]),t("h2",{attrs:{id:"configure-monitoring"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configure-monitoring"}},[a._v("#")]),a._v(" Configure monitoring")]),a._v(" "),t("p",[a._v("Visit your zabbix-server with a browser.\n"),t("img",{attrs:{src:"/01-zabbix-install.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/02-zabbix-install.jpg",alt:""}})]),a._v(" "),t("p",[a._v("Configure database connection information.\n"),t("img",{attrs:{src:"/03-zabbix-config.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/04-zabbix-hostname.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/05-zabbix-all.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/06-zabbix-finished.jpg",alt:""}})]),a._v(" "),t("p",[a._v("Login to zabbix. Default user is "),t("code",[a._v("Admin")]),a._v(" with "),t("code",[a._v("zabbix")]),a._v(" as password.\n"),t("img",{attrs:{src:"/07-zabbix-login.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/08-zabbix-dashboard.jpg",alt:""}})]),a._v(" "),t("p",[a._v("Add zabbix-agent.\n"),t("img",{attrs:{src:"/09-zabbix-agent.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/10-zabbix-agent-add.jpg",alt:""}})]),a._v(" "),t("p",[a._v("Check zabbix RAM usage.\n"),t("img",{attrs:{src:"/11-zabbix-graphs.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/12-zabbix-memory.jpg",alt:""}})]),a._v(" "),t("p",[a._v("Check problems in dashboard.\n"),t("img",{attrs:{src:"/13-Alarm-information.jpg",alt:""}})])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{409:function(a,s,t){"use strict";t.r(s);var e=t(17),n=Object(e.a)({},(function(){var a=this,s=a.$createElement,t=a._self._c||s;return t("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[t("h2",{attrs:{id:"initial-setup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#initial-setup"}},[a._v("#")]),a._v(" Initial setup")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ systemctl stop firewalld \n$ systemctl disbale firewalld\n$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" /etc/selinux/config\n\n$ "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("SELINUX")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("disabled "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# change selinux to disabled")]),a._v("\n$ setenforce "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("0")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# temporarily change selinux status")]),a._v("\n$ getenforce "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# check selinux status")]),a._v("\n")])])]),t("h2",{attrs:{id:"install-software-dependencies"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-software-dependencies"}},[a._v("#")]),a._v(" Install software dependencies")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("rpm")]),a._v(" -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm\n$ yum clean all "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("&&")]),a._v(" yum makecache\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Install zabbix-server and zabbix-agent")]),a._v("\n$ yum "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" zabbix-server-mysql zabbix-agent -y\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Install zabbix-ready nginx")]),a._v("\n$ yum "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" centos-release-scl -y\n$ yum "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" rh-php72-php-mysqlnd zabbix-nginx-conf-scl -y\n")])])]),t("p",[a._v("Change zabbix configurations and start Web GUI.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" /etc/yum.repos.d/zabbix.repo \n")])])]),t("div",{staticClass:"language-toml extra-class"},[t("pre",{pre:!0,attrs:{class:"language-toml"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("[")]),t("span",{pre:!0,attrs:{class:"token table class-name"}},[a._v("zabbix-frontend")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("]")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token key property"}},[a._v("name")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("=")]),a._v("Zabbix Official Repository frontend - $basearch\n "),t("span",{pre:!0,attrs:{class:"token key property"}},[a._v("baseurl")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("=")]),a._v("http://repo"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(".")]),a._v("zabbix"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(".")]),a._v("com/zabbix/"),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("5.0")]),a._v("/rhel/"),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("7")]),a._v("/$basearch/frontend\n "),t("span",{pre:!0,attrs:{class:"token key property"}},[a._v("enabled")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("1")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# change to 1")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token key property"}},[a._v("gpgcheck")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("1")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token key property"}},[a._v("gpgkey")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("=")]),a._v("file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591\n")])])]),t("h2",{attrs:{id:"install-mysql"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-mysql"}},[a._v("#")]),a._v(" Install MySQL")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mkdir")]),a._v(" mysql-dir\n$ "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" mysql-dir\n$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("wget")]),a._v(" https://downloads.mysql.com/archives/get/p/23/file/mysql-5.7.30-1.el7.x86_64.rpm-bundle.tar\n$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("tar")]),a._v(" -zxvf mysql-5.7.32-1.el7.x86_64.rpm-bundle.tar\n$ yum "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" *.rpm -y\n")])])]),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ systemctl start mysqld\n")])])]),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("cat")]),a._v(" /var/log/mysqld.log "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("grep")]),a._v(" root\n")])])]),t("p",[a._v("Grep default password.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token number"}},[a._v("2021")]),a._v("-07-26T10:50:49.538494Z "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("1")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("[")]),a._v("Note"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("]")]),a._v(" A temporary password is generated "),t("span",{pre:!0,attrs:{class:"token keyword"}},[a._v("for")]),a._v(" root@localhost: **20yyk:Ar67S"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("**\n")])])]),t("p",[a._v("Login to database.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ mysql -uroot -p\nEnter password: 20yyk:Ar67S"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\n")])])]),t("p",[a._v("Config database.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("set")]),a._v(" global "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("validate_password_policy")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("0")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("set")]),a._v(" global "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("validate_password_length")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("1")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\nalter user "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'root'")]),a._v("@"),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'localhost'")]),a._v(" identified by "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'venus'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Change root password ")]),a._v("\n\nuse mysql"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\nupdate user "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("set")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("host")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'%'")]),a._v(" where user "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'root'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\ncreate user "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'zabbix'")]),a._v("@"),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'%'")]),a._v(" identified by "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'123456'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\ngrant all privileges on zabbix.* to "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'zabbix'")]),a._v("@"),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'%'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\nflush privileges"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Create tables for Zabbix ")]),a._v("\ncreate database zabbix character "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("set")]),a._v(" utf8 collate utf8_bin"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\n")])])]),t("p",[a._v("Import zabbix template files.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ zcat /usr/share/doc/zabbix-server-mysql-5.0.14/create.sql.gz "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" mysql -uzabbix -p123456 zabbix\n")])])]),t("h2",{attrs:{id:"configure-zabbix"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configure-zabbix"}},[a._v("#")]),a._v(" Configure zabbix")]),a._v(" "),t("p",[a._v("Change database password.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" /etc/zabbix/zabbix_server.conf\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("DBPassword")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("123456")]),a._v("\n")])])]),t("p",[a._v("Configure Nginx.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf\n")])])]),t("p",[a._v("Append "),t("code",[a._v("nginx")]),a._v(" at the end of line 6.")]),a._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[a._v("listen.acl_users = apache,nginx\n")])])]),t("p",[a._v("Change location to your choice at line 24.")]),a._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[a._v("php_value[date.timezone] = Asia/shanghai\n")])])]),t("p",[a._v("Configure port.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" /etc/opt/rh/rh-nginx116/nginx/conf.d/zabbix.conf\nserver "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("{")]),a._v("\n listen "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("80")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# uncomment this line ")]),a._v("\n server_name test.zabbix.com"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# uncomment and change to your own ip")]),a._v("\n")])])]),t("p",[a._v("Change your hosts file too if using hostname.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" /etc/hosts\n"),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("192.168")]),a._v(".xx.xx test.zabbix.com\n")])])]),t("p",[a._v("If you are using windows.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# for window hosts")]),a._v("\nC:"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("Windows"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("System32"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("drivers"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("etc"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("hosts\n"),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("192.168")]),a._v(".xxx.xxx test.zabbix.com \n")])])]),t("p",[a._v("Start service and configure to run on boot.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("systemctl restart zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm\nsystemctl "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("enable")]),a._v(" zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm\n")])])]),t("p",[a._v("Change zabbix agent config fie")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("$ "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("cat")]),a._v(" /etc/zabbix/zabbix_agentd.conf "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("egrep")]),a._v(" -v "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"^$|^#"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("PidFile")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("/var/run/zabbix/zabbix_agentd.pid\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("LogFile")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("/var/log/zabbix/zabbix_agentd.log\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("LogFileSize")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("0")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("Server")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("192.168")]),a._v(".88.11 "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# point to ip of zabbix-server")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("Hostname")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("venus-sealer\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("Include")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("/etc/zabbix/zabbix_agentd.d/*.conf\n")])])]),t("h2",{attrs:{id:"configure-monitoring"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configure-monitoring"}},[a._v("#")]),a._v(" Configure monitoring")]),a._v(" "),t("p",[a._v("Visit your zabbix-server with a browser.\n"),t("img",{attrs:{src:"/01-zabbix-install.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/02-zabbix-install.jpg",alt:""}})]),a._v(" "),t("p",[a._v("Configure database connection information.\n"),t("img",{attrs:{src:"/03-zabbix-config.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/04-zabbix-hostname.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/05-zabbix-all.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/06-zabbix-finished.jpg",alt:""}})]),a._v(" "),t("p",[a._v("Login to zabbix. Default user is "),t("code",[a._v("Admin")]),a._v(" with "),t("code",[a._v("zabbix")]),a._v(" as password.\n"),t("img",{attrs:{src:"/07-zabbix-login.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/08-zabbix-dashboard.jpg",alt:""}})]),a._v(" "),t("p",[a._v("Add zabbix-agent.\n"),t("img",{attrs:{src:"/09-zabbix-agent.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/10-zabbix-agent-add.jpg",alt:""}})]),a._v(" "),t("p",[a._v("Check zabbix RAM usage.\n"),t("img",{attrs:{src:"/11-zabbix-graphs.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/12-zabbix-memory.jpg",alt:""}})]),a._v(" "),t("p",[a._v("Check problems in dashboard.\n"),t("img",{attrs:{src:"/13-Alarm-information.jpg",alt:""}})])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/42.32aa56b0.js b/assets/js/42.b1f9b5f4.js similarity index 99% rename from assets/js/42.32aa56b0.js rename to assets/js/42.b1f9b5f4.js index a2c45ec21..9c8a4969a 100644 --- a/assets/js/42.32aa56b0.js +++ b/assets/js/42.b1f9b5f4.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[42],{431:function(t,s,a){"use strict";a.r(s);var e=a(17),r=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"venus-集群最大化利用资源增长算力方案"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-集群最大化利用资源增长算力方案"}},[t._v("#")]),t._v(" Venus-集群最大化利用资源增长算力方案")]),t._v(" "),a("p",[t._v("   在 Filecoin 的网络中,算力大小至关重要,与矿工的收入息息相关。算力的增长与维持需要软硬件资源较多,每个扇区的密封需要 P1、P2、C1,C2 等\n诸多过程,并且每个过程所依赖的资源各不相同,如:P1 偏向多核 CPU,P4 可用 GPU 优化等。故如何找出能最大化利用现有资源提升算力的方案是一个复杂的过程。这篇文章为如何找出最优方案提供一些思路。")]),t._v(" "),a("h2",{attrs:{id:"总体思路"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#总体思路"}},[t._v("#")]),t._v(" 总体思路")]),t._v(" "),a("blockquote",[a("p",[t._v("本文方案是通过各个阶段的任务耗时来推算如何均衡的分配各阶段任务的机器数量占比")])]),t._v(" "),a("ul",[a("li",[t._v("根据实际场景,将所有加速配置都打开,做几个 sector,统计每个阶段任务耗时。每个阶段对硬件资源的的依赖如下:\n"),a("ul",[a("li",[t._v("P1:cpu 及磁盘 io")])]),t._v(" "),a("ul",[a("li",[t._v("P2:cpu,gpu,带宽及磁盘 io")]),t._v(" "),a("li",[t._v("C1-C2:cpu,gpu,带宽及磁盘 io")])])])]),t._v(" "),a("blockquote",[a("p",[t._v("这里多做几个是为了统计出较稳定的耗时,此阶段需保持加速设置及软硬件资源始终不变。")])]),t._v(" "),a("ul",[a("li",[a("p",[t._v("维持任务数平衡,即每个机器都有任何时刻都有任务可做,理论上每个阶段任务数与耗时成反比;")])]),t._v(" "),a("li",[a("p",[t._v("扇区任务由 pledge 命令控制,配合最大并发密封扇区数(MaxSealingSectors)管理集群中 sector 并发数量;")])]),t._v(" "),a("li",[a("p",[t._v("每个 worker 可以指定可接受的任务类型。")])])]),t._v(" "),a("h2",{attrs:{id:"任务耗时统计"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#任务耗时统计"}},[t._v("#")]),t._v(" 任务耗时统计")]),t._v(" "),a("p",[t._v("   worker 可以领取的任务类型有:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('TTAddPiece TaskType = "seal/v0/addpiece"\nTTPreCommit1 TaskType = "seal/v0/precommit/1"\nTTPreCommit2 TaskType = "seal/v0/precommit/2"\nTTCommit1 TaskType = "seal/v0/commit/1" // NOTE: We use this to transfer the sector into miner-local storage for now; Don\'t use on workers!\nTTCommit2 TaskType = "seal/v0/commit/2"\n\nTTFinalize TaskType = "seal/v0/finalize"\n\nTTFetch TaskType = "seal/v0/fetch"\nTTUnseal TaskType = "seal/v0/unseal"\n\n')])])]),a("p",[t._v("   每个任务都分为两个阶段:prepare 阶段和 worker 阶段,在日志中表现为:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("# seal/v0/fetch\n2021-08-03T14:00:07.925+0800 INFO advmgr sector-storage/sched_worker.go:401 Sector 7 prepare for seal/v0/fetch ...\n2021-08-03T14:05:36.772+0800 INFO advmgr sector-storage/sched_worker.go:403 Sector 7 prepare for seal/v0/fetch end ...\n\n2021-08-03T14:05:36.772+0800 INFO advmgr sector-storage/sched_worker.go:442 Sector 7 work for seal/v0/fetch ...\n2021-08-03T14:05:36.774+0800 INFO advmgr sector-storage/sched_worker.go:444 Sector 7 work for seal/v0/fetch end ...\n\n# seal/v0/addpiece\n2021-08-03T13:38:37.977+0800 INFO advmgr sector-storage/sched_worker.go:401 Sector 8 prepare for seal/v0/addpiece ...\n2021-08-03T13:38:37.978+0800 INFO advmgr sector-storage/sched_worker.go:403 Sector 8 prepare for seal/v0/addpiece end ...\n\n2021-08-03T13:38:37.978+0800 INFO advmgr sector-storage/sched_worker.go:442 Sector 8 work for seal/v0/addpiece ...\n2021-08-03T13:44:26.295+0800 INFO advmgr sector-storage/sched_worker.go:444 Sector 8 work for seal/v0/addpiece end ...\n\n# seal/v0/commit/2\n2021-08-03T13:26:02.119+0800 INFO advmgr sector-storage/sched_worker.go:401 Sector 7 prepare for seal/v0/commit/2 ...\n2021-08-03T13:26:02.119+0800 INFO advmgr sector-storage/sched_worker.go:403 Sector 7 prepare for seal/v0/commit/2 end ...\n\n2021-08-03T13:26:02.119+0800 INFO advmgr sector-storage/sched_worker.go:442 Sector 7 work for seal/v0/commit/2 ...\n2021-08-03T13:49:46.180+0800 INFO advmgr sector-storage/sched_worker.go:444 Sector 7 work for seal/v0/commit/2 end ...\n\n# seal/v0/finalize\n2021-08-03T13:54:17.414+0800 INFO advmgr sector-storage/sched_worker.go:401 Sector 7 prepare for seal/v0/finalize ...\n2021-08-03T13:59:30.471+0800 INFO advmgr sector-storage/sched_worker.go:403 Sector 7 prepare for seal/v0/finalize end ...\n\n2021-08-03T13:59:30.471+0800 INFO advmgr sector-storage/sched_worker.go:442 Sector 7 work for seal/v0/finalize ...\n2021-08-03T14:00:07.915+0800 INFO advmgr sector-storage/sched_worker.go:444 Sector 7 work for seal/v0/finalize end ...\n\n")])])]),a("p",[t._v("   可以看出有些任务在 prepare 阶段比较耗时,有些在 work 阶段比较耗时,一般来说需要网路传输,带宽资源的在 prepare 比较耗时,如 fetch,finalize 等;而需要计算的任务在 work 阶段比较耗时,如 AP,P1,P2,C2 等。")]),t._v(" "),a("p",[t._v("   为了便于计算,这里将任务阶段进行合并,主要分为:AP,P1,P2,C2 阶段,将这四个阶段之前的仍无耗时统一归为相应阶段的耗时,如 T(P1)=P1 耗时+P1 前的 fetch 耗时。这里 waitseed 怎么归类,在后面的时间逻辑中有没有考虑进去")]),t._v(" "),a("h2",{attrs:{id:"速率因子"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#速率因子"}},[t._v("#")]),t._v(" 速率因子")]),t._v(" "),a("h3",{attrs:{id:"临时存储设备"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#临时存储设备"}},[t._v("#")]),t._v(" 临时存储设备")]),t._v(" "),a("p",[t._v("  Filecoin 在封装算力是会产生一些临时文件,在任务的进行中存在很多随机存取,这就要求磁盘吞吐量不能太差,否则会导致磁盘 IO 过高,计算资源等待磁盘读取处于闲置状态。")]),t._v(" "),a("ul",[a("li",[t._v("如何挑选适合的设备")])]),t._v(" "),a("p",[t._v("  如何寻找适合的设备,其实就是需要多少的磁盘吞吐量,可以通过一个简单的计算公式得到它。")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("文件大小 * 线程并行数量 / 运行时间 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" 平均每秒钟传输速度\n \n因为每个阶段的吞吐不同,拆分计算可以让得到的数据更精准\n \nP1 读取 + P1 写入 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" P1 阶段所需的吞吐量,其他阶段相同,把所有阶段所需的吞吐加起来就得到了所需的吞吐量,当然需要一些性能上的冗余\n")])])]),a("p",[t._v("  通常情况下绝大多数的矿工都会使用 SSD 或者 NVME,当有多块硬盘时我们可以通过"),a("code",[t._v("venus-worker storage attach --seal ")]),t._v("命令或者启动多个 worker 来设置多个路径,但这并不是一个比较好的方法,路径过于分散会导致后续的维护相对复杂,无法充分利用,通过创建 raid 方式可以获得更好的性能和空间利用率,并且便于后续的维护。")]),t._v(" "),a("ul",[a("li",[t._v("软 raid 创建")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("mdadm")]),t._v(" -C /dev/md1 -l "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" -n "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v(" /dev/sdb1 /dev/sdc1\n"),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("mdadm")]),t._v(" -C /dev/md2 -l "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5")]),t._v(" -n "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("6")]),t._v(" /dev/sd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("b-g"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n-C $创建软件RAID\n-l $指定RAID级别 "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("表示raid1 其他同理 \n-n $指定磁盘个数\n-x $指定备用设备个数\n-A $重组之前的设备\n")])])]),a("p",[t._v("​\t有关 mdadm 用法、MD 和各种级别的 RAID 的更多信息,请参阅:http://raid.wiki.kernel.org/")]),t._v(" "),a("p",[t._v("​\t获取最新版本的 mdadm 应始终可以从如下链接获取:http://www.kernel.org/pub/linux/utils/raid/mdadm/")]),t._v(" "),a("p",[t._v("​\t硬 raid 创建时请查看您的 raid 卡型号和说明进行操作")]),t._v(" "),a("h3",{attrs:{id:"永久存储设备"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#永久存储设备"}},[t._v("#")]),t._v(" 永久存储设备")]),t._v(" "),a("p",[t._v("   永久存储设备的访问机制和可能遇到的问题:")]),t._v(" "),a("ol",[a("li",[t._v("在每个任务阶段产生的文件有些是要永久存储的,用于 wdPoSt 或 winningPoSt,在每个 sector 完成阶段需要传输到永久存储目录,这个过程需要带宽资源,并且要保证磁盘 io;")]),t._v(" "),a("li",[t._v("wdPoSt 大量的随机读取非常小的文件,这可能会导致读取过慢而影响时空证明导致算力惩罚;")]),t._v(" "),a("li",[t._v("当存储过于集中时,少量的机器损坏会导致所有的数据丢失;")]),t._v(" "),a("li",[t._v("当磁盘过多时,并且盘符没有固定,启动时可能导致盘符移动;")]),t._v(" "),a("li",[t._v("如果是 raid,尽量选择 raid5 或者 raid6,raid10 这种冗余性更高的方式;")]),t._v(" "),a("li",[t._v("需要监控磁盘空间利用率并报警。")])]),t._v(" "),a("h3",{attrs:{id:"网络传输"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#网络传输"}},[t._v("#")]),t._v(" 网络传输")]),t._v(" "),a("p",[t._v("   网络传输会有两个部分:")]),t._v(" "),a("ul",[a("li",[a("p",[t._v("临时数据的网络传输,某个阶段的任务需要上个阶段的数据时会用 http 协议请求所需文件,需要保证传输时间小于计算时间。")]),t._v(" "),a("p",[t._v("举例:\n传输往往和计算是同步进行的")]),t._v(" "),a("p",[t._v("传输时间 > 计算时间 资源闲置,计算资源等待网络资源,拉长整个扇区封装的声明周期,就是降产")]),t._v(" "),a("p",[t._v("传输时间 < 计算时间 计算资源充分利用")]),t._v(" "),a("ul",[a("li",[a("p",[t._v("观察计算资源是否出现闲置")])]),t._v(" "),a("li",[a("p",[t._v("计算网络传输速度能否满足计算时间")]),t._v(" "),a("p",[t._v("Precommit2 如果计算耗时 25 分钟,读取 440G 左右文件,写入 100G 左右文件"),a("br"),t._v("\n(440G * 1024 / 25 / 60) + (100G * 1024 / 25 / 60) = 单个线程所需的吞吐量")])]),t._v(" "),a("li",[a("p",[t._v("多台机器同步阶段的文件传输")]),t._v(" "),a("p",[t._v("我们有 A,B,C 三个机器分别负责 P1,P2,Commit")]),t._v(" "),a("p",[t._v("当 A 机器开始 P1 时会向 B 机器的 P2 传输 32G 左右的 Unsealed")]),t._v(" "),a("p",[t._v("当 B 机器开始 P2 时,A 机器的 P1 生成的 440G 左右所有文件会传输到 B 的机器上")]),t._v(" "),a("p",[t._v("Commit 又分为 C1 和 C2.当 C 机器运行 C1 时需要 P1 和 P2 的所有文件,计算的结果通过内存直接传递给 C2,所以并不会在落盘新的文件")])])])]),t._v(" "),a("li",[a("p",[t._v("最终数据传输,我们要知道当最终的存储也会成为我们的产量瓶颈(貌似和下面的不符合)")]),t._v(" "),a("ol",[a("li",[a("p",[t._v("假设计算资源的产量是每天产出 6T 的算力,但如果存储的网络传输最大每天只能传输 5T,那么这就会导致产量的下降")])]),t._v(" "),a("li",[a("p",[t._v("如果我们使用了 NFS 这样的网络文件系统,当网络断开链接是,NFS 往往是会直接卡死的,所以可能需要设置 NFS 的超时机制")])])])])]),t._v(" "),a("h3",{attrs:{id:"worker-的指令集加速"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#worker-的指令集加速"}},[t._v("#")]),t._v(" worker 的指令集加速")]),t._v(" "),a("p",[t._v("   P1 阶段时,使用 SHA 指令集和不使用指令集会有巨大的差距,目前大多数矿工都采用 AMD 型号的 CPU 原因就是 SHA 指令集的关系,研究发现,使用 SHA 指令集基本可以跑进 250 分钟以内,但不使用 SHA 指令集能够跑进 420 分钟已经非常艰难了")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("确保编译时使用RUSTFLAGS=\"-C target-cpu=native -g\" FFI_BUILD_FROM_SOURCE=\"1\" 源码编译filecoin-ffi库,如果cpu支持则启用SHA扩展,这会大幅提高扇区封装速度,源码编译(make deps)时特征如下:\n\n+ trap '{ rm -f $__build_output_log_tmp; }' EXIT\n+ local '__rust_flags=--print native-static-libs -C target-feature=+sse2'\n+ RUSTFLAGS='--print native-static-libs -C target-feature=+sse2'\n+ cargo +nightly-2021-04-24 build --release --no-default-features --features multicore-sdr --features pairing,gpu\n+ tee /tmp/tmp.IYtnd3xka9\n Compiling autocfg v1.0.1\n Compiling libc v0.2.97\n Compiling cfg-if v1.0.0\n Compiling proc-macro2 v1.0.27\n Compiling unicode-xid v0.2.2\n Compiling syn v1.0.73\n Compiling lazy_static v1.4.0\n Compiling cc v1.0.68\n Compiling typenum v1.13.0\n Compiling serde_derive v1.0.126\n Compiling serde v1.0.126\n")])])]),a("h3",{attrs:{id:"核数限制"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#核数限制"}},[t._v("#")]),t._v(" 核数限制")]),t._v(" "),a("p",[t._v("​\t当想要把 CPU 的资源利用的更高时,需要非常合理的规划 CPU 的使用,比如有一个 64 核的 CPU,我们要想 PreCommit2 和 Commit 分别分到 32 核,这样两种任务相互不受影响,也不会导致某一个占用大量的计算资源导致另一个卡住的情况,此时我们就需要利用到核数限制")]),t._v(" "),a("ul",[a("li",[t._v("通过"),a("code",[t._v("taskset")]),t._v("限核")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 当我们想要启动某个进程时,可以通过 taskset -c 0-31 这种方式来进行限核操作")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 例如")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("TRUST_PARAMS")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("nohup")]),t._v(" taskset -c "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("-32 ./venus-worker run "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n--miner-addr"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("/ip4/sealer-ip/tcp/sealer-port"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n--miner-token"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("token"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v(" \n--listen"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0")]),t._v(".0.0:345"),a("span",{pre:!0,attrs:{class:"token operator"}},[a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[t._v("8")]),t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("flags"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">>")]),t._v(" worker.log "),a("span",{pre:!0,attrs:{class:"token operator"}},[a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[t._v("2")]),t._v(">")]),a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[t._v("&1")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 扩展使用 taskset -c 0-9,19-29,39-49 进行跳跃式限核")]),t._v("\n")])])]),a("p",[t._v("这种方式的弊端就在于不方便在程序运行时对核数进行实时调整")]),t._v(" "),a("ul",[a("li",[t._v("通过 Cgrep 限核")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 好的目录划分会帮助对多个进程的管理")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("mkdir")]),t._v(" -p /sys/fs/cgroup/cpuset/Pre1-worker\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 设置能够使用的核数范围")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("echo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("-31 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" /sys/fs/cgroup/cpuset/Pre1-worker/cpuset.cpus\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 加入进程的PID")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("echo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("PID"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" /sys/fs/cgroup/cpuset/Pre1-worker/cgroup.procs\n")])])]),a("p",[t._v("Cgrep 是在进程启动之后加入到配置文件的,并且支持实时的修改核数限制,当然也可以尝试使用 docker 限核,但 docker 的限核也是通过 Cgrep 来实现,至于 Cgrep 其他的用法我们基本都用不到,就不一一说明了")]),t._v(" "),a("h2",{attrs:{id:"worker-运行方式和资源消耗"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#worker-运行方式和资源消耗"}},[t._v("#")]),t._v(" worker 运行方式和资源消耗")]),t._v(" "),a("h3",{attrs:{id:"p1-阶段"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#p1-阶段"}},[t._v("#")]),t._v(" P1 阶段")]),t._v(" "),a("ul",[a("li",[t._v("P1 阶段的加速因子")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("FIL_PROOFS_MAXIMIZE_CACHING")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 控制cache文件缓存到内存中,起到加速作用,会占用56G内存")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("FIL_PROOFS_USE_MULTICORE_SDR")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 控制P1阶段是否使用多核运行,他会占用单个CPU组,所以每个CPU缓存组只会运行一个任务")]),t._v("\n")])])]),a("p",[a("code",[t._v("P1")]),t._v("阶段有两种选择,可以选择更快的速度或者更少的 CPU,需要根据实际资源决定。")]),t._v(" "),a("ul",[a("li",[t._v("P1 的内存资源消耗")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 内存中会存储56G的cache文件")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 加上2层layer文件,32G的矿工每层文件32G,64G每层文件64G")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 以32G矿工为例,如果我们同时运行了10个任务")]),t._v("\n \n56G cahce 文件 + "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("32")]),t._v(" *2 * 并行线程数 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" 696G Mem\n")])])]),a("ul",[a("li",[t._v("P1 的磁盘资源消耗")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 11层layer文件 ")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 64G的tree-d文件")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 32G的unsealed文件")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("11")]),t._v(" * 32G + "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("64")]),t._v(" + "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("32")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" 440G\n")])])]),a("h3",{attrs:{id:"p2-阶段"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#p2-阶段"}},[t._v("#")]),t._v(" P2 阶段")]),t._v(" "),a("ul",[a("li",[t._v("P2 的加速因子有两个")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("FIL_PROOFS_USE_GPU_COLUMN_BUILDER")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 使用GPU运算tree-r-last阶段")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("FIL_PROOFS_USE_GPU_TREE_BUILDER")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 使用GPU运算tree-c阶段")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 任何环境变量都不增加的情况下使用CPU运算")]),t._v("\n")])])]),a("p",[t._v("从实验结果来看使用 GPU 运算要明显比 CPU 快得多,而 CPU 运算时的核数,主频跟时间是成线性比例的,CPU 核数越多速度越快,主频越高越快,反之亦然。")]),t._v(" "),a("ul",[a("li",[t._v("P2 内存资源")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("--precommit2 "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("enable")]),t._v(" precommit2 "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("32G sectors: all cores, 96GiB Memory"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("default: "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 在命令行中可以看到运行一个需要96GiB的内存,如果并行2个就是2倍")]),t._v("\n")])])]),a("ul",[a("li",[t._v("P2 的磁盘资源消耗")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 32G")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 8个tree-c文件,每个 4.6G左右")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 8个tree-r-last,每个9.2M")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# t_aux,4K,p_aux,4K")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 32G的sealed文件")]),t._v("\n \n----------------------\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 64G")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 16个tree-c文件,每个 4.6G左右")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 16个tree-r-last,每个9.2M")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# t_aux,4K,p_aux,4K")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 64G的sealed文件")]),t._v("\n")])])]),a("h3",{attrs:{id:"commit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#commit"}},[t._v("#")]),t._v(" Commit")]),t._v(" "),a("ul",[a("li",[t._v("Commit 中的 C1 的磁盘资源消耗")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# C1需要前面2个阶段产生的所有文件")]),t._v("\n\nP1 440G + P2 79G "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" 519G \n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 每个C1的任务需要消耗487G左右的空间")]),t._v("\n")])])]),a("p",[t._v("C1 并没有太多的 CPU 消耗,并且时间极短")]),t._v(" "),a("ul",[a("li",[t._v("Commit 中的 C2 的运行方式,CPU 和 GPU")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BELLMAN_NO_GPU")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 禁用GPU")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BELLMAN_CUSTOM_GPU")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GeForce RTX 3090:10496"')]),t._v(" \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 指定GPU的cuda核心数,当GPU型号比较冷门无法识别时可使用")]),t._v("\n")])])]),a("ul",[a("li",[t._v("C2 的内存资源消耗")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("enable")]),t._v(" commit "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("32G sectors: all cores or GPUs, 128GiB Memory + 64GiB swap"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("default: "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 命令行中指出总共需要 128G + 64 G = 192G的内存")]),t._v("\n")])])]),a("h2",{attrs:{id:"产量优化"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#产量优化"}},[t._v("#")]),t._v(" 产量优化")]),t._v(" "),a("h3",{attrs:{id:"产量的计算公式"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#产量的计算公式"}},[t._v("#")]),t._v(" 产量的计算公式")]),t._v(" "),a("p",[t._v("  每个阶段的效率:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v(" 产出数量 / 时间 = 效率\n \n # 得到效率之后,我们就可以很轻松的算出产量\n \n 效率/h/个数 * 24h * 32G = 日产量\n")])])]),a("p",[t._v("例如我们有 1 台机器")]),t._v(" "),a("p",[t._v("P1:240 分钟")]),t._v(" "),a("p",[t._v("P2:30 分钟")]),t._v(" "),a("p",[t._v("Commit:35 分钟")]),t._v(" "),a("p",[t._v("此时我们可以简单一个计算公式的表格")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("运行阶段")]),t._v(" "),a("th",[t._v("时间/m")]),t._v(" "),a("th",[t._v("并行线程数")]),t._v(" "),a("th",[t._v("效率/时间h/个数")]),t._v(" "),a("th",[t._v("计算公式")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("P1")]),t._v(" "),a("td",[t._v("240")]),t._v(" "),a("td",[t._v("1")]),t._v(" "),a("td",[t._v("0.25")]),t._v(" "),a("td",[t._v("= 1 / (240 /60)")])]),t._v(" "),a("tr",[a("td",[t._v("P2")]),t._v(" "),a("td",[t._v("30")]),t._v(" "),a("td",[t._v("1")]),t._v(" "),a("td",[t._v("2")]),t._v(" "),a("td",[t._v("= 1 / (30 /60)")])]),t._v(" "),a("tr",[a("td",[t._v("Commit")]),t._v(" "),a("td",[t._v("35")]),t._v(" "),a("td",[t._v("1")]),t._v(" "),a("td",[t._v("1.7142857143")]),t._v(" "),a("td",[t._v("= 1 / (35 /60)")])])])]),t._v(" "),a("h4",{attrs:{id:"如何找到每个阶段的最佳运行数量和配置"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#如何找到每个阶段的最佳运行数量和配置"}},[t._v("#")]),t._v(" 如何找到每个阶段的最佳运行数量和配置")]),t._v(" "),a("p",[t._v("   从上面的表格中我们明显看出 P1 的效率明显不足,而此时 P2 和 Commit 机器必定会闲置,如何处理呢?产出的时间无法调整,那么我们就可以调整并行的线程数,当然我们可以新增一些计算内存的公式来指导我们对内存的消耗")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("运行阶段")]),t._v(" "),a("th",[t._v("时间/m")]),t._v(" "),a("th",[t._v("并行线程数")]),t._v(" "),a("th",[t._v("效率/时间h/个数")]),t._v(" "),a("th",[t._v("计算公式")]),t._v(" "),a("th",[t._v("日产量/G")]),t._v(" "),a("th",[t._v("公式")]),t._v(" "),a("th",[t._v("mem/G")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("P1")]),t._v(" "),a("td",[t._v("240")]),t._v(" "),a("td",[t._v("7")]),t._v(" "),a("td",[t._v("1.75")]),t._v(" "),a("td",[t._v("= 7 / (240 /60)")]),t._v(" "),a("td",[t._v("1344")]),t._v(" "),a("td",[t._v("=7*64+56")]),t._v(" "),a("td",[t._v("504")])]),t._v(" "),a("tr",[a("td",[t._v("P2")]),t._v(" "),a("td",[t._v("30")]),t._v(" "),a("td",[t._v("1")]),t._v(" "),a("td",[t._v("2")]),t._v(" "),a("td",[t._v("= 1 / (30 /60)")]),t._v(" "),a("td",[t._v("1536")]),t._v(" "),a("td",[t._v("=1*96")]),t._v(" "),a("td",[t._v("96")])]),t._v(" "),a("tr",[a("td",[t._v("Commit")]),t._v(" "),a("td",[t._v("35")]),t._v(" "),a("td",[t._v("1")]),t._v(" "),a("td",[t._v("1.7142857143")]),t._v(" "),a("td",[t._v("= 1 / (35 /60)")]),t._v(" "),a("td",[t._v("1316.571429")]),t._v(" "),a("td",[t._v("=1*128+64")]),t._v(" "),a("td",[t._v("192")])])])]),t._v(" "),a("p",[t._v("现在三个阶段的效率已经非常接近了,但是此时我们仍然存在一些问题:")]),t._v(" "),a("ol",[a("li",[t._v("Commit 效率低于 P1,这会导致大量的任务阻塞到 Commit 阶段")]),t._v(" "),a("li",[t._v("当某个阶段的效率过高时就会出现闲置")]),t._v(" "),a("li",[t._v("我们需要微调资源的分布来尽可能的保证每个阶段的效率无限相等")])]),t._v(" "),a("h4",{attrs:{id:"集群方案运行的的可能性"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#集群方案运行的的可能性"}},[t._v("#")]),t._v(" 集群方案运行的的可能性")]),t._v(" "),a("p",[t._v("​\t\t当我们有多台机器时,我们就要决定某些机器运行哪些阶段,在这之前我们再来看下不同阶段的特性:")]),t._v(" "),a("ol",[a("li",[t._v("P1 : 极度消耗内存,可以单核,多核,并行运行,临时存储需要伴随着并行数量的增多而增多")]),t._v(" "),a("li",[t._v("P2 : 轻度消耗内存,CPU,GPU 都可以运行,如果拆分,需要传输大量的文件")]),t._v(" "),a("li",[t._v("Commit: 中度消耗内存,CPU,GPU 都可以运行,如果拆分,需要传输所有临时文件")])]),t._v(" "),a("p",[t._v("如果我们此时只考虑这些因素,那么我们的组合方式有多少种呢?而这些不同的组合方式一定会带来不通的产量,虽然每个矿工的机器都有所不同,但我们的目标是一样的:")]),t._v(" "),a("ol",[a("li",[t._v("更高的产量组合运行方式")]),t._v(" "),a("li",[t._v("各个阶段更加均衡的分布")])]),t._v(" "),a("p",[t._v("我们可能无法做到完美,但无限接近也是最好的结果")]),t._v(" "),a("h4",{attrs:{id:"如何寻找最佳的下发任务数-始终保持机器满负荷运行"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#如何寻找最佳的下发任务数-始终保持机器满负荷运行"}},[t._v("#")]),t._v(" 如何寻找最佳的下发任务数,始终保持机器满负荷运行")]),t._v(" "),a("p",[t._v("  当我们找到最佳的组合方式之后我们需要考虑的就是如何才能保证这些机器 24 小时都是不间断运行的呢?我们不希望任何一个阶段的出现闲置")]),t._v(" "),a("p",[t._v("当我们发现 P1 需要并行 7 个时,那么我们如果保证 P1 的任务量是充足的,那么后续的两个阶段在不考虑其他问题的情况下,也一定是充足的,所以我们需要保证始终维持 P1 时刻都有 7 个任务")]),t._v(" "),a("div",{staticClass:"language-toml extra-class"},[a("pre",{pre:!0,attrs:{class:"language-toml"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 在 venus-sealer 的配置文件中我们可以设置最大的任务数,这可以帮我我们避免任务数下发过多")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token key property"}},[t._v("DataDir")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"~/.venussealer"')]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token table class-name"}},[t._v("API")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token key property"}},[t._v("ListenAddress")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/ip4/0.0.0.0/tcp/2345/http"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token key property"}},[t._v("RemoteListenAddress")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"192.168.200.6:2345"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token key property"}},[t._v("Timeout")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"30s"')]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token table class-name"}},[t._v("Sealing")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token key property"}},[t._v("MaxWaitDealsSectors")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token key property"}},[t._v("MaxSealingSectors")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 修改为 7")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token key property"}},[t._v("MaxSealingSectorsForDeals")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("\n")])])]),a("p",[t._v("此时我们可以通过一个简单的定时脚本就可以做到,始终维持最佳的任务量了")]),t._v(" "),a("h2",{attrs:{id:"损失和止损"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#损失和止损"}},[t._v("#")]),t._v(" 损失和止损")]),t._v(" "),a("p",[t._v("  如果一个任务执行错误之后又被反复的重试,这就像我们有 7 个通道进行算力的封装,但是此时有一通道阻塞或者损坏,这就会降低我们 1 / 7 的产量,所以及时的处理错误也是非常重要的")]),t._v(" "),a("ul",[a("li",[a("p",[t._v("何种情况下应该立刻抛弃任务")]),t._v(" "),a("ol",[a("li",[t._v("ticket 过期")]),t._v(" "),a("li",[t._v("Commit 过期")]),t._v(" "),a("li",[t._v("依赖文件损坏重试多次都未成功时;")])])]),t._v(" "),a("li",[a("p",[t._v("移除无法完成的 sector")])])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("venus-sealer sectors remove --really-do-it "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("sectorNum"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("\n")])])]),a("p",[t._v("如遇到无法彻底删除请查询:"),a("a",{attrs:{href:"https://github.com/filguard/lotus-ops/blob/master/documents/questions.md#1-%E9%A1%BD%E5%9B%BA%E6%89%87%E5%8C%BA%E5%A6%82%E4%BD%95%E5%88%A0%E9%99%A4",target:"_blank",rel:"noopener noreferrer"}},[t._v("顽固扇区如何删除"),a("OutboundLink")],1)])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[42],{432:function(t,s,a){"use strict";a.r(s);var e=a(17),r=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"venus-集群最大化利用资源增长算力方案"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-集群最大化利用资源增长算力方案"}},[t._v("#")]),t._v(" Venus-集群最大化利用资源增长算力方案")]),t._v(" "),a("p",[t._v("   在 Filecoin 的网络中,算力大小至关重要,与矿工的收入息息相关。算力的增长与维持需要软硬件资源较多,每个扇区的密封需要 P1、P2、C1,C2 等\n诸多过程,并且每个过程所依赖的资源各不相同,如:P1 偏向多核 CPU,P4 可用 GPU 优化等。故如何找出能最大化利用现有资源提升算力的方案是一个复杂的过程。这篇文章为如何找出最优方案提供一些思路。")]),t._v(" "),a("h2",{attrs:{id:"总体思路"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#总体思路"}},[t._v("#")]),t._v(" 总体思路")]),t._v(" "),a("blockquote",[a("p",[t._v("本文方案是通过各个阶段的任务耗时来推算如何均衡的分配各阶段任务的机器数量占比")])]),t._v(" "),a("ul",[a("li",[t._v("根据实际场景,将所有加速配置都打开,做几个 sector,统计每个阶段任务耗时。每个阶段对硬件资源的的依赖如下:\n"),a("ul",[a("li",[t._v("P1:cpu 及磁盘 io")])]),t._v(" "),a("ul",[a("li",[t._v("P2:cpu,gpu,带宽及磁盘 io")]),t._v(" "),a("li",[t._v("C1-C2:cpu,gpu,带宽及磁盘 io")])])])]),t._v(" "),a("blockquote",[a("p",[t._v("这里多做几个是为了统计出较稳定的耗时,此阶段需保持加速设置及软硬件资源始终不变。")])]),t._v(" "),a("ul",[a("li",[a("p",[t._v("维持任务数平衡,即每个机器都有任何时刻都有任务可做,理论上每个阶段任务数与耗时成反比;")])]),t._v(" "),a("li",[a("p",[t._v("扇区任务由 pledge 命令控制,配合最大并发密封扇区数(MaxSealingSectors)管理集群中 sector 并发数量;")])]),t._v(" "),a("li",[a("p",[t._v("每个 worker 可以指定可接受的任务类型。")])])]),t._v(" "),a("h2",{attrs:{id:"任务耗时统计"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#任务耗时统计"}},[t._v("#")]),t._v(" 任务耗时统计")]),t._v(" "),a("p",[t._v("   worker 可以领取的任务类型有:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('TTAddPiece TaskType = "seal/v0/addpiece"\nTTPreCommit1 TaskType = "seal/v0/precommit/1"\nTTPreCommit2 TaskType = "seal/v0/precommit/2"\nTTCommit1 TaskType = "seal/v0/commit/1" // NOTE: We use this to transfer the sector into miner-local storage for now; Don\'t use on workers!\nTTCommit2 TaskType = "seal/v0/commit/2"\n\nTTFinalize TaskType = "seal/v0/finalize"\n\nTTFetch TaskType = "seal/v0/fetch"\nTTUnseal TaskType = "seal/v0/unseal"\n\n')])])]),a("p",[t._v("   每个任务都分为两个阶段:prepare 阶段和 worker 阶段,在日志中表现为:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("# seal/v0/fetch\n2021-08-03T14:00:07.925+0800 INFO advmgr sector-storage/sched_worker.go:401 Sector 7 prepare for seal/v0/fetch ...\n2021-08-03T14:05:36.772+0800 INFO advmgr sector-storage/sched_worker.go:403 Sector 7 prepare for seal/v0/fetch end ...\n\n2021-08-03T14:05:36.772+0800 INFO advmgr sector-storage/sched_worker.go:442 Sector 7 work for seal/v0/fetch ...\n2021-08-03T14:05:36.774+0800 INFO advmgr sector-storage/sched_worker.go:444 Sector 7 work for seal/v0/fetch end ...\n\n# seal/v0/addpiece\n2021-08-03T13:38:37.977+0800 INFO advmgr sector-storage/sched_worker.go:401 Sector 8 prepare for seal/v0/addpiece ...\n2021-08-03T13:38:37.978+0800 INFO advmgr sector-storage/sched_worker.go:403 Sector 8 prepare for seal/v0/addpiece end ...\n\n2021-08-03T13:38:37.978+0800 INFO advmgr sector-storage/sched_worker.go:442 Sector 8 work for seal/v0/addpiece ...\n2021-08-03T13:44:26.295+0800 INFO advmgr sector-storage/sched_worker.go:444 Sector 8 work for seal/v0/addpiece end ...\n\n# seal/v0/commit/2\n2021-08-03T13:26:02.119+0800 INFO advmgr sector-storage/sched_worker.go:401 Sector 7 prepare for seal/v0/commit/2 ...\n2021-08-03T13:26:02.119+0800 INFO advmgr sector-storage/sched_worker.go:403 Sector 7 prepare for seal/v0/commit/2 end ...\n\n2021-08-03T13:26:02.119+0800 INFO advmgr sector-storage/sched_worker.go:442 Sector 7 work for seal/v0/commit/2 ...\n2021-08-03T13:49:46.180+0800 INFO advmgr sector-storage/sched_worker.go:444 Sector 7 work for seal/v0/commit/2 end ...\n\n# seal/v0/finalize\n2021-08-03T13:54:17.414+0800 INFO advmgr sector-storage/sched_worker.go:401 Sector 7 prepare for seal/v0/finalize ...\n2021-08-03T13:59:30.471+0800 INFO advmgr sector-storage/sched_worker.go:403 Sector 7 prepare for seal/v0/finalize end ...\n\n2021-08-03T13:59:30.471+0800 INFO advmgr sector-storage/sched_worker.go:442 Sector 7 work for seal/v0/finalize ...\n2021-08-03T14:00:07.915+0800 INFO advmgr sector-storage/sched_worker.go:444 Sector 7 work for seal/v0/finalize end ...\n\n")])])]),a("p",[t._v("   可以看出有些任务在 prepare 阶段比较耗时,有些在 work 阶段比较耗时,一般来说需要网路传输,带宽资源的在 prepare 比较耗时,如 fetch,finalize 等;而需要计算的任务在 work 阶段比较耗时,如 AP,P1,P2,C2 等。")]),t._v(" "),a("p",[t._v("   为了便于计算,这里将任务阶段进行合并,主要分为:AP,P1,P2,C2 阶段,将这四个阶段之前的仍无耗时统一归为相应阶段的耗时,如 T(P1)=P1 耗时+P1 前的 fetch 耗时。这里 waitseed 怎么归类,在后面的时间逻辑中有没有考虑进去")]),t._v(" "),a("h2",{attrs:{id:"速率因子"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#速率因子"}},[t._v("#")]),t._v(" 速率因子")]),t._v(" "),a("h3",{attrs:{id:"临时存储设备"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#临时存储设备"}},[t._v("#")]),t._v(" 临时存储设备")]),t._v(" "),a("p",[t._v("  Filecoin 在封装算力是会产生一些临时文件,在任务的进行中存在很多随机存取,这就要求磁盘吞吐量不能太差,否则会导致磁盘 IO 过高,计算资源等待磁盘读取处于闲置状态。")]),t._v(" "),a("ul",[a("li",[t._v("如何挑选适合的设备")])]),t._v(" "),a("p",[t._v("  如何寻找适合的设备,其实就是需要多少的磁盘吞吐量,可以通过一个简单的计算公式得到它。")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("文件大小 * 线程并行数量 / 运行时间 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" 平均每秒钟传输速度\n \n因为每个阶段的吞吐不同,拆分计算可以让得到的数据更精准\n \nP1 读取 + P1 写入 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" P1 阶段所需的吞吐量,其他阶段相同,把所有阶段所需的吞吐加起来就得到了所需的吞吐量,当然需要一些性能上的冗余\n")])])]),a("p",[t._v("  通常情况下绝大多数的矿工都会使用 SSD 或者 NVME,当有多块硬盘时我们可以通过"),a("code",[t._v("venus-worker storage attach --seal ")]),t._v("命令或者启动多个 worker 来设置多个路径,但这并不是一个比较好的方法,路径过于分散会导致后续的维护相对复杂,无法充分利用,通过创建 raid 方式可以获得更好的性能和空间利用率,并且便于后续的维护。")]),t._v(" "),a("ul",[a("li",[t._v("软 raid 创建")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("mdadm")]),t._v(" -C /dev/md1 -l "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" -n "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v(" /dev/sdb1 /dev/sdc1\n"),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("mdadm")]),t._v(" -C /dev/md2 -l "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5")]),t._v(" -n "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("6")]),t._v(" /dev/sd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("b-g"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n-C $创建软件RAID\n-l $指定RAID级别 "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("表示raid1 其他同理 \n-n $指定磁盘个数\n-x $指定备用设备个数\n-A $重组之前的设备\n")])])]),a("p",[t._v("​\t有关 mdadm 用法、MD 和各种级别的 RAID 的更多信息,请参阅:http://raid.wiki.kernel.org/")]),t._v(" "),a("p",[t._v("​\t获取最新版本的 mdadm 应始终可以从如下链接获取:http://www.kernel.org/pub/linux/utils/raid/mdadm/")]),t._v(" "),a("p",[t._v("​\t硬 raid 创建时请查看您的 raid 卡型号和说明进行操作")]),t._v(" "),a("h3",{attrs:{id:"永久存储设备"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#永久存储设备"}},[t._v("#")]),t._v(" 永久存储设备")]),t._v(" "),a("p",[t._v("   永久存储设备的访问机制和可能遇到的问题:")]),t._v(" "),a("ol",[a("li",[t._v("在每个任务阶段产生的文件有些是要永久存储的,用于 wdPoSt 或 winningPoSt,在每个 sector 完成阶段需要传输到永久存储目录,这个过程需要带宽资源,并且要保证磁盘 io;")]),t._v(" "),a("li",[t._v("wdPoSt 大量的随机读取非常小的文件,这可能会导致读取过慢而影响时空证明导致算力惩罚;")]),t._v(" "),a("li",[t._v("当存储过于集中时,少量的机器损坏会导致所有的数据丢失;")]),t._v(" "),a("li",[t._v("当磁盘过多时,并且盘符没有固定,启动时可能导致盘符移动;")]),t._v(" "),a("li",[t._v("如果是 raid,尽量选择 raid5 或者 raid6,raid10 这种冗余性更高的方式;")]),t._v(" "),a("li",[t._v("需要监控磁盘空间利用率并报警。")])]),t._v(" "),a("h3",{attrs:{id:"网络传输"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#网络传输"}},[t._v("#")]),t._v(" 网络传输")]),t._v(" "),a("p",[t._v("   网络传输会有两个部分:")]),t._v(" "),a("ul",[a("li",[a("p",[t._v("临时数据的网络传输,某个阶段的任务需要上个阶段的数据时会用 http 协议请求所需文件,需要保证传输时间小于计算时间。")]),t._v(" "),a("p",[t._v("举例:\n传输往往和计算是同步进行的")]),t._v(" "),a("p",[t._v("传输时间 > 计算时间 资源闲置,计算资源等待网络资源,拉长整个扇区封装的声明周期,就是降产")]),t._v(" "),a("p",[t._v("传输时间 < 计算时间 计算资源充分利用")]),t._v(" "),a("ul",[a("li",[a("p",[t._v("观察计算资源是否出现闲置")])]),t._v(" "),a("li",[a("p",[t._v("计算网络传输速度能否满足计算时间")]),t._v(" "),a("p",[t._v("Precommit2 如果计算耗时 25 分钟,读取 440G 左右文件,写入 100G 左右文件"),a("br"),t._v("\n(440G * 1024 / 25 / 60) + (100G * 1024 / 25 / 60) = 单个线程所需的吞吐量")])]),t._v(" "),a("li",[a("p",[t._v("多台机器同步阶段的文件传输")]),t._v(" "),a("p",[t._v("我们有 A,B,C 三个机器分别负责 P1,P2,Commit")]),t._v(" "),a("p",[t._v("当 A 机器开始 P1 时会向 B 机器的 P2 传输 32G 左右的 Unsealed")]),t._v(" "),a("p",[t._v("当 B 机器开始 P2 时,A 机器的 P1 生成的 440G 左右所有文件会传输到 B 的机器上")]),t._v(" "),a("p",[t._v("Commit 又分为 C1 和 C2.当 C 机器运行 C1 时需要 P1 和 P2 的所有文件,计算的结果通过内存直接传递给 C2,所以并不会在落盘新的文件")])])])]),t._v(" "),a("li",[a("p",[t._v("最终数据传输,我们要知道当最终的存储也会成为我们的产量瓶颈(貌似和下面的不符合)")]),t._v(" "),a("ol",[a("li",[a("p",[t._v("假设计算资源的产量是每天产出 6T 的算力,但如果存储的网络传输最大每天只能传输 5T,那么这就会导致产量的下降")])]),t._v(" "),a("li",[a("p",[t._v("如果我们使用了 NFS 这样的网络文件系统,当网络断开链接是,NFS 往往是会直接卡死的,所以可能需要设置 NFS 的超时机制")])])])])]),t._v(" "),a("h3",{attrs:{id:"worker-的指令集加速"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#worker-的指令集加速"}},[t._v("#")]),t._v(" worker 的指令集加速")]),t._v(" "),a("p",[t._v("   P1 阶段时,使用 SHA 指令集和不使用指令集会有巨大的差距,目前大多数矿工都采用 AMD 型号的 CPU 原因就是 SHA 指令集的关系,研究发现,使用 SHA 指令集基本可以跑进 250 分钟以内,但不使用 SHA 指令集能够跑进 420 分钟已经非常艰难了")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("确保编译时使用RUSTFLAGS=\"-C target-cpu=native -g\" FFI_BUILD_FROM_SOURCE=\"1\" 源码编译filecoin-ffi库,如果cpu支持则启用SHA扩展,这会大幅提高扇区封装速度,源码编译(make deps)时特征如下:\n\n+ trap '{ rm -f $__build_output_log_tmp; }' EXIT\n+ local '__rust_flags=--print native-static-libs -C target-feature=+sse2'\n+ RUSTFLAGS='--print native-static-libs -C target-feature=+sse2'\n+ cargo +nightly-2021-04-24 build --release --no-default-features --features multicore-sdr --features pairing,gpu\n+ tee /tmp/tmp.IYtnd3xka9\n Compiling autocfg v1.0.1\n Compiling libc v0.2.97\n Compiling cfg-if v1.0.0\n Compiling proc-macro2 v1.0.27\n Compiling unicode-xid v0.2.2\n Compiling syn v1.0.73\n Compiling lazy_static v1.4.0\n Compiling cc v1.0.68\n Compiling typenum v1.13.0\n Compiling serde_derive v1.0.126\n Compiling serde v1.0.126\n")])])]),a("h3",{attrs:{id:"核数限制"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#核数限制"}},[t._v("#")]),t._v(" 核数限制")]),t._v(" "),a("p",[t._v("​\t当想要把 CPU 的资源利用的更高时,需要非常合理的规划 CPU 的使用,比如有一个 64 核的 CPU,我们要想 PreCommit2 和 Commit 分别分到 32 核,这样两种任务相互不受影响,也不会导致某一个占用大量的计算资源导致另一个卡住的情况,此时我们就需要利用到核数限制")]),t._v(" "),a("ul",[a("li",[t._v("通过"),a("code",[t._v("taskset")]),t._v("限核")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 当我们想要启动某个进程时,可以通过 taskset -c 0-31 这种方式来进行限核操作")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 例如")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("TRUST_PARAMS")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("nohup")]),t._v(" taskset -c "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("-32 ./venus-worker run "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n--miner-addr"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("/ip4/sealer-ip/tcp/sealer-port"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n--miner-token"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("token"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v(" \n--listen"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0")]),t._v(".0.0:345"),a("span",{pre:!0,attrs:{class:"token operator"}},[a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[t._v("8")]),t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("flags"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">>")]),t._v(" worker.log "),a("span",{pre:!0,attrs:{class:"token operator"}},[a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[t._v("2")]),t._v(">")]),a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[t._v("&1")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 扩展使用 taskset -c 0-9,19-29,39-49 进行跳跃式限核")]),t._v("\n")])])]),a("p",[t._v("这种方式的弊端就在于不方便在程序运行时对核数进行实时调整")]),t._v(" "),a("ul",[a("li",[t._v("通过 Cgrep 限核")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 好的目录划分会帮助对多个进程的管理")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("mkdir")]),t._v(" -p /sys/fs/cgroup/cpuset/Pre1-worker\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 设置能够使用的核数范围")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("echo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("-31 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" /sys/fs/cgroup/cpuset/Pre1-worker/cpuset.cpus\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 加入进程的PID")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("echo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("PID"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" /sys/fs/cgroup/cpuset/Pre1-worker/cgroup.procs\n")])])]),a("p",[t._v("Cgrep 是在进程启动之后加入到配置文件的,并且支持实时的修改核数限制,当然也可以尝试使用 docker 限核,但 docker 的限核也是通过 Cgrep 来实现,至于 Cgrep 其他的用法我们基本都用不到,就不一一说明了")]),t._v(" "),a("h2",{attrs:{id:"worker-运行方式和资源消耗"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#worker-运行方式和资源消耗"}},[t._v("#")]),t._v(" worker 运行方式和资源消耗")]),t._v(" "),a("h3",{attrs:{id:"p1-阶段"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#p1-阶段"}},[t._v("#")]),t._v(" P1 阶段")]),t._v(" "),a("ul",[a("li",[t._v("P1 阶段的加速因子")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("FIL_PROOFS_MAXIMIZE_CACHING")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 控制cache文件缓存到内存中,起到加速作用,会占用56G内存")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("FIL_PROOFS_USE_MULTICORE_SDR")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 控制P1阶段是否使用多核运行,他会占用单个CPU组,所以每个CPU缓存组只会运行一个任务")]),t._v("\n")])])]),a("p",[a("code",[t._v("P1")]),t._v("阶段有两种选择,可以选择更快的速度或者更少的 CPU,需要根据实际资源决定。")]),t._v(" "),a("ul",[a("li",[t._v("P1 的内存资源消耗")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 内存中会存储56G的cache文件")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 加上2层layer文件,32G的矿工每层文件32G,64G每层文件64G")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 以32G矿工为例,如果我们同时运行了10个任务")]),t._v("\n \n56G cahce 文件 + "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("32")]),t._v(" *2 * 并行线程数 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" 696G Mem\n")])])]),a("ul",[a("li",[t._v("P1 的磁盘资源消耗")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 11层layer文件 ")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 64G的tree-d文件")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 32G的unsealed文件")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("11")]),t._v(" * 32G + "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("64")]),t._v(" + "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("32")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" 440G\n")])])]),a("h3",{attrs:{id:"p2-阶段"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#p2-阶段"}},[t._v("#")]),t._v(" P2 阶段")]),t._v(" "),a("ul",[a("li",[t._v("P2 的加速因子有两个")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("FIL_PROOFS_USE_GPU_COLUMN_BUILDER")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 使用GPU运算tree-r-last阶段")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("FIL_PROOFS_USE_GPU_TREE_BUILDER")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 使用GPU运算tree-c阶段")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 任何环境变量都不增加的情况下使用CPU运算")]),t._v("\n")])])]),a("p",[t._v("从实验结果来看使用 GPU 运算要明显比 CPU 快得多,而 CPU 运算时的核数,主频跟时间是成线性比例的,CPU 核数越多速度越快,主频越高越快,反之亦然。")]),t._v(" "),a("ul",[a("li",[t._v("P2 内存资源")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("--precommit2 "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("enable")]),t._v(" precommit2 "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("32G sectors: all cores, 96GiB Memory"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("default: "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 在命令行中可以看到运行一个需要96GiB的内存,如果并行2个就是2倍")]),t._v("\n")])])]),a("ul",[a("li",[t._v("P2 的磁盘资源消耗")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 32G")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 8个tree-c文件,每个 4.6G左右")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 8个tree-r-last,每个9.2M")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# t_aux,4K,p_aux,4K")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 32G的sealed文件")]),t._v("\n \n----------------------\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 64G")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 16个tree-c文件,每个 4.6G左右")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 16个tree-r-last,每个9.2M")]),t._v("\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# t_aux,4K,p_aux,4K")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 64G的sealed文件")]),t._v("\n")])])]),a("h3",{attrs:{id:"commit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#commit"}},[t._v("#")]),t._v(" Commit")]),t._v(" "),a("ul",[a("li",[t._v("Commit 中的 C1 的磁盘资源消耗")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# C1需要前面2个阶段产生的所有文件")]),t._v("\n\nP1 440G + P2 79G "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" 519G \n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 每个C1的任务需要消耗487G左右的空间")]),t._v("\n")])])]),a("p",[t._v("C1 并没有太多的 CPU 消耗,并且时间极短")]),t._v(" "),a("ul",[a("li",[t._v("Commit 中的 C2 的运行方式,CPU 和 GPU")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BELLMAN_NO_GPU")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 禁用GPU")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BELLMAN_CUSTOM_GPU")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GeForce RTX 3090:10496"')]),t._v(" \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 指定GPU的cuda核心数,当GPU型号比较冷门无法识别时可使用")]),t._v("\n")])])]),a("ul",[a("li",[t._v("C2 的内存资源消耗")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("enable")]),t._v(" commit "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("32G sectors: all cores or GPUs, 128GiB Memory + 64GiB swap"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("default: "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 命令行中指出总共需要 128G + 64 G = 192G的内存")]),t._v("\n")])])]),a("h2",{attrs:{id:"产量优化"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#产量优化"}},[t._v("#")]),t._v(" 产量优化")]),t._v(" "),a("h3",{attrs:{id:"产量的计算公式"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#产量的计算公式"}},[t._v("#")]),t._v(" 产量的计算公式")]),t._v(" "),a("p",[t._v("  每个阶段的效率:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v(" 产出数量 / 时间 = 效率\n \n # 得到效率之后,我们就可以很轻松的算出产量\n \n 效率/h/个数 * 24h * 32G = 日产量\n")])])]),a("p",[t._v("例如我们有 1 台机器")]),t._v(" "),a("p",[t._v("P1:240 分钟")]),t._v(" "),a("p",[t._v("P2:30 分钟")]),t._v(" "),a("p",[t._v("Commit:35 分钟")]),t._v(" "),a("p",[t._v("此时我们可以简单一个计算公式的表格")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("运行阶段")]),t._v(" "),a("th",[t._v("时间/m")]),t._v(" "),a("th",[t._v("并行线程数")]),t._v(" "),a("th",[t._v("效率/时间h/个数")]),t._v(" "),a("th",[t._v("计算公式")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("P1")]),t._v(" "),a("td",[t._v("240")]),t._v(" "),a("td",[t._v("1")]),t._v(" "),a("td",[t._v("0.25")]),t._v(" "),a("td",[t._v("= 1 / (240 /60)")])]),t._v(" "),a("tr",[a("td",[t._v("P2")]),t._v(" "),a("td",[t._v("30")]),t._v(" "),a("td",[t._v("1")]),t._v(" "),a("td",[t._v("2")]),t._v(" "),a("td",[t._v("= 1 / (30 /60)")])]),t._v(" "),a("tr",[a("td",[t._v("Commit")]),t._v(" "),a("td",[t._v("35")]),t._v(" "),a("td",[t._v("1")]),t._v(" "),a("td",[t._v("1.7142857143")]),t._v(" "),a("td",[t._v("= 1 / (35 /60)")])])])]),t._v(" "),a("h4",{attrs:{id:"如何找到每个阶段的最佳运行数量和配置"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#如何找到每个阶段的最佳运行数量和配置"}},[t._v("#")]),t._v(" 如何找到每个阶段的最佳运行数量和配置")]),t._v(" "),a("p",[t._v("   从上面的表格中我们明显看出 P1 的效率明显不足,而此时 P2 和 Commit 机器必定会闲置,如何处理呢?产出的时间无法调整,那么我们就可以调整并行的线程数,当然我们可以新增一些计算内存的公式来指导我们对内存的消耗")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("运行阶段")]),t._v(" "),a("th",[t._v("时间/m")]),t._v(" "),a("th",[t._v("并行线程数")]),t._v(" "),a("th",[t._v("效率/时间h/个数")]),t._v(" "),a("th",[t._v("计算公式")]),t._v(" "),a("th",[t._v("日产量/G")]),t._v(" "),a("th",[t._v("公式")]),t._v(" "),a("th",[t._v("mem/G")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("P1")]),t._v(" "),a("td",[t._v("240")]),t._v(" "),a("td",[t._v("7")]),t._v(" "),a("td",[t._v("1.75")]),t._v(" "),a("td",[t._v("= 7 / (240 /60)")]),t._v(" "),a("td",[t._v("1344")]),t._v(" "),a("td",[t._v("=7*64+56")]),t._v(" "),a("td",[t._v("504")])]),t._v(" "),a("tr",[a("td",[t._v("P2")]),t._v(" "),a("td",[t._v("30")]),t._v(" "),a("td",[t._v("1")]),t._v(" "),a("td",[t._v("2")]),t._v(" "),a("td",[t._v("= 1 / (30 /60)")]),t._v(" "),a("td",[t._v("1536")]),t._v(" "),a("td",[t._v("=1*96")]),t._v(" "),a("td",[t._v("96")])]),t._v(" "),a("tr",[a("td",[t._v("Commit")]),t._v(" "),a("td",[t._v("35")]),t._v(" "),a("td",[t._v("1")]),t._v(" "),a("td",[t._v("1.7142857143")]),t._v(" "),a("td",[t._v("= 1 / (35 /60)")]),t._v(" "),a("td",[t._v("1316.571429")]),t._v(" "),a("td",[t._v("=1*128+64")]),t._v(" "),a("td",[t._v("192")])])])]),t._v(" "),a("p",[t._v("现在三个阶段的效率已经非常接近了,但是此时我们仍然存在一些问题:")]),t._v(" "),a("ol",[a("li",[t._v("Commit 效率低于 P1,这会导致大量的任务阻塞到 Commit 阶段")]),t._v(" "),a("li",[t._v("当某个阶段的效率过高时就会出现闲置")]),t._v(" "),a("li",[t._v("我们需要微调资源的分布来尽可能的保证每个阶段的效率无限相等")])]),t._v(" "),a("h4",{attrs:{id:"集群方案运行的的可能性"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#集群方案运行的的可能性"}},[t._v("#")]),t._v(" 集群方案运行的的可能性")]),t._v(" "),a("p",[t._v("​\t\t当我们有多台机器时,我们就要决定某些机器运行哪些阶段,在这之前我们再来看下不同阶段的特性:")]),t._v(" "),a("ol",[a("li",[t._v("P1 : 极度消耗内存,可以单核,多核,并行运行,临时存储需要伴随着并行数量的增多而增多")]),t._v(" "),a("li",[t._v("P2 : 轻度消耗内存,CPU,GPU 都可以运行,如果拆分,需要传输大量的文件")]),t._v(" "),a("li",[t._v("Commit: 中度消耗内存,CPU,GPU 都可以运行,如果拆分,需要传输所有临时文件")])]),t._v(" "),a("p",[t._v("如果我们此时只考虑这些因素,那么我们的组合方式有多少种呢?而这些不同的组合方式一定会带来不通的产量,虽然每个矿工的机器都有所不同,但我们的目标是一样的:")]),t._v(" "),a("ol",[a("li",[t._v("更高的产量组合运行方式")]),t._v(" "),a("li",[t._v("各个阶段更加均衡的分布")])]),t._v(" "),a("p",[t._v("我们可能无法做到完美,但无限接近也是最好的结果")]),t._v(" "),a("h4",{attrs:{id:"如何寻找最佳的下发任务数-始终保持机器满负荷运行"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#如何寻找最佳的下发任务数-始终保持机器满负荷运行"}},[t._v("#")]),t._v(" 如何寻找最佳的下发任务数,始终保持机器满负荷运行")]),t._v(" "),a("p",[t._v("  当我们找到最佳的组合方式之后我们需要考虑的就是如何才能保证这些机器 24 小时都是不间断运行的呢?我们不希望任何一个阶段的出现闲置")]),t._v(" "),a("p",[t._v("当我们发现 P1 需要并行 7 个时,那么我们如果保证 P1 的任务量是充足的,那么后续的两个阶段在不考虑其他问题的情况下,也一定是充足的,所以我们需要保证始终维持 P1 时刻都有 7 个任务")]),t._v(" "),a("div",{staticClass:"language-toml extra-class"},[a("pre",{pre:!0,attrs:{class:"language-toml"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 在 venus-sealer 的配置文件中我们可以设置最大的任务数,这可以帮我我们避免任务数下发过多")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token key property"}},[t._v("DataDir")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"~/.venussealer"')]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token table class-name"}},[t._v("API")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token key property"}},[t._v("ListenAddress")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/ip4/0.0.0.0/tcp/2345/http"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token key property"}},[t._v("RemoteListenAddress")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"192.168.200.6:2345"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token key property"}},[t._v("Timeout")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"30s"')]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token table class-name"}},[t._v("Sealing")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token key property"}},[t._v("MaxWaitDealsSectors")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token key property"}},[t._v("MaxSealingSectors")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 修改为 7")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token key property"}},[t._v("MaxSealingSectorsForDeals")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("\n")])])]),a("p",[t._v("此时我们可以通过一个简单的定时脚本就可以做到,始终维持最佳的任务量了")]),t._v(" "),a("h2",{attrs:{id:"损失和止损"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#损失和止损"}},[t._v("#")]),t._v(" 损失和止损")]),t._v(" "),a("p",[t._v("  如果一个任务执行错误之后又被反复的重试,这就像我们有 7 个通道进行算力的封装,但是此时有一通道阻塞或者损坏,这就会降低我们 1 / 7 的产量,所以及时的处理错误也是非常重要的")]),t._v(" "),a("ul",[a("li",[a("p",[t._v("何种情况下应该立刻抛弃任务")]),t._v(" "),a("ol",[a("li",[t._v("ticket 过期")]),t._v(" "),a("li",[t._v("Commit 过期")]),t._v(" "),a("li",[t._v("依赖文件损坏重试多次都未成功时;")])])]),t._v(" "),a("li",[a("p",[t._v("移除无法完成的 sector")])])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("venus-sealer sectors remove --really-do-it "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("sectorNum"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("\n")])])]),a("p",[t._v("如遇到无法彻底删除请查询:"),a("a",{attrs:{href:"https://github.com/filguard/lotus-ops/blob/master/documents/questions.md#1-%E9%A1%BD%E5%9B%BA%E6%89%87%E5%8C%BA%E5%A6%82%E4%BD%95%E5%88%A0%E9%99%A4",target:"_blank",rel:"noopener noreferrer"}},[t._v("顽固扇区如何删除"),a("OutboundLink")],1)])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/43.675dba95.js b/assets/js/43.25dd1e33.js similarity index 97% rename from assets/js/43.675dba95.js rename to assets/js/43.25dd1e33.js index c65b4407c..b2452b024 100644 --- a/assets/js/43.675dba95.js +++ b/assets/js/43.25dd1e33.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[43],{434:function(e,t,r){"use strict";r.r(t);var n=r(17),s=Object(n.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h2",{attrs:{id:"部署venus解决方案"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#部署venus解决方案"}},[e._v("#")]),e._v(" 部署"),r("code",[e._v("Venus")]),e._v("解决方案")]),e._v(" "),r("p",[r("code",[e._v("Venus")]),e._v("泛指一系列与"),r("code",[e._v("filecoin")]),e._v("协议稳定/高效互动的软件产品。"),r("code",[e._v("Venus")]),e._v("的,目标群体大致分为"),r("code",[e._v("4")]),e._v("类。"),r("code",[e._v("SP")]),e._v("存储提供者,"),r("code",[e._v("SC")]),e._v("存储客户,生态合作伙伴,以及去中心化应用"),r("code",[e._v("Dapp")]),e._v("。"),r("code",[e._v("Venus")]),e._v("解决方案当前被广泛应用于"),r("code",[e._v("SP")]),e._v("和"),r("code",[e._v("SC")]),e._v("的场景中。")]),e._v(" "),r("h3",{attrs:{id:"部署"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#部署"}},[e._v("#")]),e._v(" 部署")]),e._v(" "),r("p",[e._v("经过"),r("code",[e._v("Venus")]),e._v("在 2022 年底的"),r("a",{attrs:{href:"https://github.com/filecoin-project/venus/discussions/5420",target:"_blank",rel:"noopener noreferrer"}},[e._v("品牌重塑"),r("OutboundLink")],1),e._v("之后,"),r("code",[e._v("Venus")]),e._v("拆分出 3 个产品,分别是"),r("a",{attrs:{href:"https://sophon.venus-fil.io/zh/",target:"_blank",rel:"noopener noreferrer"}},[e._v("智子"),r("OutboundLink")],1),e._v(","),r("a",{attrs:{href:"https://damocles.venus-fil.io/zh/",target:"_blank",rel:"noopener noreferrer"}},[e._v("执剑人"),r("OutboundLink")],1),e._v("以及"),r("a",{attrs:{href:"https://droplet.venus-fil.io/zh/",target:"_blank",rel:"noopener noreferrer"}},[e._v("水滴"),r("OutboundLink")],1),e._v("。关于各产品的具体部署流程,请参见各产品的文档。")]),e._v(" "),r("h3",{attrs:{id:"架构"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#架构"}},[e._v("#")]),e._v(" 架构")]),e._v(" "),r("img",{attrs:{src:"https://user-images.githubusercontent.com/1591330/227900001-a572c81d-607c-48ed-832e-54298ce87259.png",width:"800"}})])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[43],{437:function(e,t,r){"use strict";r.r(t);var n=r(17),s=Object(n.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h2",{attrs:{id:"部署venus解决方案"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#部署venus解决方案"}},[e._v("#")]),e._v(" 部署"),r("code",[e._v("Venus")]),e._v("解决方案")]),e._v(" "),r("p",[r("code",[e._v("Venus")]),e._v("泛指一系列与"),r("code",[e._v("filecoin")]),e._v("协议稳定/高效互动的软件产品。"),r("code",[e._v("Venus")]),e._v("的,目标群体大致分为"),r("code",[e._v("4")]),e._v("类。"),r("code",[e._v("SP")]),e._v("存储提供者,"),r("code",[e._v("SC")]),e._v("存储客户,生态合作伙伴,以及去中心化应用"),r("code",[e._v("Dapp")]),e._v("。"),r("code",[e._v("Venus")]),e._v("解决方案当前被广泛应用于"),r("code",[e._v("SP")]),e._v("和"),r("code",[e._v("SC")]),e._v("的场景中。")]),e._v(" "),r("h3",{attrs:{id:"部署"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#部署"}},[e._v("#")]),e._v(" 部署")]),e._v(" "),r("p",[e._v("经过"),r("code",[e._v("Venus")]),e._v("在 2022 年底的"),r("a",{attrs:{href:"https://github.com/filecoin-project/venus/discussions/5420",target:"_blank",rel:"noopener noreferrer"}},[e._v("品牌重塑"),r("OutboundLink")],1),e._v("之后,"),r("code",[e._v("Venus")]),e._v("拆分出 3 个产品,分别是"),r("a",{attrs:{href:"https://sophon.venus-fil.io/zh/",target:"_blank",rel:"noopener noreferrer"}},[e._v("智子"),r("OutboundLink")],1),e._v(","),r("a",{attrs:{href:"https://damocles.venus-fil.io/zh/",target:"_blank",rel:"noopener noreferrer"}},[e._v("执剑人"),r("OutboundLink")],1),e._v("以及"),r("a",{attrs:{href:"https://droplet.venus-fil.io/zh/",target:"_blank",rel:"noopener noreferrer"}},[e._v("水滴"),r("OutboundLink")],1),e._v("。关于各产品的具体部署流程,请参见各产品的文档。")]),e._v(" "),r("h3",{attrs:{id:"架构"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#架构"}},[e._v("#")]),e._v(" 架构")]),e._v(" "),r("img",{attrs:{src:"https://user-images.githubusercontent.com/1591330/227900001-a572c81d-607c-48ed-832e-54298ce87259.png",width:"800"}})])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/45.b2272df7.js b/assets/js/45.8ec2d89d.js similarity index 99% rename from assets/js/45.b2272df7.js rename to assets/js/45.8ec2d89d.js index 77b54e011..695889432 100644 --- a/assets/js/45.b2272df7.js +++ b/assets/js/45.8ec2d89d.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[45],{436:function(s,t,a){"use strict";a.r(t);var r=a(17),e=Object(r.a)({},(function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[a("h1",{attrs:{id:"算力增加与维持部署参考方案-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#算力增加与维持部署参考方案-2"}},[s._v("#")]),s._v(" 算力增加与维持部署参考方案 2")]),s._v(" "),a("h2",{attrs:{id:"机器配置"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#机器配置"}},[s._v("#")]),s._v(" 机器配置")]),s._v(" "),a("table",[a("thead",[a("tr",[a("th",[s._v("资源")]),s._v(" "),a("th",[s._v("配置")])])]),s._v(" "),a("tbody",[a("tr",[a("td",[s._v("CPU")]),s._v(" "),a("td",[s._v("AMD EPYC 7282 *1 (32c) 单路")])]),s._v(" "),a("tr",[a("td",[s._v("内存")]),s._v(" "),a("td",[s._v("32GB ECC/Reg, DDR4-3200 *8")])]),s._v(" "),a("tr",[a("td",[s._v("硬盘")]),s._v(" "),a("td",[s._v("M.2 NVME PCIe Gen3 x4 2TB SSD *2")])]),s._v(" "),a("tr",[a("td",[s._v("网卡")]),s._v(" "),a("td",[s._v("10G")])]),s._v(" "),a("tr",[a("td",[s._v("系统盘")]),s._v(" "),a("td",[s._v("500G")])]),s._v(" "),a("tr",[a("td",[s._v("显卡")]),s._v(" "),a("td",[s._v("3090 * 1")])]),s._v(" "),a("tr",[a("td",[s._v("存储")]),s._v(" "),a("td",[s._v("4TB SSD *25 RAID 5")])])])]),s._v(" "),a("p",[s._v("台数:1 台")]),s._v(" "),a("h2",{attrs:{id:"任务配比"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#任务配比"}},[s._v("#")]),s._v(" 任务配比")]),s._v(" "),a("p",[s._v("任务分为 AP,P1,P2,Commit 阶段")]),s._v(" "),a("table",[a("thead",[a("tr",[a("th",[s._v("运行方式")]),s._v(" "),a("th",[s._v("核数限制")]),s._v(" "),a("th",[s._v("耗时 (分钟)")]),s._v(" "),a("th",[s._v("内存消耗 (G)")]),s._v(" "),a("th",[s._v("效率 (个/小时)")]),s._v(" "),a("th",[s._v("日产量 (T)")])])]),s._v(" "),a("tbody",[a("tr",[a("td",[s._v("P1 * 5")]),s._v(" "),a("td",[s._v("20")]),s._v(" "),a("td",[s._v("220")]),s._v(" "),a("td",[s._v("376")]),s._v(" "),a("td",[s._v("1.3636")]),s._v(" "),a("td",[s._v("1.0227")])]),s._v(" "),a("tr",[a("td",[s._v("P2,AP,Commit")]),s._v(" "),a("td",[s._v("12")]),s._v(" "),a("td",[s._v("10")]),s._v(" "),a("td",[s._v("120")]),s._v(" "),a("td",[s._v("3")]),s._v(" "),a("td",[s._v("1.125")])])])]),s._v(" "),a("p",[s._v("资源说明:")]),s._v(" "),a("ul",[a("li",[s._v("内存加到 512G;")])]),s._v(" "),a("h2",{attrs:{id:"部署"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#部署"}},[s._v("#")]),s._v(" 部署")]),s._v(" "),a("ul",[a("li",[s._v("关闭超线程")])]),s._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 绝大多数的主板都可以设置关闭超线程,但需要重新启动。我们通过一种方式关闭一半CPU的映射关系来做到相同的效果,这种方式不需要重启,但是每次重启都会失效。")]),s._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("#!/bin/bash")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token for-or-select variable"}},[s._v("cpunum")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("in")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("$(")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("cat")]),s._v(" /sys/devices/system/cpu/cpu*/topology/thread_siblings_list "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("|")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("cut")]),s._v(" -s -d, -f2- "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("|")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("tr")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("','")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'"),a("span",{pre:!0,attrs:{class:"token entity",title:"\\n"}},[s._v("\\n")]),s._v("'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("|")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("sort")]),s._v(" -un"),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v(")")])]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("do")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v("echo")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("0")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" /sys/devices/system/cpu/cpu"),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("$cpunum")]),s._v("/online\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("done")]),s._v("\n")])])]),a("ul",[a("li",[a("p",[s._v("确保证明参数文件已下载,参数文件默认目录:/var/tmp/filecoin-proof-parameters")])]),s._v(" "),a("li",[a("p",[s._v("启动 venus-sealer: sealer 只做 windowPoSt.")])])]),s._v(" "),a("div",{staticClass:"language-sh extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sh"}},[a("code",[s._v("./venus-sealer --network"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("mainnet init --actor"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("MINER_ID"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" --node-url"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("/ip4/"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("IP_ADDRESS_OF_VENUS/tcp/3453 --messager-url"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("/ip4/"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("IP_ADDRESS_OF_VENUS_MESSAGER"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("/tcp/"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("PORT_OF_VENUS_MESSAGER"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" --gateway-url"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("/ip4/"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("IP_ADDRESS_OF_VENUS_GATEWAY"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("/tcp/"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("PORT_OF_VENUS_GATEWAY"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" --auth-token "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("AUTH_TOKEN_FOR_ACCOUNT_NAME"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" --no-local-storage\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 修改配置文件只允许sealer做wdpost")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v("Storage"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v("\n ParallelFetchLimit "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("10")]),s._v("\n AllowAddPiece "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("false")]),s._v("\n AllowPreCommit1 "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("false")]),s._v("\n AllowPreCommit2 "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("false")]),s._v("\n AllowCommit "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("false")]),s._v("\n AllowUnseal "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("false")]),s._v("\n \n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 启动venus-sealer")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("BELLMAN_CPU_UTILIZATION")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("0.2")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("FIL_PROOFS_USE_MULTICORE_SDR")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("nohup")]),s._v(" ./venus-sealer run "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" sealer.log "),a("span",{pre:!0,attrs:{class:"token operator"}},[a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("2")]),s._v(">")]),a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("&1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("&")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 设置store目录,因为sealer我们不做任务,故只需设置store目录")]),s._v("\n./venus-sealer storage attach --init --store "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("ABSOLUTE_PATH_OF_YOUR_PERMANENT_STORAGE"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n")])])]),a("blockquote",[a("p",[s._v("init 时加"),a("code",[s._v("--no-local-storage")]),s._v("不回创建默认的store/seal目录;")])]),s._v(" "),a("ul",[a("li",[s._v("启动 venus-worker-01: 只做 P1")])]),s._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("FIL_PROOFS_MAXIMIZE_CACHING")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("BELLMAN_CPU_UTILIZATION")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("0.2")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("FIL_PROOFS_USE_MULTICORE_SDR")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("\\")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("nohup")]),s._v(" ./venus-worker --repo"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("ABSOLUTE_PATH_OF_WORKER_0"),a("span",{pre:!0,attrs:{class:"token operator"}},[a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("1")]),s._v(">")]),s._v(" run --miner-addr"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("/ip4/127.0.0.1/tcp/2345 --miner-token"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("sealer token"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("\\")]),s._v("\n--addpiece"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("false --unseal"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("false --precommit2"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("false --commit"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("false --no-local-storage "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" worker-01.log "),a("span",{pre:!0,attrs:{class:"token operator"}},[a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("2")]),s._v(">")]),a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("&1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("&")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 指定seal路径")]),s._v("\n./venus-worker --repo"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("ABSOLUTE_PATH_OF_WORKER_0"),a("span",{pre:!0,attrs:{class:"token operator"}},[a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("1")]),s._v(">")]),s._v(" storage attach --init --seal "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("ABSOLUTE_LOCAL_PATH"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n")])])]),a("blockquote",[a("p",[s._v("FIL_PROOFS_MAXIMIZE_CACHING=1 表示做 P1 的时候把部分临时文件缓存到内存")])]),s._v(" "),a("ul",[a("li",[s._v("启动 venus-worker-02: 做 AP,P2,Commit 等任务")])]),s._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("BELLMAN_CPU_UTILIZATION")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("0.2")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("FIL_PROOFS_USE_MULTICORE_SDR")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("TMP_DIR")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("OTHER_PATH"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("\\")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("nohup")]),s._v(" ./venus-worker --repo"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("ABSOLUTE_PATH_OF_WORKER_0"),a("span",{pre:!0,attrs:{class:"token operator"}},[a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("2")]),s._v(">")]),s._v(" run --miner-addr"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("/ip4/127.0.0.1/tcp/2345 --miner-token"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("sealer token"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("\\")]),s._v("\n--precommit1"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("false --no-local-storage "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" worker-02.log "),a("span",{pre:!0,attrs:{class:"token operator"}},[a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("2")]),s._v(">")]),a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("&1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("&")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 指定seal路径")]),s._v("\n./venus-worker --repo"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("ABSOLUTE_PATH_OF_WORKER_0"),a("span",{pre:!0,attrs:{class:"token operator"}},[a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("2")]),s._v(">")]),s._v(" storage attach --init --seal "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("ABSOLUTE_LOCAL_PATH"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n")])])]),a("blockquote",[a("p",[s._v("设置 worker01 和 worker02 的 seal 路径相同,可以避免不必要的拷贝;")])]),s._v(" "),a("blockquote",[a("p",[s._v("P2 没有设置用 GPU;")])]),s._v(" "),a("blockquote",[a("p",[s._v("TMP_DIR 目的是为了避免和 venus-sealer 竞争 bellman.gpu.lock,C2 阶段会自动搜索用 GPU,如果和 wdPost 竞争 gpu 锁会报错")])]),s._v(" "),a("ul",[a("li",[s._v("设置发送消息的 wallet")])]),s._v(" "),a("div",{staticClass:"language-sh extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sh"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v("Addresses"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v("\n PreCommitControl "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# P2")]),s._v("\n CommitControl "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# C2")]),s._v("\n DisableOwnerFallback "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("true")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 禁用owner发消息")]),s._v("\n DisableWorkerFallback "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("false")]),s._v("\n")])])]),a("blockquote",[a("p",[s._v("根据上面字段的含义自己配置想要的结果")])]),s._v(" "),a("ul",[a("li",[s._v("限核:Cgrep 限核")])]),s._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 设置进程管理目录")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("sudo")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("mkdir")]),s._v(" -p /sys/fs/cgroup/cpuset/worker\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 设置能够使用的核数范围")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("sudo")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v("echo")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("0")]),s._v("-20 "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" /sys/fs/cgroup/cpuset/worker/cpuset.cpus\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 设置使用内存")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v("echo")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("0")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" cpuset.mems\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 加入进程的PID")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("sudo")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v("echo")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("PID"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" /sys/fs/cgroup/cpuset/worker/cgroup.procs\n\n")])])]),a("blockquote",[a("p",[s._v("PID: 进程 ID 号;")])]),s._v(" "),a("blockquote",[a("p",[s._v("每次 worker 重启后 PID 会变化,需要更新文件。")])]),s._v(" "),a("blockquote",[a("p",[s._v("/sys/fs/cgroup/cpuset是系统目录,worker是自己创建的.")])])])}),[],!1,null,null,null);t.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[45],{434:function(s,t,a){"use strict";a.r(t);var r=a(17),e=Object(r.a)({},(function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[a("h1",{attrs:{id:"算力增加与维持部署参考方案-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#算力增加与维持部署参考方案-2"}},[s._v("#")]),s._v(" 算力增加与维持部署参考方案 2")]),s._v(" "),a("h2",{attrs:{id:"机器配置"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#机器配置"}},[s._v("#")]),s._v(" 机器配置")]),s._v(" "),a("table",[a("thead",[a("tr",[a("th",[s._v("资源")]),s._v(" "),a("th",[s._v("配置")])])]),s._v(" "),a("tbody",[a("tr",[a("td",[s._v("CPU")]),s._v(" "),a("td",[s._v("AMD EPYC 7282 *1 (32c) 单路")])]),s._v(" "),a("tr",[a("td",[s._v("内存")]),s._v(" "),a("td",[s._v("32GB ECC/Reg, DDR4-3200 *8")])]),s._v(" "),a("tr",[a("td",[s._v("硬盘")]),s._v(" "),a("td",[s._v("M.2 NVME PCIe Gen3 x4 2TB SSD *2")])]),s._v(" "),a("tr",[a("td",[s._v("网卡")]),s._v(" "),a("td",[s._v("10G")])]),s._v(" "),a("tr",[a("td",[s._v("系统盘")]),s._v(" "),a("td",[s._v("500G")])]),s._v(" "),a("tr",[a("td",[s._v("显卡")]),s._v(" "),a("td",[s._v("3090 * 1")])]),s._v(" "),a("tr",[a("td",[s._v("存储")]),s._v(" "),a("td",[s._v("4TB SSD *25 RAID 5")])])])]),s._v(" "),a("p",[s._v("台数:1 台")]),s._v(" "),a("h2",{attrs:{id:"任务配比"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#任务配比"}},[s._v("#")]),s._v(" 任务配比")]),s._v(" "),a("p",[s._v("任务分为 AP,P1,P2,Commit 阶段")]),s._v(" "),a("table",[a("thead",[a("tr",[a("th",[s._v("运行方式")]),s._v(" "),a("th",[s._v("核数限制")]),s._v(" "),a("th",[s._v("耗时 (分钟)")]),s._v(" "),a("th",[s._v("内存消耗 (G)")]),s._v(" "),a("th",[s._v("效率 (个/小时)")]),s._v(" "),a("th",[s._v("日产量 (T)")])])]),s._v(" "),a("tbody",[a("tr",[a("td",[s._v("P1 * 5")]),s._v(" "),a("td",[s._v("20")]),s._v(" "),a("td",[s._v("220")]),s._v(" "),a("td",[s._v("376")]),s._v(" "),a("td",[s._v("1.3636")]),s._v(" "),a("td",[s._v("1.0227")])]),s._v(" "),a("tr",[a("td",[s._v("P2,AP,Commit")]),s._v(" "),a("td",[s._v("12")]),s._v(" "),a("td",[s._v("10")]),s._v(" "),a("td",[s._v("120")]),s._v(" "),a("td",[s._v("3")]),s._v(" "),a("td",[s._v("1.125")])])])]),s._v(" "),a("p",[s._v("资源说明:")]),s._v(" "),a("ul",[a("li",[s._v("内存加到 512G;")])]),s._v(" "),a("h2",{attrs:{id:"部署"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#部署"}},[s._v("#")]),s._v(" 部署")]),s._v(" "),a("ul",[a("li",[s._v("关闭超线程")])]),s._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 绝大多数的主板都可以设置关闭超线程,但需要重新启动。我们通过一种方式关闭一半CPU的映射关系来做到相同的效果,这种方式不需要重启,但是每次重启都会失效。")]),s._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("#!/bin/bash")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token for-or-select variable"}},[s._v("cpunum")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("in")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("$(")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("cat")]),s._v(" /sys/devices/system/cpu/cpu*/topology/thread_siblings_list "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("|")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("cut")]),s._v(" -s -d, -f2- "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("|")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("tr")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("','")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'"),a("span",{pre:!0,attrs:{class:"token entity",title:"\\n"}},[s._v("\\n")]),s._v("'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("|")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("sort")]),s._v(" -un"),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v(")")])]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("do")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v("echo")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("0")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" /sys/devices/system/cpu/cpu"),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("$cpunum")]),s._v("/online\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("done")]),s._v("\n")])])]),a("ul",[a("li",[a("p",[s._v("确保证明参数文件已下载,参数文件默认目录:/var/tmp/filecoin-proof-parameters")])]),s._v(" "),a("li",[a("p",[s._v("启动 venus-sealer: sealer 只做 windowPoSt.")])])]),s._v(" "),a("div",{staticClass:"language-sh extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sh"}},[a("code",[s._v("./venus-sealer --network"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("mainnet init --actor"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("MINER_ID"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" --node-url"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("/ip4/"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("IP_ADDRESS_OF_VENUS/tcp/3453 --messager-url"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("/ip4/"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("IP_ADDRESS_OF_VENUS_MESSAGER"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("/tcp/"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("PORT_OF_VENUS_MESSAGER"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" --gateway-url"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("/ip4/"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("IP_ADDRESS_OF_VENUS_GATEWAY"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("/tcp/"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("PORT_OF_VENUS_GATEWAY"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" --auth-token "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("AUTH_TOKEN_FOR_ACCOUNT_NAME"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" --no-local-storage\n \n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 修改配置文件只允许sealer做wdpost")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v("Storage"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v("\n ParallelFetchLimit "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("10")]),s._v("\n AllowAddPiece "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("false")]),s._v("\n AllowPreCommit1 "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("false")]),s._v("\n AllowPreCommit2 "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("false")]),s._v("\n AllowCommit "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("false")]),s._v("\n AllowUnseal "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("false")]),s._v("\n \n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 启动venus-sealer")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("BELLMAN_CPU_UTILIZATION")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("0.2")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("FIL_PROOFS_USE_MULTICORE_SDR")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("nohup")]),s._v(" ./venus-sealer run "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" sealer.log "),a("span",{pre:!0,attrs:{class:"token operator"}},[a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("2")]),s._v(">")]),a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("&1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("&")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 设置store目录,因为sealer我们不做任务,故只需设置store目录")]),s._v("\n./venus-sealer storage attach --init --store "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("ABSOLUTE_PATH_OF_YOUR_PERMANENT_STORAGE"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n")])])]),a("blockquote",[a("p",[s._v("init 时加"),a("code",[s._v("--no-local-storage")]),s._v("不回创建默认的store/seal目录;")])]),s._v(" "),a("ul",[a("li",[s._v("启动 venus-worker-01: 只做 P1")])]),s._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("FIL_PROOFS_MAXIMIZE_CACHING")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("BELLMAN_CPU_UTILIZATION")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("0.2")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("FIL_PROOFS_USE_MULTICORE_SDR")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("\\")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("nohup")]),s._v(" ./venus-worker --repo"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("ABSOLUTE_PATH_OF_WORKER_0"),a("span",{pre:!0,attrs:{class:"token operator"}},[a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("1")]),s._v(">")]),s._v(" run --miner-addr"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("/ip4/127.0.0.1/tcp/2345 --miner-token"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("sealer token"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("\\")]),s._v("\n--addpiece"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("false --unseal"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("false --precommit2"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("false --commit"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("false --no-local-storage "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" worker-01.log "),a("span",{pre:!0,attrs:{class:"token operator"}},[a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("2")]),s._v(">")]),a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("&1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("&")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 指定seal路径")]),s._v("\n./venus-worker --repo"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("ABSOLUTE_PATH_OF_WORKER_0"),a("span",{pre:!0,attrs:{class:"token operator"}},[a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("1")]),s._v(">")]),s._v(" storage attach --init --seal "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("ABSOLUTE_LOCAL_PATH"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n")])])]),a("blockquote",[a("p",[s._v("FIL_PROOFS_MAXIMIZE_CACHING=1 表示做 P1 的时候把部分临时文件缓存到内存")])]),s._v(" "),a("ul",[a("li",[s._v("启动 venus-worker-02: 做 AP,P2,Commit 等任务")])]),s._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("BELLMAN_CPU_UTILIZATION")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("0.2")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("FIL_PROOFS_USE_MULTICORE_SDR")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("TMP_DIR")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("OTHER_PATH"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("\\")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("nohup")]),s._v(" ./venus-worker --repo"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("ABSOLUTE_PATH_OF_WORKER_0"),a("span",{pre:!0,attrs:{class:"token operator"}},[a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("2")]),s._v(">")]),s._v(" run --miner-addr"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("/ip4/127.0.0.1/tcp/2345 --miner-token"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("sealer token"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("\\")]),s._v("\n--precommit1"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v("false --no-local-storage "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" worker-02.log "),a("span",{pre:!0,attrs:{class:"token operator"}},[a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("2")]),s._v(">")]),a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("&1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("&")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 指定seal路径")]),s._v("\n./venus-worker --repo"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("ABSOLUTE_PATH_OF_WORKER_0"),a("span",{pre:!0,attrs:{class:"token operator"}},[a("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[s._v("2")]),s._v(">")]),s._v(" storage attach --init --seal "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("ABSOLUTE_LOCAL_PATH"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n")])])]),a("blockquote",[a("p",[s._v("设置 worker01 和 worker02 的 seal 路径相同,可以避免不必要的拷贝;")])]),s._v(" "),a("blockquote",[a("p",[s._v("P2 没有设置用 GPU;")])]),s._v(" "),a("blockquote",[a("p",[s._v("TMP_DIR 目的是为了避免和 venus-sealer 竞争 bellman.gpu.lock,C2 阶段会自动搜索用 GPU,如果和 wdPost 竞争 gpu 锁会报错")])]),s._v(" "),a("ul",[a("li",[s._v("设置发送消息的 wallet")])]),s._v(" "),a("div",{staticClass:"language-sh extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sh"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v("Addresses"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v("\n PreCommitControl "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# P2")]),s._v("\n CommitControl "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# C2")]),s._v("\n DisableOwnerFallback "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("true")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 禁用owner发消息")]),s._v("\n DisableWorkerFallback "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("false")]),s._v("\n")])])]),a("blockquote",[a("p",[s._v("根据上面字段的含义自己配置想要的结果")])]),s._v(" "),a("ul",[a("li",[s._v("限核:Cgrep 限核")])]),s._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 设置进程管理目录")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("sudo")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("mkdir")]),s._v(" -p /sys/fs/cgroup/cpuset/worker\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 设置能够使用的核数范围")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("sudo")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v("echo")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("0")]),s._v("-20 "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" /sys/fs/cgroup/cpuset/worker/cpuset.cpus\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 设置使用内存")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v("echo")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("0")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" cpuset.mems\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 加入进程的PID")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("sudo")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v("echo")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("PID"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" /sys/fs/cgroup/cpuset/worker/cgroup.procs\n\n")])])]),a("blockquote",[a("p",[s._v("PID: 进程 ID 号;")])]),s._v(" "),a("blockquote",[a("p",[s._v("每次 worker 重启后 PID 会变化,需要更新文件。")])]),s._v(" "),a("blockquote",[a("p",[s._v("/sys/fs/cgroup/cpuset是系统目录,worker是自己创建的.")])])])}),[],!1,null,null,null);t.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/46.22b66e0c.js b/assets/js/46.28490732.js similarity index 99% rename from assets/js/46.22b66e0c.js rename to assets/js/46.28490732.js index 652f2dc4f..777dab2da 100644 --- a/assets/js/46.22b66e0c.js +++ b/assets/js/46.28490732.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[46],{438:function(a,s,t){"use strict";t.r(s);var e=t(17),n=Object(e.a)({},(function(){var a=this,s=a.$createElement,t=a._self._c||s;return t("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[t("h4",{attrs:{id:"一、服务器基础配置"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#一、服务器基础配置"}},[a._v("#")]),a._v(" 一、服务器基础配置:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("systemctl stop firewalld \nsystemctl disbale firewalld\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" /etc/selinux/config\n\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("SELINUX")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("disabled //修改selinux为disabled\nsetenforce "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("0")]),a._v(" //临时修改selinux状态\ngetenforce //查看selinux状态\n")])])]),t("h4",{attrs:{id:"二、安装相关软件包"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#二、安装相关软件包"}},[a._v("#")]),a._v(" 二、安装相关软件包")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# yum clean all && yum makecache")]),a._v("\n\n// server端安装zabbix-server和zabbix-agent\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# yum install zabbix-server-mysql zabbix-agent -y")]),a._v("\n\n//安装zabbix默认的nginx\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# yum install centos-release-scl -y")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# yum install rh-php72-php-mysqlnd zabbix-nginx-conf-scl -y")]),a._v("\n")])])]),t("p",[a._v("修改 zabbix 的安装源配置文件,启用前端的源")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# vim /etc/yum.repos.d/zabbix.repo ")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("[")]),a._v("zabbix-frontend"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("]")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("name")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("Zabbix Official Repository frontend - "),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$basearch")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("baseurl")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("http://repo.zabbix.com/zabbix/5.0/rhel/7/"),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$basearch")]),a._v("/frontend\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("enabled")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("1")]),a._v(" //此处改为1\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("gpgcheck")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("1")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("gpgkey")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591\n")])])]),t("h4",{attrs:{id:"三、安装-mysql"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#三、安装-mysql"}},[a._v("#")]),a._v(" 三、安装 MySQL")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mkdir")]),a._v(" mysql-dir\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" mysql-dir\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("wget")]),a._v(" https://downloads.mysql.com/archives/get/p/23/file/mysql-5.7.30-1.el7.x86_64.rpm-bundle.tar\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("tar")]),a._v(" -zxvf mysql-5.7.32-1.el7.x86_64.rpm-bundle.tar\nyum "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" *.rpm -y\n")])])]),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("systemctl start mysqld\n")])])]),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("cat")]),a._v(" /var/log/mysqld.log "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("grep")]),a._v(" root\n")])])]),t("p",[a._v("2021-07-26T10:50:49.538494Z 1 [Note] A temporary password is generated for root@localhost: "),t("strong",[a._v("20yyk:Ar67S;")])]),a._v(" "),t("p",[a._v("登录数据库:")]),a._v(" "),t("div",{staticClass:"language-mysql extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[a._v("# mysql -uroot -p\nEnter password: 20yyk:Ar67S;\n")])])]),t("p",[a._v("配置数据库:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("set")]),a._v(" global "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("validate_password_policy")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("0")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("set")]),a._v(" global "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("validate_password_length")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("1")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\nalter user "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'root'")]),a._v("@"),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'localhost'")]),a._v(" identified by "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'venus'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("#修改root登录密码为venus")]),a._v("\n\nuse mysql"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\nupdate user "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("set")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("host")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'%'")]),a._v(" where user "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'root'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\ncreate user "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'zabbix'")]),a._v("@"),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'%'")]),a._v(" identified by "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'123456'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\ngrant all privileges on zabbix.* to "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'zabbix'")]),a._v("@"),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'%'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\nflush privileges"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# 创建zabbix所需的数据库")]),a._v("\ncreate database zabbix character "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("set")]),a._v(" utf8 collate utf8_bin"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\n")])])]),t("p",[a._v("导入 zabbix 模版文件:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("zcat /usr/share/doc/zabbix-server-mysql-5.0.14/create.sql.gz "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" mysql -uzabbix -p123456 zabbix\n")])])]),t("h4",{attrs:{id:"四、修改-zabbix-默认配置文件"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#四、修改-zabbix-默认配置文件"}},[a._v("#")]),a._v(" 四、修改 zabbix 默认配置文件")]),a._v(" "),t("p",[a._v("1、修改连接数据库的密码:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# vim /etc/zabbix/zabbix_server.conf")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("DBPassword")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("123456")]),a._v("\n")])])]),t("p",[a._v("2、修改 nginx 和所属地域")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# 在第6行后边加上一个nginx")]),a._v("\nlisten.acl_users "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v(" apache,nginx\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# 在第24行修改zabbix所属的地域")]),a._v("\nphp_value"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("[")]),a._v("date.timezone"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("]")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v(" Asia/shanghai\n")])])]),t("p",[a._v("3、配置监听端口和访问方式")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" /etc/opt/rh/rh-nginx116/nginx/conf.d/zabbix.conf\nserver "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("{")]),a._v("\n listen "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("80")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("//取消注释\n server_name test.zabbix.com"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("//取消注释修改成IP或自己的域名\n")])])]),t("p",[a._v("4、如果是伪装域名则修改本地的 hosts 文件")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" /etc/hosts\n"),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("192.168")]),a._v(".xx.xx test.zabbix.com\n\nwindow hosts文件也需要添加一下\nC:"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("Windows"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("System32"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("drivers"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("etc"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("hosts\n"),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("192.168")]),a._v(".xxx.xxx test.zabbix.com \n")])])]),t("p",[a._v("5、启动服务并设为开机自启")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# 启动服务")]),a._v("\nsystemctl restart zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm\nsystemctl "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("enable")]),a._v(" zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm\n")])])]),t("p",[a._v("6、修改 zabbix-agent 的配置文件")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("cat")]),a._v(" /etc/zabbix/zabbix_agentd.conf "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("egrep")]),a._v(" -v "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"^$|^#"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("PidFile")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("/var/run/zabbix/zabbix_agentd.pid\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("LogFile")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("/var/log/zabbix/zabbix_agentd.log\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("LogFileSize")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("0")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("Server")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("192.168")]),a._v(".88.11 //指定zabbix-server的ip地址\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("Hostname")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("venus-sealer\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("Include")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("/etc/zabbix/zabbix_agentd.d/*.conf\n")])])]),t("h4",{attrs:{id:"四、配置-zabbix-监控主机"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#四、配置-zabbix-监控主机"}},[a._v("#")]),a._v(" 四、配置 zabbix 监控主机")]),a._v(" "),t("p",[a._v("1、在浏览器输入 zabbix-server 的 ip 地址或者主机名\n"),t("img",{attrs:{src:"/01-zabbix-install.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/02-zabbix-install.jpg",alt:""}})]),a._v(" "),t("p",[a._v("2、配置数据库连接地址信息\n"),t("img",{attrs:{src:"/03-zabbix-config.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/04-zabbix-hostname.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/05-zabbix-all.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/06-zabbix-finished.jpg",alt:""}})]),a._v(" "),t("p",[a._v("3、登录到 zabbix 系统,默认的用户为 Admin,密码为 zabbix;注意 Admin 的 A 是大写字母\n"),t("img",{attrs:{src:"/07-zabbix-login.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/08-zabbix-dashboard.jpg",alt:""}})]),a._v(" "),t("p",[a._v("4、添加 zabbix-agent 主机\n"),t("img",{attrs:{src:"/09-zabbix-agent.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/10-zabbix-agent-add.jpg",alt:""}})]),a._v(" "),t("p",[a._v("5、查看 zabbix 监控机器的内存图\n"),t("img",{attrs:{src:"/11-zabbix-graphs.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/12-zabbix-memory.jpg",alt:""}})]),a._v(" "),t("p",[a._v("6、异常报警,需要处理的机器\n"),t("img",{attrs:{src:"/13-Alarm-information.jpg",alt:""}})])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[46],{436:function(a,s,t){"use strict";t.r(s);var e=t(17),n=Object(e.a)({},(function(){var a=this,s=a.$createElement,t=a._self._c||s;return t("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[t("h4",{attrs:{id:"一、服务器基础配置"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#一、服务器基础配置"}},[a._v("#")]),a._v(" 一、服务器基础配置:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("systemctl stop firewalld \nsystemctl disbale firewalld\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" /etc/selinux/config\n\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("SELINUX")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("disabled //修改selinux为disabled\nsetenforce "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("0")]),a._v(" //临时修改selinux状态\ngetenforce //查看selinux状态\n")])])]),t("h4",{attrs:{id:"二、安装相关软件包"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#二、安装相关软件包"}},[a._v("#")]),a._v(" 二、安装相关软件包")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# yum clean all && yum makecache")]),a._v("\n\n// server端安装zabbix-server和zabbix-agent\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# yum install zabbix-server-mysql zabbix-agent -y")]),a._v("\n\n//安装zabbix默认的nginx\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# yum install centos-release-scl -y")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# yum install rh-php72-php-mysqlnd zabbix-nginx-conf-scl -y")]),a._v("\n")])])]),t("p",[a._v("修改 zabbix 的安装源配置文件,启用前端的源")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# vim /etc/yum.repos.d/zabbix.repo ")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("[")]),a._v("zabbix-frontend"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("]")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("name")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("Zabbix Official Repository frontend - "),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$basearch")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("baseurl")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("http://repo.zabbix.com/zabbix/5.0/rhel/7/"),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$basearch")]),a._v("/frontend\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("enabled")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("1")]),a._v(" //此处改为1\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("gpgcheck")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("1")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("gpgkey")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591\n")])])]),t("h4",{attrs:{id:"三、安装-mysql"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#三、安装-mysql"}},[a._v("#")]),a._v(" 三、安装 MySQL")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mkdir")]),a._v(" mysql-dir\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" mysql-dir\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("wget")]),a._v(" https://downloads.mysql.com/archives/get/p/23/file/mysql-5.7.30-1.el7.x86_64.rpm-bundle.tar\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("tar")]),a._v(" -zxvf mysql-5.7.32-1.el7.x86_64.rpm-bundle.tar\nyum "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" *.rpm -y\n")])])]),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("systemctl start mysqld\n")])])]),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("cat")]),a._v(" /var/log/mysqld.log "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("grep")]),a._v(" root\n")])])]),t("p",[a._v("2021-07-26T10:50:49.538494Z 1 [Note] A temporary password is generated for root@localhost: "),t("strong",[a._v("20yyk:Ar67S;")])]),a._v(" "),t("p",[a._v("登录数据库:")]),a._v(" "),t("div",{staticClass:"language-mysql extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[a._v("# mysql -uroot -p\nEnter password: 20yyk:Ar67S;\n")])])]),t("p",[a._v("配置数据库:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("set")]),a._v(" global "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("validate_password_policy")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("0")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("set")]),a._v(" global "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("validate_password_length")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("1")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\nalter user "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'root'")]),a._v("@"),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'localhost'")]),a._v(" identified by "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'venus'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("#修改root登录密码为venus")]),a._v("\n\nuse mysql"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\nupdate user "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("set")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("host")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'%'")]),a._v(" where user "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'root'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\ncreate user "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'zabbix'")]),a._v("@"),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'%'")]),a._v(" identified by "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'123456'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\ngrant all privileges on zabbix.* to "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'zabbix'")]),a._v("@"),t("span",{pre:!0,attrs:{class:"token string"}},[a._v("'%'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\nflush privileges"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# 创建zabbix所需的数据库")]),a._v("\ncreate database zabbix character "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("set")]),a._v(" utf8 collate utf8_bin"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\n")])])]),t("p",[a._v("导入 zabbix 模版文件:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("zcat /usr/share/doc/zabbix-server-mysql-5.0.14/create.sql.gz "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" mysql -uzabbix -p123456 zabbix\n")])])]),t("h4",{attrs:{id:"四、修改-zabbix-默认配置文件"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#四、修改-zabbix-默认配置文件"}},[a._v("#")]),a._v(" 四、修改 zabbix 默认配置文件")]),a._v(" "),t("p",[a._v("1、修改连接数据库的密码:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# vim /etc/zabbix/zabbix_server.conf")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("DBPassword")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("123456")]),a._v("\n")])])]),t("p",[a._v("2、修改 nginx 和所属地域")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# 在第6行后边加上一个nginx")]),a._v("\nlisten.acl_users "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v(" apache,nginx\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# 在第24行修改zabbix所属的地域")]),a._v("\nphp_value"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("[")]),a._v("date.timezone"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("]")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v(" Asia/shanghai\n")])])]),t("p",[a._v("3、配置监听端口和访问方式")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" /etc/opt/rh/rh-nginx116/nginx/conf.d/zabbix.conf\nserver "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("{")]),a._v("\n listen "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("80")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("//取消注释\n server_name test.zabbix.com"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("//取消注释修改成IP或自己的域名\n")])])]),t("p",[a._v("4、如果是伪装域名则修改本地的 hosts 文件")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" /etc/hosts\n"),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("192.168")]),a._v(".xx.xx test.zabbix.com\n\nwindow hosts文件也需要添加一下\nC:"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("Windows"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("System32"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("drivers"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("etc"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("hosts\n"),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("192.168")]),a._v(".xxx.xxx test.zabbix.com \n")])])]),t("p",[a._v("5、启动服务并设为开机自启")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# 启动服务")]),a._v("\nsystemctl restart zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm\nsystemctl "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("enable")]),a._v(" zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm\n")])])]),t("p",[a._v("6、修改 zabbix-agent 的配置文件")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("cat")]),a._v(" /etc/zabbix/zabbix_agentd.conf "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("egrep")]),a._v(" -v "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"^$|^#"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("PidFile")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("/var/run/zabbix/zabbix_agentd.pid\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("LogFile")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("/var/log/zabbix/zabbix_agentd.log\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("LogFileSize")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("0")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("Server")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("192.168")]),a._v(".88.11 //指定zabbix-server的ip地址\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("Hostname")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("venus-sealer\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("Include")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("/etc/zabbix/zabbix_agentd.d/*.conf\n")])])]),t("h4",{attrs:{id:"四、配置-zabbix-监控主机"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#四、配置-zabbix-监控主机"}},[a._v("#")]),a._v(" 四、配置 zabbix 监控主机")]),a._v(" "),t("p",[a._v("1、在浏览器输入 zabbix-server 的 ip 地址或者主机名\n"),t("img",{attrs:{src:"/01-zabbix-install.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/02-zabbix-install.jpg",alt:""}})]),a._v(" "),t("p",[a._v("2、配置数据库连接地址信息\n"),t("img",{attrs:{src:"/03-zabbix-config.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/04-zabbix-hostname.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/05-zabbix-all.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/06-zabbix-finished.jpg",alt:""}})]),a._v(" "),t("p",[a._v("3、登录到 zabbix 系统,默认的用户为 Admin,密码为 zabbix;注意 Admin 的 A 是大写字母\n"),t("img",{attrs:{src:"/07-zabbix-login.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/08-zabbix-dashboard.jpg",alt:""}})]),a._v(" "),t("p",[a._v("4、添加 zabbix-agent 主机\n"),t("img",{attrs:{src:"/09-zabbix-agent.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/10-zabbix-agent-add.jpg",alt:""}})]),a._v(" "),t("p",[a._v("5、查看 zabbix 监控机器的内存图\n"),t("img",{attrs:{src:"/11-zabbix-graphs.jpg",alt:""}}),a._v(" "),t("img",{attrs:{src:"/12-zabbix-memory.jpg",alt:""}})]),a._v(" "),t("p",[a._v("6、异常报警,需要处理的机器\n"),t("img",{attrs:{src:"/13-Alarm-information.jpg",alt:""}})])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/47.e4dd0b82.js b/assets/js/47.fee91691.js similarity index 90% rename from assets/js/47.e4dd0b82.js rename to assets/js/47.fee91691.js index 52797f556..641de8212 100644 --- a/assets/js/47.e4dd0b82.js +++ b/assets/js/47.fee91691.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[47],{437:function(e,t,s){"use strict";s.r(t);var i=s(17),n=Object(i.a)({},(function(){var e=this.$createElement,t=this._self._c||e;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("p",[t("em",[this._v("See something missing? Have tips to share? "),t("a",{attrs:{href:"https://github.com/filecoin-project/venus/issues/new",target:"_blank",rel:"noopener noreferrer"}},[this._v("File an issue"),t("OutboundLink")],1),this._v(", and we'll follow up as soon as possible. (If you have write permission in this repo, feel free to edit directly.)")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[47],{440:function(e,t,s){"use strict";s.r(t);var i=s(17),n=Object(i.a)({},(function(){var e=this.$createElement,t=this._self._c||e;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("p",[t("em",[this._v("See something missing? Have tips to share? "),t("a",{attrs:{href:"https://github.com/filecoin-project/venus/issues/new",target:"_blank",rel:"noopener noreferrer"}},[this._v("File an issue"),t("OutboundLink")],1),this._v(", and we'll follow up as soon as possible. (If you have write permission in this repo, feel free to edit directly.)")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/48.64fec3d5.js b/assets/js/48.77f6a3fc.js similarity index 97% rename from assets/js/48.64fec3d5.js rename to assets/js/48.77f6a3fc.js index 5756c0782..c1a5a870c 100644 --- a/assets/js/48.64fec3d5.js +++ b/assets/js/48.77f6a3fc.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[48],{439:function(t,v,_){"use strict";_.r(v);var d=_(17),r=Object(d.a)({},(function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[_("h1",{attrs:{id:"venus-集群日增算力-1t-机器选型方案"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#venus-集群日增算力-1t-机器选型方案"}},[t._v("#")]),t._v(" venus 集群日增算力 1T 机器选型方案")]),t._v(" "),_("h2",{attrs:{id:"机器配置"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#机器配置"}},[t._v("#")]),t._v(" 机器配置")]),t._v(" "),_("table",[_("thead",[_("tr",[_("th",[t._v("资源")]),t._v(" "),_("th",[t._v("配置")])])]),t._v(" "),_("tbody",[_("tr",[_("td",[t._v("CPU")]),t._v(" "),_("td",[t._v("3970X * 1 (32c)")])]),t._v(" "),_("tr",[_("td",[t._v("内存")]),t._v(" "),_("td",[t._v("512G")])]),t._v(" "),_("tr",[_("td",[t._v("硬盘")]),t._v(" "),_("td",[t._v("3T/SSD")])]),t._v(" "),_("tr",[_("td",[t._v("网卡")]),t._v(" "),_("td",[t._v("千兆")])]),t._v(" "),_("tr",[_("td",[t._v("系统盘")]),t._v(" "),_("td",[t._v("500G")])]),t._v(" "),_("tr",[_("td",[t._v("显卡")]),t._v(" "),_("td",[t._v("3080 * 1")])])])]),t._v(" "),_("p",[t._v("台数:1 台")]),t._v(" "),_("h2",{attrs:{id:"任务配比"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#任务配比"}},[t._v("#")]),t._v(" 任务配比")]),t._v(" "),_("p",[t._v("任务分为 AP,P1,P2,Commit 阶段")]),t._v(" "),_("table",[_("thead",[_("tr",[_("th",[t._v("运行方式")]),t._v(" "),_("th",[t._v("核数限制")]),t._v(" "),_("th",[t._v("耗时 (分钟)")]),t._v(" "),_("th",[t._v("内存消耗 (G)")]),t._v(" "),_("th",[t._v("效率 (个/小时)")]),t._v(" "),_("th",[t._v("日产量 (T)")])])]),t._v(" "),_("tbody",[_("tr",[_("td",[t._v("P1 * 5")]),t._v(" "),_("td",[t._v("20")]),t._v(" "),_("td",[t._v("220")]),t._v(" "),_("td",[t._v("376")]),t._v(" "),_("td",[t._v("1.3636")]),t._v(" "),_("td",[t._v("1.0227")])]),t._v(" "),_("tr",[_("td",[t._v("P2,AP,Commit")]),t._v(" "),_("td",[t._v("12")]),t._v(" "),_("td",[t._v("10")]),t._v(" "),_("td",[t._v("120")]),t._v(" "),_("td",[t._v("3")]),t._v(" "),_("td",[t._v("1.125")])])])]),t._v(" "),_("blockquote",[_("p",[t._v("关于限核,配置执行任务类型,并发任务数等请参考 venus-docs 项目中相关文档。")])])])}),[],!1,null,null,null);v.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[48],{438:function(t,v,_){"use strict";_.r(v);var d=_(17),r=Object(d.a)({},(function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[_("h1",{attrs:{id:"venus-集群日增算力-1t-机器选型方案"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#venus-集群日增算力-1t-机器选型方案"}},[t._v("#")]),t._v(" venus 集群日增算力 1T 机器选型方案")]),t._v(" "),_("h2",{attrs:{id:"机器配置"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#机器配置"}},[t._v("#")]),t._v(" 机器配置")]),t._v(" "),_("table",[_("thead",[_("tr",[_("th",[t._v("资源")]),t._v(" "),_("th",[t._v("配置")])])]),t._v(" "),_("tbody",[_("tr",[_("td",[t._v("CPU")]),t._v(" "),_("td",[t._v("3970X * 1 (32c)")])]),t._v(" "),_("tr",[_("td",[t._v("内存")]),t._v(" "),_("td",[t._v("512G")])]),t._v(" "),_("tr",[_("td",[t._v("硬盘")]),t._v(" "),_("td",[t._v("3T/SSD")])]),t._v(" "),_("tr",[_("td",[t._v("网卡")]),t._v(" "),_("td",[t._v("千兆")])]),t._v(" "),_("tr",[_("td",[t._v("系统盘")]),t._v(" "),_("td",[t._v("500G")])]),t._v(" "),_("tr",[_("td",[t._v("显卡")]),t._v(" "),_("td",[t._v("3080 * 1")])])])]),t._v(" "),_("p",[t._v("台数:1 台")]),t._v(" "),_("h2",{attrs:{id:"任务配比"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#任务配比"}},[t._v("#")]),t._v(" 任务配比")]),t._v(" "),_("p",[t._v("任务分为 AP,P1,P2,Commit 阶段")]),t._v(" "),_("table",[_("thead",[_("tr",[_("th",[t._v("运行方式")]),t._v(" "),_("th",[t._v("核数限制")]),t._v(" "),_("th",[t._v("耗时 (分钟)")]),t._v(" "),_("th",[t._v("内存消耗 (G)")]),t._v(" "),_("th",[t._v("效率 (个/小时)")]),t._v(" "),_("th",[t._v("日产量 (T)")])])]),t._v(" "),_("tbody",[_("tr",[_("td",[t._v("P1 * 5")]),t._v(" "),_("td",[t._v("20")]),t._v(" "),_("td",[t._v("220")]),t._v(" "),_("td",[t._v("376")]),t._v(" "),_("td",[t._v("1.3636")]),t._v(" "),_("td",[t._v("1.0227")])]),t._v(" "),_("tr",[_("td",[t._v("P2,AP,Commit")]),t._v(" "),_("td",[t._v("12")]),t._v(" "),_("td",[t._v("10")]),t._v(" "),_("td",[t._v("120")]),t._v(" "),_("td",[t._v("3")]),t._v(" "),_("td",[t._v("1.125")])])])]),t._v(" "),_("blockquote",[_("p",[t._v("关于限核,配置执行任务类型,并发任务数等请参考 venus-docs 项目中相关文档。")])])])}),[],!1,null,null,null);v.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/49.016b7fef.js b/assets/js/49.71e2c304.js similarity index 95% rename from assets/js/49.016b7fef.js rename to assets/js/49.71e2c304.js index 63eaca64a..fc4159e44 100644 --- a/assets/js/49.016b7fef.js +++ b/assets/js/49.71e2c304.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[49],{440:function(e,r,t){"use strict";t.r(r);var o=t(17),n=Object(o.a)({},(function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h2",{attrs:{id:"从-lotus-来的命令"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#从-lotus-来的命令"}},[e._v("#")]),e._v(" 从 Lotus 来的命令")]),e._v(" "),t("p",[e._v("很多日常的命令包括但不限于"),t("a",{attrs:{href:"https://lotus.filecoin.io/docs/storage-providers/addresses/",target:"_blank",rel:"noopener noreferrer"}},[e._v("创建worker/controler地址"),t("OutboundLink")],1),e._v(",设置不同的"),t("a",{attrs:{href:"https://lotus.filecoin.io/docs/storage-providers/config/",target:"_blank",rel:"noopener noreferrer"}},[e._v("配置"),t("OutboundLink")],1),e._v(",或者修改"),t("a",{attrs:{href:"https://lotus.filecoin.io/docs/storage-providers/lifecycle/#changing-storage-locations",target:"_blank",rel:"noopener noreferrer"}},[e._v("存储路径"),t("OutboundLink")],1),e._v("等等,都同时适用于"),t("code",[e._v("Lotus")]),e._v("和"),t("code",[e._v("Venus")]),e._v("。节点运维工程师可以按照 Lotus 文档中的步骤来操作。如果遇到任何问题,欢迎到"),t("a",{attrs:{href:"https://filecoinproject.slack.com/archives/C028PCH8L31",target:"_blank",rel:"noopener noreferrer"}},[e._v("#fil-venus-cn"),t("OutboundLink")],1),e._v("来提出问题。")])])}),[],!1,null,null,null);r.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[49],{439:function(e,r,t){"use strict";t.r(r);var o=t(17),n=Object(o.a)({},(function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h2",{attrs:{id:"从-lotus-来的命令"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#从-lotus-来的命令"}},[e._v("#")]),e._v(" 从 Lotus 来的命令")]),e._v(" "),t("p",[e._v("很多日常的命令包括但不限于"),t("a",{attrs:{href:"https://lotus.filecoin.io/docs/storage-providers/addresses/",target:"_blank",rel:"noopener noreferrer"}},[e._v("创建worker/controler地址"),t("OutboundLink")],1),e._v(",设置不同的"),t("a",{attrs:{href:"https://lotus.filecoin.io/docs/storage-providers/config/",target:"_blank",rel:"noopener noreferrer"}},[e._v("配置"),t("OutboundLink")],1),e._v(",或者修改"),t("a",{attrs:{href:"https://lotus.filecoin.io/docs/storage-providers/lifecycle/#changing-storage-locations",target:"_blank",rel:"noopener noreferrer"}},[e._v("存储路径"),t("OutboundLink")],1),e._v("等等,都同时适用于"),t("code",[e._v("Lotus")]),e._v("和"),t("code",[e._v("Venus")]),e._v("。节点运维工程师可以按照 Lotus 文档中的步骤来操作。如果遇到任何问题,欢迎到"),t("a",{attrs:{href:"https://filecoinproject.slack.com/archives/C028PCH8L31",target:"_blank",rel:"noopener noreferrer"}},[e._v("#fil-venus-cn"),t("OutboundLink")],1),e._v("来提出问题。")])])}),[],!1,null,null,null);r.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/50.a189479b.js b/assets/js/50.8950e677.js similarity index 98% rename from assets/js/50.a189479b.js rename to assets/js/50.8950e677.js index 352c707a2..fc2015689 100644 --- a/assets/js/50.a189479b.js +++ b/assets/js/50.8950e677.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[50],{443:function(t,a,e){"use strict";e.r(a);var s=e(17),r=Object(s.a)({},(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"market-v1-v2-升级指南"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#market-v1-v2-升级指南"}},[t._v("#")]),t._v(" market v1-v2 升级指南")]),t._v(" "),e("p",[t._v("market v1 升级到 v2 的过程中数据结构发生了变化,如果需要现有的数据请按照现有的步骤进行升级数据")]),t._v(" "),e("h2",{attrs:{id:"编译升级工具"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#编译升级工具"}},[t._v("#")]),t._v(" 编译升级工具")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("git clone https://github.com/filecoin-project/venus-market.git\ngit checkout feat/export_v1_data\n\nmake deps\ncd cli/market_export\ngo build\n")])])]),e("p",[t._v("执行上述步骤后会生成一个工具,这个工具用于导出 v1 版本的数据")]),t._v(" "),e("h2",{attrs:{id:"升级步骤"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#升级步骤"}},[t._v("#")]),t._v(" 升级步骤")]),t._v(" "),e("ol",[e("li",[e("p",[t._v("停止 venus-market 程序")])]),t._v(" "),e("li",[e("p",[t._v("备份 venus-market 数据目录,这个目录默认保存在 ~/.venusmarket.")])]),t._v(" "),e("li",[e("p",[t._v("导出 v1 版本的数据")]),t._v(" "),e("div",{staticClass:"language-sh extra-class"},[e("pre",{pre:!0,attrs:{class:"language-sh"}},[e("code",[t._v(" ./market_export --repo "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("venus-market repo"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("path of "),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" data file"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" \n")])])])]),t._v(" "),e("li",[e("p",[t._v("重新初始化 v2 版本的 venus-market(版本号必须高于 2.0.0 rc2)")])]),t._v(" "),e("li",[e("p",[t._v("执行 v2 版本的升级命令,这个命令用于导入步骤 3 中导出的数据。")]),t._v(" "),e("div",{staticClass:"language-sh extra-class"},[e("pre",{pre:!0,attrs:{class:"language-sh"}},[e("code",[t._v("./market_export --repo "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("venus-market repo"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" migrate import_v1 "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("path of "),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" data file"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("\n")])])])])]),t._v(" "),e("p",[e("em",[e("strong",[t._v("稳妥起见,做升级之前请确保没有处于 (Publish/Publishing/StorageDealAwaitingPreCommit) 状态的订单")])])])])}),[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[50],{442:function(t,a,e){"use strict";e.r(a);var s=e(17),r=Object(s.a)({},(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"market-v1-v2-升级指南"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#market-v1-v2-升级指南"}},[t._v("#")]),t._v(" market v1-v2 升级指南")]),t._v(" "),e("p",[t._v("market v1 升级到 v2 的过程中数据结构发生了变化,如果需要现有的数据请按照现有的步骤进行升级数据")]),t._v(" "),e("h2",{attrs:{id:"编译升级工具"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#编译升级工具"}},[t._v("#")]),t._v(" 编译升级工具")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("git clone https://github.com/filecoin-project/venus-market.git\ngit checkout feat/export_v1_data\n\nmake deps\ncd cli/market_export\ngo build\n")])])]),e("p",[t._v("执行上述步骤后会生成一个工具,这个工具用于导出 v1 版本的数据")]),t._v(" "),e("h2",{attrs:{id:"升级步骤"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#升级步骤"}},[t._v("#")]),t._v(" 升级步骤")]),t._v(" "),e("ol",[e("li",[e("p",[t._v("停止 venus-market 程序")])]),t._v(" "),e("li",[e("p",[t._v("备份 venus-market 数据目录,这个目录默认保存在 ~/.venusmarket.")])]),t._v(" "),e("li",[e("p",[t._v("导出 v1 版本的数据")]),t._v(" "),e("div",{staticClass:"language-sh extra-class"},[e("pre",{pre:!0,attrs:{class:"language-sh"}},[e("code",[t._v(" ./market_export --repo "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("venus-market repo"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("path of "),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" data file"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" \n")])])])]),t._v(" "),e("li",[e("p",[t._v("重新初始化 v2 版本的 venus-market(版本号必须高于 2.0.0 rc2)")])]),t._v(" "),e("li",[e("p",[t._v("执行 v2 版本的升级命令,这个命令用于导入步骤 3 中导出的数据。")]),t._v(" "),e("div",{staticClass:"language-sh extra-class"},[e("pre",{pre:!0,attrs:{class:"language-sh"}},[e("code",[t._v("./market_export --repo "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("venus-market repo"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" migrate import_v1 "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("path of "),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" data file"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("\n")])])])])]),t._v(" "),e("p",[e("em",[e("strong",[t._v("稳妥起见,做升级之前请确保没有处于 (Publish/Publishing/StorageDealAwaitingPreCommit) 状态的订单")])])])])}),[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/52.6a46003e.js b/assets/js/52.fead5f04.js similarity index 99% rename from assets/js/52.6a46003e.js rename to assets/js/52.fead5f04.js index c5bf7aa10..1512e1f69 100644 --- a/assets/js/52.6a46003e.js +++ b/assets/js/52.fead5f04.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[52],{442:function(e,v,a){"use strict";a.r(v);var t=a(17),s=Object(t.a)({},(function(){var e=this,v=e.$createElement,a=e._self._c||v;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h2",{attrs:{id:"nv16-各组件升级文档"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#nv16-各组件升级文档"}},[e._v("#")]),e._v(" nv16 各组件升级文档")]),e._v(" "),a("h3",{attrs:{id:"时间线"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#时间线"}},[e._v("#")]),e._v(" 时间线")]),e._v(" "),a("p",[e._v("升级时间:2022-07-06T14:00:00Z,北京时间是 2022-07-06 22:00:00(周三)")]),e._v(" "),a("h3",{attrs:{id:"venus-auth"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-auth"}},[e._v("#")]),e._v(" venus-auth")]),e._v(" "),a("p",[e._v("tag: v1.6.0")]),e._v(" "),a("p",[e._v("影响功能:支持多个 miner 共享同一个 token 的功能")]),e._v(" "),a("p",[e._v("依赖升级组件:无")]),e._v(" "),a("p",[e._v("注意事项:")]),e._v(" "),a("ol",[a("li",[a("p",[e._v("新增加一张 "),a("code",[e._v("miners")]),e._v(" 表,用于保存 "),a("code",[e._v("user")]),e._v(" 和 "),a("code",[e._v("miner")]),e._v(" 的对应关系")])]),e._v(" "),a("li",[a("p",[e._v("会把 "),a("code",[e._v("users")]),e._v(" 表每行数据的 "),a("code",[e._v("name")]),e._v(" 和 "),a("code",[e._v("miner")]),e._v(" 字段的值写入到 "),a("code",[e._v("miners")]),e._v(" 表中的 "),a("code",[e._v("user")]),e._v(" 和 "),a("code",[e._v("miner")]),e._v("字段,检查写入是否有问题,成功日志:migrate from:0, to:1 success;失败日志:migrate from store version:0 failed")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("./venus-auth user miner list ")]),e._v(" 可以查看每个用户绑定的 miner")])]),e._v(" "),a("li",[a("p",[e._v("使用命令 "),a("code",[e._v("./venus-auth user list")]),e._v("列出所有 user,"),a("strong",[e._v("确保被使用的 user 状态都为 enabled 状态")])])])]),e._v(" "),a("h3",{attrs:{id:"venus"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus"}},[e._v("#")]),e._v(" venus")]),e._v(" "),a("p",[e._v("tag: v1.6.0")]),e._v(" "),a("p",[e._v("影响功能:支持 nv16 网络")]),e._v(" "),a("p",[e._v("依赖升级组件:无")]),e._v(" "),a("p",[e._v("注意事项:")]),e._v(" "),a("ol",[a("li",[a("p",[e._v("升级后检查 vk 文件是否完整")])]),e._v(" "),a("li",[a("p",[e._v("升级后检查配置文件,升级高度是否正常设置,配置文件默认在 "),a("code",[e._v("~/.venus/config.json")]),e._v(" :")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('# cali\n"upgradeSkyrHeight": 1044660\n# mainnet\n"upgradeSkyrHeight": 1960320\n')])])])]),e._v(" "),a("li",[a("p",[e._v("升级后需检查是否正常同步区块")])]),e._v(" "),a("li",[a("p",[e._v("api 版本发生变化,影响 miner 的连接")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('# 用 curl 命令测试接口 StateGetBeaconEntry、BeaconGetEntry,下面三个 curl 命令返回结果应该一样\ncurl http://127.0.0.1:3453/rpc/v0 -X POST -H "Content-Type: application/json" -H "Authorization: Bearer token" -d \'{"method": "Filecoin.BeaconGetEntry","params":[1933610], "id": 0}\'\ncurl http://127.0.0.1:3453/rpc/v1 -X POST -H "Content-Type: application/json" -H "Authorization: Bearer token" -d \'{"method": "Filecoin.BeaconGetEntry","params":[1933610], "id": 0}\' \ncurl http://127.0.0.1:3453/rpc/v1 -X POST -H "Content-Type: application/json" -H "Authorization: Bearer token" -d \'{"method": "Filecoin.StateGetBeaconEntry","params":[1933610], "id": 0}\'\n')])])])]),e._v(" "),a("li",[a("p",[e._v("检查主网 v8 actors cid,确保与下面输出一样")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("./venus state actor-cids\n\n# 顺序可能会不一样\n_manifest bafy2bzacebogjbpiemi7npzxchgcjjki3tfxon4ims55obfyfleqntteljsea \naccount bafk2bzacedudbf7fc5va57t3tmo63snmt3en4iaidv4vo3qlyacbxaa6hlx6y \nstoragemarket bafk2bzacediohrxkp2fbsl4yj4jlupjdkgsiwqb4zuezvinhdo2j5hrxco62q \nstorageminer bafk2bzacecgnynvd3tene3bvqoknuspit56canij5bpra6wl4mrq2mxxwriyu \nmultisig bafk2bzacebhldfjuy4o5v7amrhp5p2gzv2qo5275jut4adnbyp56fxkwy5fag \npaymentchannel bafk2bzacebalad3f72wyk7qyilvfjijcwubdspytnyzlrhvn73254gqis44rq \nreward bafk2bzacecwzzxlgjiavnc3545cqqil3cmq4hgpvfp2crguxy2pl5ybusfsbe \nsystem bafk2bzacedwq5uppsw7vp55zpj7jdieizirmldceehu6wvombw3ixq2tcq57w \ncron bafk2bzacecqb3eolfurehny6yp7tgmapib4ocazo5ilkopjce2c7wc2bcec62 \ninit bafk2bzaceaipvjhoxmtofsnv3aj6gj5ida4afdrxa4ewku2hfipdlxpaektlw \nstoragepower bafk2bzacebjvqva6ppvysn5xpmiqcdfelwbbcxmghx5ww6hr37cgred6dyrpm \nverifiedregistry bafk2bzaceb3zbkjz3auizmoln2unmxep7dyfcmsre64vnqfhdyh7rkqfoxlw4\n")])])])]),e._v(" "),a("li",[a("p",[e._v("主网可以通过设置环境变量 "),a("code",[e._v("export VENUS_USE_FVM_TO_SYNC_MAINNET_V15=1")]),e._v(" 在 nv15 网络使用 fvm")])]),e._v(" "),a("li",[a("p",[e._v("若不排查问题,rust 日志级别"),a("strong",[e._v("不建议")]),e._v("设置为 "),a("code",[e._v("trace")]),e._v(",因为会打印较多日志")])]),e._v(" "),a("li",[a("p",[e._v("升级后可以通过命令来 "),a("code",[e._v("./venus state get-actor t01000")]),e._v(" 来确认是否升级成功")])])]),e._v(" "),a("h3",{attrs:{id:"venus-messager"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-messager"}},[e._v("#")]),e._v(" venus-messager")]),e._v(" "),a("p",[e._v("tag:v1.6.0")]),e._v(" "),a("p",[e._v("影响功能:支持新的网络版本,新增主目录,默认在 "),a("code",[e._v("~/.venus-messager")])]),e._v(" "),a("p",[e._v("依赖升级组件:")]),e._v(" "),a("p",[e._v("注意事项:")]),e._v(" "),a("ol",[a("li",[a("p",[e._v("升级后是否生成主目录 "),a("code",[e._v("~/.venus-messager")])])]),e._v(" "),a("li",[a("p",[e._v("升级后主目录应包含 "),a("code",[e._v("config.toml")]),e._v(" 和 "),a("code",[e._v("tipset.json")]),e._v(","),a("code",[e._v("config.toml")]),e._v(" 应与启动 "),a("code",[e._v("messager")]),e._v(" 使用的配置文件内容一致,"),a("code",[e._v("~/.venus-messager/tipset.json")]),e._v(" 是由当前目录中的 "),a("code",[e._v("tipset.json")]),e._v(" 拷贝而来")])]),e._v(" "),a("li",[a("p",[e._v("升级成功后再次重启是读取的配置是"),a("code",[e._v("~/.venus-messager/config.toml")])])]),e._v(" "),a("li",[a("p",[e._v("能否正常收到消息和推送消息到节点")])])]),e._v(" "),a("h3",{attrs:{id:"venus-miner"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-miner"}},[e._v("#")]),e._v(" venus-miner")]),e._v(" "),a("p",[e._v("tag: v1.6.0")]),e._v(" "),a("p",[e._v("影响功能:")]),e._v(" "),a("ol",[a("li",[e._v("获取 beacon 的接口名字 由 "),a("code",[e._v("BeaconGetEntry")]),e._v(" 改为 "),a("code",[e._v("StateGetBeaconEntry")])])]),e._v(" "),a("p",[e._v("依赖升级组件:venus,venus-auth,venus-gateway")]),e._v(" "),a("p",[e._v("注意事项:")]),e._v(" "),a("ol",[a("li",[e._v("升级后常用命令 address state/list/update验证一遍.")]),e._v(" "),a("li",[e._v("如果用 mysql 数据库,检查下 miner_blocks 表中 parent_key 字段是 varchar(1000)")])]),e._v(" "),a("h3",{attrs:{id:"venus-gateway"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-gateway"}},[e._v("#")]),e._v(" venus-gateway")]),e._v(" "),a("p",[e._v("tag: v1.6.0")]),e._v(" "),a("p",[e._v("影响功能:修复没有自动清理超时的请求")]),e._v(" "),a("p",[e._v("注意事项:")]),e._v(" "),a("ol",[a("li",[e._v("升级后 "),a("code",[e._v("wallet")]),e._v(" 是否重新注册上来")])]),e._v(" "),a("h3",{attrs:{id:"venus-market"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-market"}},[e._v("#")]),e._v(" venus-market")]),e._v(" "),a("p",[e._v("tag: v2.2.0")]),e._v(" "),a("p",[e._v("影响功能:")]),e._v(" "),a("p",[e._v("注意事项:")]),e._v(" "),a("h3",{attrs:{id:"venus-wallet"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-wallet"}},[e._v("#")]),e._v(" venus-wallet")]),e._v(" "),a("h4",{attrs:{id:"社区"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#社区"}},[e._v("#")]),e._v(" 社区")]),e._v(" "),a("p",[e._v("tag: v1.6.0")]),e._v(" "),a("p",[e._v("影响功能:")]),e._v(" "),a("p",[e._v("注意事项:")]),e._v(" "),a("ol",[a("li",[e._v("需要解锁钱包")]),e._v(" "),a("li",[e._v("是否注册到 gateway")])])])}),[],!1,null,null,null);v.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[52],{443:function(e,v,a){"use strict";a.r(v);var t=a(17),s=Object(t.a)({},(function(){var e=this,v=e.$createElement,a=e._self._c||v;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h2",{attrs:{id:"nv16-各组件升级文档"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#nv16-各组件升级文档"}},[e._v("#")]),e._v(" nv16 各组件升级文档")]),e._v(" "),a("h3",{attrs:{id:"时间线"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#时间线"}},[e._v("#")]),e._v(" 时间线")]),e._v(" "),a("p",[e._v("升级时间:2022-07-06T14:00:00Z,北京时间是 2022-07-06 22:00:00(周三)")]),e._v(" "),a("h3",{attrs:{id:"venus-auth"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-auth"}},[e._v("#")]),e._v(" venus-auth")]),e._v(" "),a("p",[e._v("tag: v1.6.0")]),e._v(" "),a("p",[e._v("影响功能:支持多个 miner 共享同一个 token 的功能")]),e._v(" "),a("p",[e._v("依赖升级组件:无")]),e._v(" "),a("p",[e._v("注意事项:")]),e._v(" "),a("ol",[a("li",[a("p",[e._v("新增加一张 "),a("code",[e._v("miners")]),e._v(" 表,用于保存 "),a("code",[e._v("user")]),e._v(" 和 "),a("code",[e._v("miner")]),e._v(" 的对应关系")])]),e._v(" "),a("li",[a("p",[e._v("会把 "),a("code",[e._v("users")]),e._v(" 表每行数据的 "),a("code",[e._v("name")]),e._v(" 和 "),a("code",[e._v("miner")]),e._v(" 字段的值写入到 "),a("code",[e._v("miners")]),e._v(" 表中的 "),a("code",[e._v("user")]),e._v(" 和 "),a("code",[e._v("miner")]),e._v("字段,检查写入是否有问题,成功日志:migrate from:0, to:1 success;失败日志:migrate from store version:0 failed")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("./venus-auth user miner list ")]),e._v(" 可以查看每个用户绑定的 miner")])]),e._v(" "),a("li",[a("p",[e._v("使用命令 "),a("code",[e._v("./venus-auth user list")]),e._v("列出所有 user,"),a("strong",[e._v("确保被使用的 user 状态都为 enabled 状态")])])])]),e._v(" "),a("h3",{attrs:{id:"venus"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus"}},[e._v("#")]),e._v(" venus")]),e._v(" "),a("p",[e._v("tag: v1.6.0")]),e._v(" "),a("p",[e._v("影响功能:支持 nv16 网络")]),e._v(" "),a("p",[e._v("依赖升级组件:无")]),e._v(" "),a("p",[e._v("注意事项:")]),e._v(" "),a("ol",[a("li",[a("p",[e._v("升级后检查 vk 文件是否完整")])]),e._v(" "),a("li",[a("p",[e._v("升级后检查配置文件,升级高度是否正常设置,配置文件默认在 "),a("code",[e._v("~/.venus/config.json")]),e._v(" :")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('# cali\n"upgradeSkyrHeight": 1044660\n# mainnet\n"upgradeSkyrHeight": 1960320\n')])])])]),e._v(" "),a("li",[a("p",[e._v("升级后需检查是否正常同步区块")])]),e._v(" "),a("li",[a("p",[e._v("api 版本发生变化,影响 miner 的连接")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('# 用 curl 命令测试接口 StateGetBeaconEntry、BeaconGetEntry,下面三个 curl 命令返回结果应该一样\ncurl http://127.0.0.1:3453/rpc/v0 -X POST -H "Content-Type: application/json" -H "Authorization: Bearer token" -d \'{"method": "Filecoin.BeaconGetEntry","params":[1933610], "id": 0}\'\ncurl http://127.0.0.1:3453/rpc/v1 -X POST -H "Content-Type: application/json" -H "Authorization: Bearer token" -d \'{"method": "Filecoin.BeaconGetEntry","params":[1933610], "id": 0}\' \ncurl http://127.0.0.1:3453/rpc/v1 -X POST -H "Content-Type: application/json" -H "Authorization: Bearer token" -d \'{"method": "Filecoin.StateGetBeaconEntry","params":[1933610], "id": 0}\'\n')])])])]),e._v(" "),a("li",[a("p",[e._v("检查主网 v8 actors cid,确保与下面输出一样")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("./venus state actor-cids\n\n# 顺序可能会不一样\n_manifest bafy2bzacebogjbpiemi7npzxchgcjjki3tfxon4ims55obfyfleqntteljsea \naccount bafk2bzacedudbf7fc5va57t3tmo63snmt3en4iaidv4vo3qlyacbxaa6hlx6y \nstoragemarket bafk2bzacediohrxkp2fbsl4yj4jlupjdkgsiwqb4zuezvinhdo2j5hrxco62q \nstorageminer bafk2bzacecgnynvd3tene3bvqoknuspit56canij5bpra6wl4mrq2mxxwriyu \nmultisig bafk2bzacebhldfjuy4o5v7amrhp5p2gzv2qo5275jut4adnbyp56fxkwy5fag \npaymentchannel bafk2bzacebalad3f72wyk7qyilvfjijcwubdspytnyzlrhvn73254gqis44rq \nreward bafk2bzacecwzzxlgjiavnc3545cqqil3cmq4hgpvfp2crguxy2pl5ybusfsbe \nsystem bafk2bzacedwq5uppsw7vp55zpj7jdieizirmldceehu6wvombw3ixq2tcq57w \ncron bafk2bzacecqb3eolfurehny6yp7tgmapib4ocazo5ilkopjce2c7wc2bcec62 \ninit bafk2bzaceaipvjhoxmtofsnv3aj6gj5ida4afdrxa4ewku2hfipdlxpaektlw \nstoragepower bafk2bzacebjvqva6ppvysn5xpmiqcdfelwbbcxmghx5ww6hr37cgred6dyrpm \nverifiedregistry bafk2bzaceb3zbkjz3auizmoln2unmxep7dyfcmsre64vnqfhdyh7rkqfoxlw4\n")])])])]),e._v(" "),a("li",[a("p",[e._v("主网可以通过设置环境变量 "),a("code",[e._v("export VENUS_USE_FVM_TO_SYNC_MAINNET_V15=1")]),e._v(" 在 nv15 网络使用 fvm")])]),e._v(" "),a("li",[a("p",[e._v("若不排查问题,rust 日志级别"),a("strong",[e._v("不建议")]),e._v("设置为 "),a("code",[e._v("trace")]),e._v(",因为会打印较多日志")])]),e._v(" "),a("li",[a("p",[e._v("升级后可以通过命令来 "),a("code",[e._v("./venus state get-actor t01000")]),e._v(" 来确认是否升级成功")])])]),e._v(" "),a("h3",{attrs:{id:"venus-messager"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-messager"}},[e._v("#")]),e._v(" venus-messager")]),e._v(" "),a("p",[e._v("tag:v1.6.0")]),e._v(" "),a("p",[e._v("影响功能:支持新的网络版本,新增主目录,默认在 "),a("code",[e._v("~/.venus-messager")])]),e._v(" "),a("p",[e._v("依赖升级组件:")]),e._v(" "),a("p",[e._v("注意事项:")]),e._v(" "),a("ol",[a("li",[a("p",[e._v("升级后是否生成主目录 "),a("code",[e._v("~/.venus-messager")])])]),e._v(" "),a("li",[a("p",[e._v("升级后主目录应包含 "),a("code",[e._v("config.toml")]),e._v(" 和 "),a("code",[e._v("tipset.json")]),e._v(","),a("code",[e._v("config.toml")]),e._v(" 应与启动 "),a("code",[e._v("messager")]),e._v(" 使用的配置文件内容一致,"),a("code",[e._v("~/.venus-messager/tipset.json")]),e._v(" 是由当前目录中的 "),a("code",[e._v("tipset.json")]),e._v(" 拷贝而来")])]),e._v(" "),a("li",[a("p",[e._v("升级成功后再次重启是读取的配置是"),a("code",[e._v("~/.venus-messager/config.toml")])])]),e._v(" "),a("li",[a("p",[e._v("能否正常收到消息和推送消息到节点")])])]),e._v(" "),a("h3",{attrs:{id:"venus-miner"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-miner"}},[e._v("#")]),e._v(" venus-miner")]),e._v(" "),a("p",[e._v("tag: v1.6.0")]),e._v(" "),a("p",[e._v("影响功能:")]),e._v(" "),a("ol",[a("li",[e._v("获取 beacon 的接口名字 由 "),a("code",[e._v("BeaconGetEntry")]),e._v(" 改为 "),a("code",[e._v("StateGetBeaconEntry")])])]),e._v(" "),a("p",[e._v("依赖升级组件:venus,venus-auth,venus-gateway")]),e._v(" "),a("p",[e._v("注意事项:")]),e._v(" "),a("ol",[a("li",[e._v("升级后常用命令 address state/list/update验证一遍.")]),e._v(" "),a("li",[e._v("如果用 mysql 数据库,检查下 miner_blocks 表中 parent_key 字段是 varchar(1000)")])]),e._v(" "),a("h3",{attrs:{id:"venus-gateway"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-gateway"}},[e._v("#")]),e._v(" venus-gateway")]),e._v(" "),a("p",[e._v("tag: v1.6.0")]),e._v(" "),a("p",[e._v("影响功能:修复没有自动清理超时的请求")]),e._v(" "),a("p",[e._v("注意事项:")]),e._v(" "),a("ol",[a("li",[e._v("升级后 "),a("code",[e._v("wallet")]),e._v(" 是否重新注册上来")])]),e._v(" "),a("h3",{attrs:{id:"venus-market"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-market"}},[e._v("#")]),e._v(" venus-market")]),e._v(" "),a("p",[e._v("tag: v2.2.0")]),e._v(" "),a("p",[e._v("影响功能:")]),e._v(" "),a("p",[e._v("注意事项:")]),e._v(" "),a("h3",{attrs:{id:"venus-wallet"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-wallet"}},[e._v("#")]),e._v(" venus-wallet")]),e._v(" "),a("h4",{attrs:{id:"社区"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#社区"}},[e._v("#")]),e._v(" 社区")]),e._v(" "),a("p",[e._v("tag: v1.6.0")]),e._v(" "),a("p",[e._v("影响功能:")]),e._v(" "),a("p",[e._v("注意事项:")]),e._v(" "),a("ol",[a("li",[e._v("需要解锁钱包")]),e._v(" "),a("li",[e._v("是否注册到 gateway")])])])}),[],!1,null,null,null);v.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/54.92a0388d.js b/assets/js/54.b4d61541.js similarity index 99% rename from assets/js/54.92a0388d.js rename to assets/js/54.b4d61541.js index a49a89409..e479535a6 100644 --- a/assets/js/54.92a0388d.js +++ b/assets/js/54.b4d61541.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[54],{445:function(a,e,t){"use strict";t.r(e);var s=t(17),r=Object(s.a)({},(function(){var a=this,e=a.$createElement,t=a._self._c||e;return t("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[t("h2",{attrs:{id:"nv18-各组件升级文档"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#nv18-各组件升级文档"}},[a._v("#")]),a._v(" nv18 各组件升级文档")]),a._v(" "),t("p",[a._v("如果 venus 各组件的版本从 "),t("code",[a._v("v1.8.x")]),a._v(" 升级到 "),t("code",[a._v("v1.10.0")]),a._v(",请先阅读 "),t("a",{attrs:{href:"https://github.com/filecoin-project/venus/discussions/5531",target:"_blank",rel:"noopener noreferrer"}},[a._v("venus chain-service v1.9.* & venus-market v2.5.* upgrade list / 链服务 v1.9.*和订单服务 v2.5.*升级清单"),t("OutboundLink")],1),a._v(",尤其注意 "),t("code",[a._v("venus-auth")]),a._v(" 和 "),t("code",[a._v("venus-market")]),a._v(" 的升级,"),t("code",[a._v("venus-auth")]),a._v(" 升级前需要为每一个矿工都创建一个用户,"),t("code",[a._v("venus-market")]),a._v(" 的启动方式和配置有较大变动。")]),a._v(" "),t("h3",{attrs:{id:"时间线"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#时间线"}},[a._v("#")]),a._v(" 时间线")]),a._v(" "),t("p",[a._v("升级时间:2023-03-14T15:14:00Z,北京时间是 2023-03-14 23:14:00")]),a._v(" "),t("h3",{attrs:{id:"各组件版本"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#各组件版本"}},[a._v("#")]),a._v(" 各组件版本")]),a._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/filecoin-project/venus/discussions/5649#discussioncomment-4652920",target:"_blank",rel:"noopener noreferrer"}},[a._v("calibrationnet"),t("OutboundLink")],1)]),a._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/filecoin-project/venus/discussions/5649#discussioncomment-4652933",target:"_blank",rel:"noopener noreferrer"}},[a._v("mainnet"),t("OutboundLink")],1)])]),a._v(" "),t("h3",{attrs:{id:"venus"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#venus"}},[a._v("#")]),a._v(" venus")]),a._v(" "),t("p",[a._v("影响功能:支持 nv18 网络")]),a._v(" "),t("p",[a._v("依赖升级组件:无")]),a._v(" "),t("p",[a._v("注意事项:")]),a._v(" "),t("ol",[t("li",[t("p",[a._v("编译:先 "),t("code",[a._v("make dist-clean")]),a._v(" 再 "),t("code",[a._v("make")]),a._v(",这样可以防止未能正常升级 "),t("code",[a._v("filecoin-ffi")]),a._v(" 而带来的问题")])]),a._v(" "),t("li",[t("p",[a._v("升级后检查 vk 文件是否完整")])]),a._v(" "),t("li",[t("p",[a._v("升级后检查配置文件,通过日志检查 "),t("code",[a._v("AllowableClockDriftSecs")]),a._v(" "),t("code",[a._v("UpgradeHyggeHeight")]),a._v(" 和 "),t("code",[a._v("UpgradeHyggeHeight")]),a._v(" 是否正常 :")]),a._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[a._v("# cali\nAllowableClockDriftSecs:1\nEip155ChainID:314159\nUpgradeHyggeHeight:322354\n# mainnet\nAllowableClockDriftSecs:1\nEip155ChainID:314\nUpgradeHyggeHeight:2683348\n")])])])]),a._v(" "),t("li",[t("p",[a._v("升级后需检查是否正常同步区块")])]),a._v(" "),t("li",[t("p",[a._v("检查主网 v10 actors code,确保与下面输出一样")]),a._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[a._v("./venus state actor-cids --network-version 18\n\n# 顺序可能会不一样\nNetwork Version: 18\nActor Version: 10\nActor CID \ndatacap bafk2bzacealj5uk7wixhvk7l5tnredtelralwnceafqq34nb2lbylhtuyo64u \nevm bafk2bzaceahmzdxhqsm7cu2mexusjp6frm7r4kdesvti3etv5evfqboos2j4g \ninit bafk2bzaced2f5rhir3hbpqbz5ght7ohv2kgj42g5ykxrypuo2opxsup3ykwl6 \naccount bafk2bzaceampw4romta75hyz5p4cqriypmpbgnkxncgxgqn6zptv5lsp2w2bo \nethaccount bafk2bzaceaqoc5zakbhjxn3jljc4lxnthllzunhdor7sxhwgmskvc6drqc3fa \nmultisig bafk2bzaceduf3hayh63jnl4z2knxv7cnrdenoubni22fxersc4octlwpxpmy4 \npaymentchannel bafk2bzaceartlg4mrbwgzcwric6mtvyawpbgx2xclo2vj27nna57nxynf3pgc \nreward bafk2bzacebnhtaejfjtzymyfmbdrfmo7vgj3zsof6zlucbmkhrvcuotw5dxpq \nstoragemarket bafk2bzaceclejwjtpu2dhw3qbx6ow7b4pmhwa7ocrbbiqwp36sq5yeg6jz2bc \nstorageminer bafk2bzaced4h7noksockro7glnssz2jnmo2rpzd7dvnmfs4p24zx3h6gtx47s \nverifiedregistry bafk2bzacedfel6edzqpe5oujno7fog4i526go4dtcs6vwrdtbpy2xq6htvcg6 \neam bafk2bzacedrpm5gbleh4xkyo2jvs7p5g6f34soa6dpv7ashcdgy676snsum6g \nplaceholder bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro \nstoragepower bafk2bzacec4ay4crzo73ypmh7o3fjendhbqrxake46bprabw67fvwjz5q6ixq \nsystem bafk2bzacedakk5nofebyup4m7nvx6djksfwhnxzrfuq4oyemhpl4lllaikr64 \ncron bafk2bzacedcbtsifegiu432m5tysjzkxkmoczxscb6hqpmrr6img7xzdbbs2g\n")])])])]),a._v(" "),t("li",[t("p",[a._v("若不排查问题,rust 日志级别"),t("strong",[a._v("不建议")]),a._v("设置为 "),t("code",[a._v("trace")]),a._v(",因为会打印较多日志")])]),a._v(" "),t("li",[t("p",[a._v("升级后可以通过命令来 "),t("code",[a._v("./venus state get-actor t01000")]),a._v(" 来确认是否升级成功")])]),a._v(" "),t("li",[t("p",[a._v("actor 迁移")]),a._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[a._v("预迁移高度是升级高度前 60 个高度:2683288\npre-migration 开始:STARTING pre-migration 结束:COMPLETED pre-migration\nmigration 开始:STARTING migration 结束:COMPLETED migration\n")])])])]),a._v(" "),t("li",[t("p",[a._v("配置变更")]),a._v(" "),t("div",{staticClass:"language-json extra-class"},[t("pre",{pre:!0,attrs:{class:"language-json"}},[t("code",[a._v("# 增加 fevm 相关配置,其中 enableEthRPC 字段用来控制是否启用 ETH RPC,默认是 "),t("span",{pre:!0,attrs:{class:"token boolean"}},[a._v("false")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"fevm"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("{")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"enableEthRPC"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token boolean"}},[a._v("false")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"ethTxHashMappingLifetimeDays"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("0")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"event"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("{")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"enableRealTimeFilterAPI"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token boolean"}},[a._v("false")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"enableHistoricFilterAPI"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token boolean"}},[a._v("false")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"filterTTL"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"24h0m0s"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"maxFilters"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("100")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"maxFilterResults"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("10000")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"maxFilterHeightRange"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("2880")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"databasePath"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('""')]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("}")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("}")]),a._v("\n\n# 增加 allowableClockDriftSecs 字段,默认是 "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("1")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"parameters"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("{")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"allowableClockDriftSecs"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("1")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("}")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n")])])])])]),a._v(" "),t("h3",{attrs:{id:"venus-auth"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#venus-auth"}},[a._v("#")]),a._v(" venus-auth")]),a._v(" "),t("p",[a._v("影响功能:")]),a._v(" "),t("p",[a._v("依赖升级组件:无")]),a._v(" "),t("p",[a._v("注意事项:")]),a._v(" "),t("ol",[t("li",[a._v("命令行能否正常使用")])]),a._v(" "),t("h3",{attrs:{id:"venus-messager"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#venus-messager"}},[a._v("#")]),a._v(" venus-messager")]),a._v(" "),t("p",[a._v("功能:")]),a._v(" "),t("ol",[t("li",[a._v("补充对接口权限的验证")])]),a._v(" "),t("p",[a._v("依赖升级组件:")]),a._v(" "),t("p",[a._v("注意事项:")]),a._v(" "),t("ol",[t("li",[t("p",[a._v("升级后观察能够正常收消息")])]),a._v(" "),t("li",[t("p",[a._v("升级后观察消息能否正常上链")])]),a._v(" "),t("li",[t("p",[t("code",[a._v("ReplacedMsg")]),a._v(" 更名为 "),t("code",[a._v("NonceConflictMsg")])])])]),a._v(" "),t("h3",{attrs:{id:"venus-miner"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#venus-miner"}},[a._v("#")]),a._v(" venus-miner")]),a._v(" "),t("p",[a._v("影响功能:")]),a._v(" "),t("p",[a._v("依赖升级组件:")]),a._v(" "),t("p",[a._v("注意事项:")]),a._v(" "),t("ol",[t("li",[a._v("升级后能否正常出块")])]),a._v(" "),t("h3",{attrs:{id:"venus-gateway"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#venus-gateway"}},[a._v("#")]),a._v(" venus-gateway")]),a._v(" "),t("p",[a._v("影响功能:")]),a._v(" "),t("p",[a._v("注意事项:")]),a._v(" "),t("p",[a._v("编译:先 "),t("code",[a._v("make dist-clean")]),a._v(" 再 "),t("code",[a._v("make")])]),a._v(" "),t("ol",[t("li",[a._v("升级后检查钱包:"),t("code",[a._v("./venus-gateway wallet list")])]),a._v(" "),t("li",[a._v("升级后检查矿工:"),t("code",[a._v("./venus-gateway miner list")])])]),a._v(" "),t("h3",{attrs:{id:"venus-market"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#venus-market"}},[a._v("#")]),a._v(" venus-market")]),a._v(" "),t("p",[a._v("影响功能:")]),a._v(" "),t("p",[a._v("注意事项:")]),a._v(" "),t("p",[a._v("编译:先 "),t("code",[a._v("make dist-clean")]),a._v(" 再 "),t("code",[a._v("make")])]),a._v(" "),t("h3",{attrs:{id:"venus-wallet"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#venus-wallet"}},[a._v("#")]),a._v(" venus-wallet")]),a._v(" "),t("p",[a._v("影响功能:")]),a._v(" "),t("p",[a._v("注意事项:")]),a._v(" "),t("ol",[t("li",[a._v("启动后需要解锁钱包")]),a._v(" "),t("li",[a._v("是否注册到 gateway")])]),a._v(" "),t("h3",{attrs:{id:"venus-sector-manager"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#venus-sector-manager"}},[a._v("#")]),a._v(" venus-sector-manager")]),a._v(" "),t("p",[a._v("编译:先 "),t("code",[a._v("make dist-clean")]),a._v(" 再 "),t("code",[a._v("make")])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[54],{446:function(a,e,t){"use strict";t.r(e);var s=t(17),r=Object(s.a)({},(function(){var a=this,e=a.$createElement,t=a._self._c||e;return t("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[t("h2",{attrs:{id:"nv18-各组件升级文档"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#nv18-各组件升级文档"}},[a._v("#")]),a._v(" nv18 各组件升级文档")]),a._v(" "),t("p",[a._v("如果 venus 各组件的版本从 "),t("code",[a._v("v1.8.x")]),a._v(" 升级到 "),t("code",[a._v("v1.10.0")]),a._v(",请先阅读 "),t("a",{attrs:{href:"https://github.com/filecoin-project/venus/discussions/5531",target:"_blank",rel:"noopener noreferrer"}},[a._v("venus chain-service v1.9.* & venus-market v2.5.* upgrade list / 链服务 v1.9.*和订单服务 v2.5.*升级清单"),t("OutboundLink")],1),a._v(",尤其注意 "),t("code",[a._v("venus-auth")]),a._v(" 和 "),t("code",[a._v("venus-market")]),a._v(" 的升级,"),t("code",[a._v("venus-auth")]),a._v(" 升级前需要为每一个矿工都创建一个用户,"),t("code",[a._v("venus-market")]),a._v(" 的启动方式和配置有较大变动。")]),a._v(" "),t("h3",{attrs:{id:"时间线"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#时间线"}},[a._v("#")]),a._v(" 时间线")]),a._v(" "),t("p",[a._v("升级时间:2023-03-14T15:14:00Z,北京时间是 2023-03-14 23:14:00")]),a._v(" "),t("h3",{attrs:{id:"各组件版本"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#各组件版本"}},[a._v("#")]),a._v(" 各组件版本")]),a._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/filecoin-project/venus/discussions/5649#discussioncomment-4652920",target:"_blank",rel:"noopener noreferrer"}},[a._v("calibrationnet"),t("OutboundLink")],1)]),a._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/filecoin-project/venus/discussions/5649#discussioncomment-4652933",target:"_blank",rel:"noopener noreferrer"}},[a._v("mainnet"),t("OutboundLink")],1)])]),a._v(" "),t("h3",{attrs:{id:"venus"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#venus"}},[a._v("#")]),a._v(" venus")]),a._v(" "),t("p",[a._v("影响功能:支持 nv18 网络")]),a._v(" "),t("p",[a._v("依赖升级组件:无")]),a._v(" "),t("p",[a._v("注意事项:")]),a._v(" "),t("ol",[t("li",[t("p",[a._v("编译:先 "),t("code",[a._v("make dist-clean")]),a._v(" 再 "),t("code",[a._v("make")]),a._v(",这样可以防止未能正常升级 "),t("code",[a._v("filecoin-ffi")]),a._v(" 而带来的问题")])]),a._v(" "),t("li",[t("p",[a._v("升级后检查 vk 文件是否完整")])]),a._v(" "),t("li",[t("p",[a._v("升级后检查配置文件,通过日志检查 "),t("code",[a._v("AllowableClockDriftSecs")]),a._v(" "),t("code",[a._v("UpgradeHyggeHeight")]),a._v(" 和 "),t("code",[a._v("UpgradeHyggeHeight")]),a._v(" 是否正常 :")]),a._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[a._v("# cali\nAllowableClockDriftSecs:1\nEip155ChainID:314159\nUpgradeHyggeHeight:322354\n# mainnet\nAllowableClockDriftSecs:1\nEip155ChainID:314\nUpgradeHyggeHeight:2683348\n")])])])]),a._v(" "),t("li",[t("p",[a._v("升级后需检查是否正常同步区块")])]),a._v(" "),t("li",[t("p",[a._v("检查主网 v10 actors code,确保与下面输出一样")]),a._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[a._v("./venus state actor-cids --network-version 18\n\n# 顺序可能会不一样\nNetwork Version: 18\nActor Version: 10\nActor CID \ndatacap bafk2bzacealj5uk7wixhvk7l5tnredtelralwnceafqq34nb2lbylhtuyo64u \nevm bafk2bzaceahmzdxhqsm7cu2mexusjp6frm7r4kdesvti3etv5evfqboos2j4g \ninit bafk2bzaced2f5rhir3hbpqbz5ght7ohv2kgj42g5ykxrypuo2opxsup3ykwl6 \naccount bafk2bzaceampw4romta75hyz5p4cqriypmpbgnkxncgxgqn6zptv5lsp2w2bo \nethaccount bafk2bzaceaqoc5zakbhjxn3jljc4lxnthllzunhdor7sxhwgmskvc6drqc3fa \nmultisig bafk2bzaceduf3hayh63jnl4z2knxv7cnrdenoubni22fxersc4octlwpxpmy4 \npaymentchannel bafk2bzaceartlg4mrbwgzcwric6mtvyawpbgx2xclo2vj27nna57nxynf3pgc \nreward bafk2bzacebnhtaejfjtzymyfmbdrfmo7vgj3zsof6zlucbmkhrvcuotw5dxpq \nstoragemarket bafk2bzaceclejwjtpu2dhw3qbx6ow7b4pmhwa7ocrbbiqwp36sq5yeg6jz2bc \nstorageminer bafk2bzaced4h7noksockro7glnssz2jnmo2rpzd7dvnmfs4p24zx3h6gtx47s \nverifiedregistry bafk2bzacedfel6edzqpe5oujno7fog4i526go4dtcs6vwrdtbpy2xq6htvcg6 \neam bafk2bzacedrpm5gbleh4xkyo2jvs7p5g6f34soa6dpv7ashcdgy676snsum6g \nplaceholder bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro \nstoragepower bafk2bzacec4ay4crzo73ypmh7o3fjendhbqrxake46bprabw67fvwjz5q6ixq \nsystem bafk2bzacedakk5nofebyup4m7nvx6djksfwhnxzrfuq4oyemhpl4lllaikr64 \ncron bafk2bzacedcbtsifegiu432m5tysjzkxkmoczxscb6hqpmrr6img7xzdbbs2g\n")])])])]),a._v(" "),t("li",[t("p",[a._v("若不排查问题,rust 日志级别"),t("strong",[a._v("不建议")]),a._v("设置为 "),t("code",[a._v("trace")]),a._v(",因为会打印较多日志")])]),a._v(" "),t("li",[t("p",[a._v("升级后可以通过命令来 "),t("code",[a._v("./venus state get-actor t01000")]),a._v(" 来确认是否升级成功")])]),a._v(" "),t("li",[t("p",[a._v("actor 迁移")]),a._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[a._v("预迁移高度是升级高度前 60 个高度:2683288\npre-migration 开始:STARTING pre-migration 结束:COMPLETED pre-migration\nmigration 开始:STARTING migration 结束:COMPLETED migration\n")])])])]),a._v(" "),t("li",[t("p",[a._v("配置变更")]),a._v(" "),t("div",{staticClass:"language-json extra-class"},[t("pre",{pre:!0,attrs:{class:"language-json"}},[t("code",[a._v("# 增加 fevm 相关配置,其中 enableEthRPC 字段用来控制是否启用 ETH RPC,默认是 "),t("span",{pre:!0,attrs:{class:"token boolean"}},[a._v("false")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"fevm"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("{")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"enableEthRPC"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token boolean"}},[a._v("false")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"ethTxHashMappingLifetimeDays"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("0")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"event"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("{")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"enableRealTimeFilterAPI"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token boolean"}},[a._v("false")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"enableHistoricFilterAPI"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token boolean"}},[a._v("false")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"filterTTL"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"24h0m0s"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"maxFilters"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("100")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"maxFilterResults"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("10000")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"maxFilterHeightRange"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("2880")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"databasePath"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('""')]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("}")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("}")]),a._v("\n\n# 增加 allowableClockDriftSecs 字段,默认是 "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("1")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"parameters"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("{")]),a._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[a._v('"allowableClockDriftSecs"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("1")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("}")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n")])])])])]),a._v(" "),t("h3",{attrs:{id:"venus-auth"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#venus-auth"}},[a._v("#")]),a._v(" venus-auth")]),a._v(" "),t("p",[a._v("影响功能:")]),a._v(" "),t("p",[a._v("依赖升级组件:无")]),a._v(" "),t("p",[a._v("注意事项:")]),a._v(" "),t("ol",[t("li",[a._v("命令行能否正常使用")])]),a._v(" "),t("h3",{attrs:{id:"venus-messager"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#venus-messager"}},[a._v("#")]),a._v(" venus-messager")]),a._v(" "),t("p",[a._v("功能:")]),a._v(" "),t("ol",[t("li",[a._v("补充对接口权限的验证")])]),a._v(" "),t("p",[a._v("依赖升级组件:")]),a._v(" "),t("p",[a._v("注意事项:")]),a._v(" "),t("ol",[t("li",[t("p",[a._v("升级后观察能够正常收消息")])]),a._v(" "),t("li",[t("p",[a._v("升级后观察消息能否正常上链")])]),a._v(" "),t("li",[t("p",[t("code",[a._v("ReplacedMsg")]),a._v(" 更名为 "),t("code",[a._v("NonceConflictMsg")])])])]),a._v(" "),t("h3",{attrs:{id:"venus-miner"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#venus-miner"}},[a._v("#")]),a._v(" venus-miner")]),a._v(" "),t("p",[a._v("影响功能:")]),a._v(" "),t("p",[a._v("依赖升级组件:")]),a._v(" "),t("p",[a._v("注意事项:")]),a._v(" "),t("ol",[t("li",[a._v("升级后能否正常出块")])]),a._v(" "),t("h3",{attrs:{id:"venus-gateway"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#venus-gateway"}},[a._v("#")]),a._v(" venus-gateway")]),a._v(" "),t("p",[a._v("影响功能:")]),a._v(" "),t("p",[a._v("注意事项:")]),a._v(" "),t("p",[a._v("编译:先 "),t("code",[a._v("make dist-clean")]),a._v(" 再 "),t("code",[a._v("make")])]),a._v(" "),t("ol",[t("li",[a._v("升级后检查钱包:"),t("code",[a._v("./venus-gateway wallet list")])]),a._v(" "),t("li",[a._v("升级后检查矿工:"),t("code",[a._v("./venus-gateway miner list")])])]),a._v(" "),t("h3",{attrs:{id:"venus-market"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#venus-market"}},[a._v("#")]),a._v(" venus-market")]),a._v(" "),t("p",[a._v("影响功能:")]),a._v(" "),t("p",[a._v("注意事项:")]),a._v(" "),t("p",[a._v("编译:先 "),t("code",[a._v("make dist-clean")]),a._v(" 再 "),t("code",[a._v("make")])]),a._v(" "),t("h3",{attrs:{id:"venus-wallet"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#venus-wallet"}},[a._v("#")]),a._v(" venus-wallet")]),a._v(" "),t("p",[a._v("影响功能:")]),a._v(" "),t("p",[a._v("注意事项:")]),a._v(" "),t("ol",[t("li",[a._v("启动后需要解锁钱包")]),a._v(" "),t("li",[a._v("是否注册到 gateway")])]),a._v(" "),t("h3",{attrs:{id:"venus-sector-manager"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#venus-sector-manager"}},[a._v("#")]),a._v(" venus-sector-manager")]),a._v(" "),t("p",[a._v("编译:先 "),t("code",[a._v("make dist-clean")]),a._v(" 再 "),t("code",[a._v("make")])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/55.38df145b.js b/assets/js/55.94170daa.js similarity index 99% rename from assets/js/55.38df145b.js rename to assets/js/55.94170daa.js index 852b22e07..3f30505bd 100644 --- a/assets/js/55.38df145b.js +++ b/assets/js/55.94170daa.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[55],{446:function(v,e,a){"use strict";a.r(e);var t=a(17),_=Object(t.a)({},(function(){var v=this,e=v.$createElement,a=v._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":v.$parent.slotKey}},[a("h1",{attrs:{id:"venus-各组件升级文档"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-各组件升级文档"}},[v._v("#")]),v._v(" Venus 各组件升级文档")]),v._v(" "),a("h2",{attrs:{id:"注意事项"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#注意事项"}},[v._v("#")]),v._v(" 注意事项")]),v._v(" "),a("ol",[a("li",[v._v("所有组件全部更换")]),v._v(" "),a("li",[v._v("更新完通过 curl 命令调用 "),a("code",[v._v("Version")]),v._v(" 接口检查版本号,各组件接口调用方式:https://github.com/filecoin-project/venus/issues/5132")]),v._v(" "),a("li",[v._v("pre/pro消息上链的情况")]),v._v(" "),a("li",[v._v("WD 消息上链的情况")]),v._v(" "),a("li",[v._v("出块情况是否正常")]),v._v(" "),a("li",[v._v("gas fee 相关设置是否生效")])]),v._v(" "),a("h2",{attrs:{id:"需要升级的组件"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#需要升级的组件"}},[v._v("#")]),v._v(" 需要升级的组件")]),v._v(" "),a("table",[a("thead",[a("tr",[a("th",[v._v("组件名")]),v._v(" "),a("th",[v._v("tag")]),v._v(" "),a("th",[v._v("commit")])])]),v._v(" "),a("tbody",[a("tr",[a("td",[v._v("venus-auth")]),v._v(" "),a("td",[v._v("v1.11.0")]),v._v(" "),a("td",[v._v("0c30588")])]),v._v(" "),a("tr",[a("td",[v._v("venus")]),v._v(" "),a("td",[v._v("v1.11.1")]),v._v(" "),a("td",[v._v("870f1b4")])]),v._v(" "),a("tr",[a("td",[v._v("venus-messager")]),v._v(" "),a("td",[v._v("v1.11.0")]),v._v(" "),a("td",[v._v("e4c4ab4")])]),v._v(" "),a("tr",[a("td",[v._v("venus-gateway")]),v._v(" "),a("td",[v._v("v1.11.1")]),v._v(" "),a("td",[v._v("8d7be74")])]),v._v(" "),a("tr",[a("td",[v._v("venus-wallet")]),v._v(" "),a("td",[v._v("v1.11.0")]),v._v(" "),a("td",[v._v("7afa1eb")])]),v._v(" "),a("tr",[a("td",[v._v("venus-miner")]),v._v(" "),a("td",[v._v("v1.11.0")]),v._v(" "),a("td",[v._v("a30f342")])]),v._v(" "),a("tr",[a("td",[v._v("venus-market")]),v._v(" "),a("td",[v._v("v2.7.1")]),v._v(" "),a("td",[v._v("b920551")])]),v._v(" "),a("tr",[a("td",[v._v("venus-sector-manager")]),v._v(" "),a("td",[v._v("v0.6.0-rc3")]),v._v(" "),a("td",[v._v("134b502")])]),v._v(" "),a("tr",[a("td",[v._v("venus-worker")]),v._v(" "),a("td",[v._v("无需升级")]),v._v(" "),a("td",[v._v("-")])])])]),v._v(" "),a("h3",{attrs:{id:"升级顺序"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#升级顺序"}},[v._v("#")]),v._v(" 升级顺序")]),v._v(" "),a("ol",[a("li",[v._v("venus-auth")]),v._v(" "),a("li",[v._v("venus")]),v._v(" "),a("li",[v._v("venus-gateway")]),v._v(" "),a("li",[v._v("venus-messager")]),v._v(" "),a("li",[v._v("venus-miner")]),v._v(" "),a("li",[v._v("venus-market")]),v._v(" "),a("li",[v._v("venus-wallet-pro")]),v._v(" "),a("li",[v._v("venus-sector-manager")])]),v._v(" "),a("h3",{attrs:{id:"venus-auth"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-auth"}},[v._v("#")]),v._v(" venus-auth")]),v._v(" "),a("p",[v._v("影响功能:")]),v._v(" "),a("ul",[a("li",[v._v("其他组件对获取 auth 的服务")])]),v._v(" "),a("p",[v._v("依赖升级组件:无")]),v._v(" "),a("p",[v._v("注意事项:")]),v._v(" "),a("ul",[a("li",[v._v('启动时使用 "--disable-perm-check" ,暂时关闭 auth 接口保护的特性')]),v._v(" "),a("li",[v._v("创建 token 之前需要先创建对应的用户")])]),v._v(" "),a("p",[v._v("备注:")]),v._v(" "),a("ul",[a("li",[v._v('新版本的 auth 在启动的时候会自动生成一个名为 "defaultLocalToken" 的 token, 该 token 用于 auth-cli 执行命令时的鉴权')])]),v._v(" "),a("h3",{attrs:{id:"venus"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus"}},[v._v("#")]),v._v(" venus")]),v._v(" "),a("p",[v._v("影响功能:无")]),v._v(" "),a("p",[v._v("依赖升级组件:venus-auth")]),v._v(" "),a("p",[v._v("注意事项:")]),v._v(" "),a("p",[v._v("编译:先 "),a("code",[v._v("make dist-clean")]),v._v(" 再 "),a("code",[v._v("make")]),v._v(",这样可以防止未能正常升级 "),a("code",[v._v("filecoin-ffi")]),v._v(" 而带来的问题")]),v._v(" "),a("p",[a("strong",[v._v("启动时应带上 flag --auth-token ,或者修改配置文件 api.venusAuthToken 配置项")])]),v._v(" "),a("ol",[a("li",[a("p",[v._v("升级后检查 vk 文件是否完整")])]),v._v(" "),a("li",[a("p",[v._v("升级后检查配置文件,通过日志检查 "),a("code",[v._v("UpgradeLightningHeight")]),v._v(" 和 "),a("code",[v._v("UpgradeThunderHeight")]),v._v(" 是否正常 :")]),v._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[v._v("# cali\nUpgradeLightningHeight:489094\nUpgradeThunderHeight:489094+3120\n# mainnet\nUpgradeLightningHeight:2809800\nUpgradeThunderHeight: 2809800 + 2880*21 = 2870280\n")])])])]),v._v(" "),a("li",[a("p",[v._v("升级后需检查是否正常同步区块")])]),v._v(" "),a("li",[a("p",[v._v("检查主网 v11 actors code,确保与下面输出一样")]),v._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[v._v("./venus state actor-cids --network-version 19\n\n# 顺序可能会不一样\nNetwork Version: 19\nActor Version: 11\nActor CID\nreward bafk2bzacebwjw2vxkobs7r2kwjdqqb42h2kucyuk6flbnyzw4odg5s4mogamo\nsystem bafk2bzaced7npe5mt5nh72jxr2igi2sofoa7gedt4w6kueeke7i3xxugqpjfm\neam bafk2bzaceaelwt4yfsfvsu3pa3miwalsvy3cfkcjvmt4sqoeopsppnrmj2mf2\ncron bafk2bzacebpewdvvgt6tk2o2u4rcovdgym67tadiis5usemlbejg7k3kt567o\ndatacap bafk2bzacebslykoyrb2hm7aacjngqgd5n2wmeii2goadrs5zaya3pvdf6pdnq\nethaccount bafk2bzaceclkmc4yidxc6lgcjpfypbde2eddnevcveo4j5kmh4ek6inqysz2k\nevm bafk2bzacediwh6etwzwmb5pivtclpdplewdjzphouwqpppce6opisjv2fjqfe\ninit bafk2bzaceckwf3w6n2nw6eh77ktmsxqgsvshonvgnyk5q5syyngtetxvasfxg\nmultisig bafk2bzaceafajceqwg5ybiz7xw6rxammuirkgtuv625gzaehsqfprm4bazjmk\npaymentchannel bafk2bzaceb4e6cnsnviegmqvsmoxzncruvhra54piq7bwiqfqevle6oob2gvo\naccount bafk2bzacealnlr7st6lkwoh6wxpf2hnrlex5sknaopgmkr2tuhg7vmbfy45so\nstorageminer bafk2bzacec24okjqrp7c7rj3hbrs5ez5apvwah2ruka6haesgfngf37mhk6us\nstoragepower bafk2bzaceaxgloxuzg35vu7l7tohdgaq2frsfp4ejmuo7tkoxjp5zqrze6sf4\nplaceholder bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro\nverifiedregistry bafk2bzacedej3dnr62g2je2abmyjg3xqv4otvh6e26du5fcrhvw7zgcaaez3a\nstoragemarket bafk2bzaceazu2j2zu4p24tr22btnqzkhzjvyjltlvsagaj6w3syevikeb5d7m\n")])])])]),v._v(" "),a("li",[a("p",[v._v("若不排查问题,rust 日志级别"),a("strong",[v._v("不建议")]),v._v("设置为 "),a("code",[v._v("trace")]),v._v(",因为会打印较多日志")])]),v._v(" "),a("li",[a("p",[v._v("升级后可以通过命令来 "),a("code",[v._v("./venus state get-actor t01000")]),v._v(" 来确认是否升级成功")])]),v._v(" "),a("li",[a("p",[v._v("actor 迁移")]),v._v(" "),a("p",[a("strong",[v._v("经测试本次预迁移时间在 80 秒左右,正式迁移时间再 60 秒左右")])]),v._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[v._v("预迁移高度是升级高度前 120 个高度:2809800 - 120 = 2809680\npre-migration 开始:STARTING pre-migration 结束:COMPLETED pre-migration\nmigration 开始:STARTING migration 结束:COMPLETED migration\n")])])])])]),v._v(" "),a("h3",{attrs:{id:"venus-gateway"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-gateway"}},[v._v("#")]),v._v(" venus-gateway")]),v._v(" "),a("p",[v._v("影响功能:无")]),v._v(" "),a("p",[v._v("依赖升级组件:venus-auth")]),v._v(" "),a("p",[v._v("注意事项:")]),v._v(" "),a("ul",[a("li",[v._v("编译时,需要先 "),a("code",[v._v("make dist-clean")]),v._v(" 再 "),a("code",[v._v("make")])]),v._v(" "),a("li",[v._v("启动时,应带上 flag --auth-token ,或者直接在配置中设置配置项:AuthConfig.Token")]),v._v(" "),a("li",[v._v("移除 flag:"),a("code",[v._v("--disable-address-verify")]),v._v(","),a("strong",[v._v("升级时检查启动命令是否还在使用该 flag")])])]),v._v(" "),a("h3",{attrs:{id:"venus-messager"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-messager"}},[v._v("#")]),v._v(" venus-messager")]),v._v(" "),a("p",[v._v("影响功能:")]),v._v(" "),a("ul",[a("li",[v._v("消息 replace")]),v._v(" "),a("li",[v._v("list --block 命令")])]),v._v(" "),a("p",[v._v("依赖升级组件:venus, venus-auth, venus-gateway")]),v._v(" "),a("p",[v._v("注意事项:")]),v._v(" "),a("ul",[a("li",[v._v("升级第一次启动时,带上 auth-token flag, 或者先修改配置文件 JWTConfig.Token 配置项")]),v._v(" "),a("li",[v._v("升级之后需要观察能否正常接收消息,消息能否正常上链")])]),v._v(" "),a("p",[v._v("备注:")]),v._v(" "),a("ul",[a("li",[v._v("replace fee 系数的最小值 由 1.25 下调 到 1.11")]),v._v(" "),a("li",[v._v("list blocked 消息的时候,unfill 状态的消息也会作为 blocked 消息被列出来")])]),v._v(" "),a("h3",{attrs:{id:"venus-miner"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-miner"}},[v._v("#")]),v._v(" venus-miner")]),v._v(" "),a("p",[v._v("影响功能:")]),v._v(" "),a("ul",[a("li",[v._v("选消息增加超时机制")])]),v._v(" "),a("p",[v._v("依赖升级组件:auth, venus, gateway")]),v._v(" "),a("p",[v._v("注意事项:")]),v._v(" "),a("ul",[a("li",[v._v("配置文件中 [Auth].[Token] 必须配置,且在 venus-auth 中具有 admin 权限,不要使用"),a("code",[v._v("defaultLocalToken")]),v._v("对应的 token,应手动创建一个。")])]),v._v(" "),a("h3",{attrs:{id:"venus-market"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-market"}},[v._v("#")]),v._v(" venus-market")]),v._v(" "),a("p",[v._v("影响功能:")]),v._v(" "),a("ul",[a("li",[v._v("新增和调整部分命令\n依赖升级组件:auth, venus, gateway, messager")])]),v._v(" "),a("p",[v._v("注意事项:")]),v._v(" "),a("ul",[a("li",[v._v("启动时必须带上 cs-token, 或者修改 配置项 AuthNode.Token")])]),v._v(" "),a("h3",{attrs:{id:"venus-wallet"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-wallet"}},[v._v("#")]),v._v(" venus-wallet")]),v._v(" "),a("p",[v._v("影响功能:无")]),v._v(" "),a("p",[v._v("依赖升级组件:gateway")]),v._v(" "),a("p",[v._v("注意事项:")]),v._v(" "),a("ul",[a("li",[v._v("升级后观察是否正常签名,消息能否正常上链")])]),v._v(" "),a("h3",{attrs:{id:"venus-sector-manger"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-sector-manger"}},[v._v("#")]),v._v(" venus-sector-manger")]),v._v(" "),a("p",[v._v("影响功能:fip-0061 wdpost 算法改动")]),v._v(" "),a("p",[v._v("依赖升级组件:链服务组件")]),v._v(" "),a("p",[v._v("注意事项:")]),v._v(" "),a("ul",[a("li",[v._v("编译时,需要先 "),a("code",[v._v("make dist-clean")]),v._v(" 再 "),a("code",[v._v("make")])]),v._v(" "),a("li",[v._v("wdpost 算法回滚步骤\n"),a("ol",[a("li",[v._v("vsm 切换到 [fip-0061-fallback] https://github.com/ipfs-force-community/venus-cluster/tree/fip-0061-fallback 分支")])])])]),v._v(" "),a("hr"),v._v(" "),a("p",[v._v("更新结果验证步骤:")]),v._v(" "),a("ol",[a("li",[v._v("程序启动正常")]),v._v(" "),a("li",[v._v("pre/pro消息正常上链")]),v._v(" "),a("li",[v._v("出块正常")]),v._v(" "),a("li",[v._v("WD 上链正常")]),v._v(" "),a("li",[v._v("算力增长正常")]),v._v(" "),a("li",[v._v("真实订单检索正常")]),v._v(" "),a("li",[v._v("数据库各种 gas,生命周期,聚合设置正常")])]),v._v(" "),a("h3",{attrs:{id:"数据库变更"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#数据库变更"}},[v._v("#")]),v._v(" 数据库变更")]),v._v(" "),a("ol",[a("li",[a("p",[a("a",{attrs:{href:"https://github.com/filecoin-project/venus/issues/5558",target:"_blank",rel:"noopener noreferrer"}},[v._v("venus-messager 增加对 actor 的配置及相关命令,新增 "),a("code",[v._v("actor_cfg")]),v._v(" 表"),a("OutboundLink")],1)])]),v._v(" "),a("li",[a("p",[v._v("venus-market "),a("code",[v._v("storage_deals")]),v._v(" 表增加索引:"),a("code",[v._v("CREATE INDEX idx_cdpprovider_state ON storage_deals(cdp_provider,state)")])])])])])}),[],!1,null,null,null);e.default=_.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[55],{445:function(v,e,a){"use strict";a.r(e);var t=a(17),_=Object(t.a)({},(function(){var v=this,e=v.$createElement,a=v._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":v.$parent.slotKey}},[a("h1",{attrs:{id:"venus-各组件升级文档"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-各组件升级文档"}},[v._v("#")]),v._v(" Venus 各组件升级文档")]),v._v(" "),a("h2",{attrs:{id:"注意事项"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#注意事项"}},[v._v("#")]),v._v(" 注意事项")]),v._v(" "),a("ol",[a("li",[v._v("所有组件全部更换")]),v._v(" "),a("li",[v._v("更新完通过 curl 命令调用 "),a("code",[v._v("Version")]),v._v(" 接口检查版本号,各组件接口调用方式:https://github.com/filecoin-project/venus/issues/5132")]),v._v(" "),a("li",[v._v("pre/pro消息上链的情况")]),v._v(" "),a("li",[v._v("WD 消息上链的情况")]),v._v(" "),a("li",[v._v("出块情况是否正常")]),v._v(" "),a("li",[v._v("gas fee 相关设置是否生效")])]),v._v(" "),a("h2",{attrs:{id:"需要升级的组件"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#需要升级的组件"}},[v._v("#")]),v._v(" 需要升级的组件")]),v._v(" "),a("table",[a("thead",[a("tr",[a("th",[v._v("组件名")]),v._v(" "),a("th",[v._v("tag")]),v._v(" "),a("th",[v._v("commit")])])]),v._v(" "),a("tbody",[a("tr",[a("td",[v._v("venus-auth")]),v._v(" "),a("td",[v._v("v1.11.0")]),v._v(" "),a("td",[v._v("0c30588")])]),v._v(" "),a("tr",[a("td",[v._v("venus")]),v._v(" "),a("td",[v._v("v1.11.1")]),v._v(" "),a("td",[v._v("870f1b4")])]),v._v(" "),a("tr",[a("td",[v._v("venus-messager")]),v._v(" "),a("td",[v._v("v1.11.0")]),v._v(" "),a("td",[v._v("e4c4ab4")])]),v._v(" "),a("tr",[a("td",[v._v("venus-gateway")]),v._v(" "),a("td",[v._v("v1.11.1")]),v._v(" "),a("td",[v._v("8d7be74")])]),v._v(" "),a("tr",[a("td",[v._v("venus-wallet")]),v._v(" "),a("td",[v._v("v1.11.0")]),v._v(" "),a("td",[v._v("7afa1eb")])]),v._v(" "),a("tr",[a("td",[v._v("venus-miner")]),v._v(" "),a("td",[v._v("v1.11.0")]),v._v(" "),a("td",[v._v("a30f342")])]),v._v(" "),a("tr",[a("td",[v._v("venus-market")]),v._v(" "),a("td",[v._v("v2.7.1")]),v._v(" "),a("td",[v._v("b920551")])]),v._v(" "),a("tr",[a("td",[v._v("venus-sector-manager")]),v._v(" "),a("td",[v._v("v0.6.0-rc3")]),v._v(" "),a("td",[v._v("134b502")])]),v._v(" "),a("tr",[a("td",[v._v("venus-worker")]),v._v(" "),a("td",[v._v("无需升级")]),v._v(" "),a("td",[v._v("-")])])])]),v._v(" "),a("h3",{attrs:{id:"升级顺序"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#升级顺序"}},[v._v("#")]),v._v(" 升级顺序")]),v._v(" "),a("ol",[a("li",[v._v("venus-auth")]),v._v(" "),a("li",[v._v("venus")]),v._v(" "),a("li",[v._v("venus-gateway")]),v._v(" "),a("li",[v._v("venus-messager")]),v._v(" "),a("li",[v._v("venus-miner")]),v._v(" "),a("li",[v._v("venus-market")]),v._v(" "),a("li",[v._v("venus-wallet-pro")]),v._v(" "),a("li",[v._v("venus-sector-manager")])]),v._v(" "),a("h3",{attrs:{id:"venus-auth"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-auth"}},[v._v("#")]),v._v(" venus-auth")]),v._v(" "),a("p",[v._v("影响功能:")]),v._v(" "),a("ul",[a("li",[v._v("其他组件对获取 auth 的服务")])]),v._v(" "),a("p",[v._v("依赖升级组件:无")]),v._v(" "),a("p",[v._v("注意事项:")]),v._v(" "),a("ul",[a("li",[v._v('启动时使用 "--disable-perm-check" ,暂时关闭 auth 接口保护的特性')]),v._v(" "),a("li",[v._v("创建 token 之前需要先创建对应的用户")])]),v._v(" "),a("p",[v._v("备注:")]),v._v(" "),a("ul",[a("li",[v._v('新版本的 auth 在启动的时候会自动生成一个名为 "defaultLocalToken" 的 token, 该 token 用于 auth-cli 执行命令时的鉴权')])]),v._v(" "),a("h3",{attrs:{id:"venus"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus"}},[v._v("#")]),v._v(" venus")]),v._v(" "),a("p",[v._v("影响功能:无")]),v._v(" "),a("p",[v._v("依赖升级组件:venus-auth")]),v._v(" "),a("p",[v._v("注意事项:")]),v._v(" "),a("p",[v._v("编译:先 "),a("code",[v._v("make dist-clean")]),v._v(" 再 "),a("code",[v._v("make")]),v._v(",这样可以防止未能正常升级 "),a("code",[v._v("filecoin-ffi")]),v._v(" 而带来的问题")]),v._v(" "),a("p",[a("strong",[v._v("启动时应带上 flag --auth-token ,或者修改配置文件 api.venusAuthToken 配置项")])]),v._v(" "),a("ol",[a("li",[a("p",[v._v("升级后检查 vk 文件是否完整")])]),v._v(" "),a("li",[a("p",[v._v("升级后检查配置文件,通过日志检查 "),a("code",[v._v("UpgradeLightningHeight")]),v._v(" 和 "),a("code",[v._v("UpgradeThunderHeight")]),v._v(" 是否正常 :")]),v._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[v._v("# cali\nUpgradeLightningHeight:489094\nUpgradeThunderHeight:489094+3120\n# mainnet\nUpgradeLightningHeight:2809800\nUpgradeThunderHeight: 2809800 + 2880*21 = 2870280\n")])])])]),v._v(" "),a("li",[a("p",[v._v("升级后需检查是否正常同步区块")])]),v._v(" "),a("li",[a("p",[v._v("检查主网 v11 actors code,确保与下面输出一样")]),v._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[v._v("./venus state actor-cids --network-version 19\n\n# 顺序可能会不一样\nNetwork Version: 19\nActor Version: 11\nActor CID\nreward bafk2bzacebwjw2vxkobs7r2kwjdqqb42h2kucyuk6flbnyzw4odg5s4mogamo\nsystem bafk2bzaced7npe5mt5nh72jxr2igi2sofoa7gedt4w6kueeke7i3xxugqpjfm\neam bafk2bzaceaelwt4yfsfvsu3pa3miwalsvy3cfkcjvmt4sqoeopsppnrmj2mf2\ncron bafk2bzacebpewdvvgt6tk2o2u4rcovdgym67tadiis5usemlbejg7k3kt567o\ndatacap bafk2bzacebslykoyrb2hm7aacjngqgd5n2wmeii2goadrs5zaya3pvdf6pdnq\nethaccount bafk2bzaceclkmc4yidxc6lgcjpfypbde2eddnevcveo4j5kmh4ek6inqysz2k\nevm bafk2bzacediwh6etwzwmb5pivtclpdplewdjzphouwqpppce6opisjv2fjqfe\ninit bafk2bzaceckwf3w6n2nw6eh77ktmsxqgsvshonvgnyk5q5syyngtetxvasfxg\nmultisig bafk2bzaceafajceqwg5ybiz7xw6rxammuirkgtuv625gzaehsqfprm4bazjmk\npaymentchannel bafk2bzaceb4e6cnsnviegmqvsmoxzncruvhra54piq7bwiqfqevle6oob2gvo\naccount bafk2bzacealnlr7st6lkwoh6wxpf2hnrlex5sknaopgmkr2tuhg7vmbfy45so\nstorageminer bafk2bzacec24okjqrp7c7rj3hbrs5ez5apvwah2ruka6haesgfngf37mhk6us\nstoragepower bafk2bzaceaxgloxuzg35vu7l7tohdgaq2frsfp4ejmuo7tkoxjp5zqrze6sf4\nplaceholder bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro\nverifiedregistry bafk2bzacedej3dnr62g2je2abmyjg3xqv4otvh6e26du5fcrhvw7zgcaaez3a\nstoragemarket bafk2bzaceazu2j2zu4p24tr22btnqzkhzjvyjltlvsagaj6w3syevikeb5d7m\n")])])])]),v._v(" "),a("li",[a("p",[v._v("若不排查问题,rust 日志级别"),a("strong",[v._v("不建议")]),v._v("设置为 "),a("code",[v._v("trace")]),v._v(",因为会打印较多日志")])]),v._v(" "),a("li",[a("p",[v._v("升级后可以通过命令来 "),a("code",[v._v("./venus state get-actor t01000")]),v._v(" 来确认是否升级成功")])]),v._v(" "),a("li",[a("p",[v._v("actor 迁移")]),v._v(" "),a("p",[a("strong",[v._v("经测试本次预迁移时间在 80 秒左右,正式迁移时间再 60 秒左右")])]),v._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[v._v("预迁移高度是升级高度前 120 个高度:2809800 - 120 = 2809680\npre-migration 开始:STARTING pre-migration 结束:COMPLETED pre-migration\nmigration 开始:STARTING migration 结束:COMPLETED migration\n")])])])])]),v._v(" "),a("h3",{attrs:{id:"venus-gateway"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-gateway"}},[v._v("#")]),v._v(" venus-gateway")]),v._v(" "),a("p",[v._v("影响功能:无")]),v._v(" "),a("p",[v._v("依赖升级组件:venus-auth")]),v._v(" "),a("p",[v._v("注意事项:")]),v._v(" "),a("ul",[a("li",[v._v("编译时,需要先 "),a("code",[v._v("make dist-clean")]),v._v(" 再 "),a("code",[v._v("make")])]),v._v(" "),a("li",[v._v("启动时,应带上 flag --auth-token ,或者直接在配置中设置配置项:AuthConfig.Token")]),v._v(" "),a("li",[v._v("移除 flag:"),a("code",[v._v("--disable-address-verify")]),v._v(","),a("strong",[v._v("升级时检查启动命令是否还在使用该 flag")])])]),v._v(" "),a("h3",{attrs:{id:"venus-messager"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-messager"}},[v._v("#")]),v._v(" venus-messager")]),v._v(" "),a("p",[v._v("影响功能:")]),v._v(" "),a("ul",[a("li",[v._v("消息 replace")]),v._v(" "),a("li",[v._v("list --block 命令")])]),v._v(" "),a("p",[v._v("依赖升级组件:venus, venus-auth, venus-gateway")]),v._v(" "),a("p",[v._v("注意事项:")]),v._v(" "),a("ul",[a("li",[v._v("升级第一次启动时,带上 auth-token flag, 或者先修改配置文件 JWTConfig.Token 配置项")]),v._v(" "),a("li",[v._v("升级之后需要观察能否正常接收消息,消息能否正常上链")])]),v._v(" "),a("p",[v._v("备注:")]),v._v(" "),a("ul",[a("li",[v._v("replace fee 系数的最小值 由 1.25 下调 到 1.11")]),v._v(" "),a("li",[v._v("list blocked 消息的时候,unfill 状态的消息也会作为 blocked 消息被列出来")])]),v._v(" "),a("h3",{attrs:{id:"venus-miner"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-miner"}},[v._v("#")]),v._v(" venus-miner")]),v._v(" "),a("p",[v._v("影响功能:")]),v._v(" "),a("ul",[a("li",[v._v("选消息增加超时机制")])]),v._v(" "),a("p",[v._v("依赖升级组件:auth, venus, gateway")]),v._v(" "),a("p",[v._v("注意事项:")]),v._v(" "),a("ul",[a("li",[v._v("配置文件中 [Auth].[Token] 必须配置,且在 venus-auth 中具有 admin 权限,不要使用"),a("code",[v._v("defaultLocalToken")]),v._v("对应的 token,应手动创建一个。")])]),v._v(" "),a("h3",{attrs:{id:"venus-market"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-market"}},[v._v("#")]),v._v(" venus-market")]),v._v(" "),a("p",[v._v("影响功能:")]),v._v(" "),a("ul",[a("li",[v._v("新增和调整部分命令\n依赖升级组件:auth, venus, gateway, messager")])]),v._v(" "),a("p",[v._v("注意事项:")]),v._v(" "),a("ul",[a("li",[v._v("启动时必须带上 cs-token, 或者修改 配置项 AuthNode.Token")])]),v._v(" "),a("h3",{attrs:{id:"venus-wallet"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-wallet"}},[v._v("#")]),v._v(" venus-wallet")]),v._v(" "),a("p",[v._v("影响功能:无")]),v._v(" "),a("p",[v._v("依赖升级组件:gateway")]),v._v(" "),a("p",[v._v("注意事项:")]),v._v(" "),a("ul",[a("li",[v._v("升级后观察是否正常签名,消息能否正常上链")])]),v._v(" "),a("h3",{attrs:{id:"venus-sector-manger"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#venus-sector-manger"}},[v._v("#")]),v._v(" venus-sector-manger")]),v._v(" "),a("p",[v._v("影响功能:fip-0061 wdpost 算法改动")]),v._v(" "),a("p",[v._v("依赖升级组件:链服务组件")]),v._v(" "),a("p",[v._v("注意事项:")]),v._v(" "),a("ul",[a("li",[v._v("编译时,需要先 "),a("code",[v._v("make dist-clean")]),v._v(" 再 "),a("code",[v._v("make")])]),v._v(" "),a("li",[v._v("wdpost 算法回滚步骤\n"),a("ol",[a("li",[v._v("vsm 切换到 [fip-0061-fallback] https://github.com/ipfs-force-community/venus-cluster/tree/fip-0061-fallback 分支")])])])]),v._v(" "),a("hr"),v._v(" "),a("p",[v._v("更新结果验证步骤:")]),v._v(" "),a("ol",[a("li",[v._v("程序启动正常")]),v._v(" "),a("li",[v._v("pre/pro消息正常上链")]),v._v(" "),a("li",[v._v("出块正常")]),v._v(" "),a("li",[v._v("WD 上链正常")]),v._v(" "),a("li",[v._v("算力增长正常")]),v._v(" "),a("li",[v._v("真实订单检索正常")]),v._v(" "),a("li",[v._v("数据库各种 gas,生命周期,聚合设置正常")])]),v._v(" "),a("h3",{attrs:{id:"数据库变更"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#数据库变更"}},[v._v("#")]),v._v(" 数据库变更")]),v._v(" "),a("ol",[a("li",[a("p",[a("a",{attrs:{href:"https://github.com/filecoin-project/venus/issues/5558",target:"_blank",rel:"noopener noreferrer"}},[v._v("venus-messager 增加对 actor 的配置及相关命令,新增 "),a("code",[v._v("actor_cfg")]),v._v(" 表"),a("OutboundLink")],1)])]),v._v(" "),a("li",[a("p",[v._v("venus-market "),a("code",[v._v("storage_deals")]),v._v(" 表增加索引:"),a("code",[v._v("CREATE INDEX idx_cdpprovider_state ON storage_deals(cdp_provider,state)")])])])])])}),[],!1,null,null,null);e.default=_.exports}}]); \ No newline at end of file diff --git a/assets/js/8.5880ef83.js b/assets/js/8.0f750869.js similarity index 92% rename from assets/js/8.5880ef83.js rename to assets/js/8.0f750869.js index 74916d0f2..2c59fde29 100644 --- a/assets/js/8.5880ef83.js +++ b/assets/js/8.0f750869.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{329:function(e,t,s){e.exports=s.p+"assets/img/damocles-banner.cdc65a5a.jpg"},405:function(e,t,s){"use strict";s.r(t);var r=s(17),a=Object(r.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("p",[r("img",{attrs:{src:s(329),alt:"damocles"}})]),e._v(" "),r("h3",{attrs:{id:"damocles"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#damocles"}},[e._v("#")]),e._v(" Damocles")]),e._v(" "),r("p",[e._v("Damocles, formerly known as Venus Power Service, is THE Filecoin storage power solution. Learn more about Damocles "),r("a",{attrs:{href:"https://damocles.venus-fil.io/",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),r("OutboundLink")],1),e._v(".")])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{329:function(e,t,s){e.exports=s.p+"assets/img/damocles-banner.cdc65a5a.jpg"},404:function(e,t,s){"use strict";s.r(t);var r=s(17),a=Object(r.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("p",[r("img",{attrs:{src:s(329),alt:"damocles"}})]),e._v(" "),r("h3",{attrs:{id:"damocles"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#damocles"}},[e._v("#")]),e._v(" Damocles")]),e._v(" "),r("p",[e._v("Damocles, formerly known as Venus Power Service, is THE Filecoin storage power solution. Learn more about Damocles "),r("a",{attrs:{href:"https://damocles.venus-fil.io/",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),r("OutboundLink")],1),e._v(".")])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/app.75561469.js b/assets/js/app.62ff125a.js similarity index 73% rename from assets/js/app.75561469.js rename to assets/js/app.62ff125a.js index bccfdd9e3..2aafc9311 100644 --- a/assets/js/app.75561469.js +++ b/assets/js/app.62ff125a.js @@ -1,8 +1,8 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[]]);!function(e){function n(n){for(var r,i,s=n[0],c=n[1],l=n[2],p=0,d=[];p0?o(r(e),9007199254740991):0}},function(e,n){var t=Array.isArray;e.exports=t},function(e,n,t){var r=t(152),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},function(e,n,t){"use strict";function r(e,n,t,r,o,a,i,s){var c,l="function"==typeof e?e.options:e;if(n&&(l.render=n,l.staticRenderFns=t,l._compiled=!0),r&&(l.functional=!0),a&&(l._scopeId="data-v-"+a),i?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},l._ssrRegister=c):o&&(c=s?function(){o.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(e,n){return c.call(n),u(e,n)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,c):[c]}return{exports:e,options:l}}t.d(n,"a",(function(){return r}))},function(e,n,t){var r=t(5),o=t(1),a=t(7),i=Object.defineProperty,s={},c=function(e){throw e};e.exports=function(e,n){if(a(s,e))return s[e];n||(n={});var t=[][e],l=!!a(n,"ACCESSORS")&&n.ACCESSORS,u=a(n,0)?n[0]:c,p=a(n,1)?n[1]:void 0;return s[e]=!!t&&!o((function(){if(l&&!r)return!0;var e={length:-1};l?i(e,1,{enumerable:!0,get:c}):e[1]=1,t.call(e,u,p)}))}},function(e,n,t){var r=t(126),o=t(2),a=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,n){return arguments.length<2?a(r[e])||a(o[e]):r[e]&&r[e][n]||o[e]&&o[e][n]}},function(e,n,t){var r=t(5),o=t(84),a=t(35),i=t(11),s=t(39),c=t(7),l=t(121),u=Object.getOwnPropertyDescriptor;n.f=r?u:function(e,n){if(e=i(e),n=s(n,!0),l)try{return u(e,n)}catch(e){}if(c(e,n))return a(!o.f.call(e,n),e[n])}},function(e,n){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,n,t){"use strict";var r=t(0),o=t(32).filter,a=t(59),i=t(18),s=a("filter"),c=i("filter");r({target:"Array",proto:!0,forced:!s||!c},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,n){e.exports=!1},function(e,n){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},function(e,n){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,n,t){var r=t(235),o=t(238);e.exports=function(e,n){var t=o(e,n);return r(t)?t:void 0}},function(e,n,t){"use strict";var r=t(114).charAt,o=t(31),a=t(127),i=o.set,s=o.getterFor("String Iterator");a(String,"String",(function(e){i(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,n=s(this),t=n.string,o=n.index;return o>=t.length?{value:void 0,done:!0}:(e=r(t,o),n.index+=e.length,{value:e,done:!1})}))},function(e,n,t){var r,o=t(6),a=t(110),i=t(82),s=t(40),c=t(125),l=t(79),u=t(55),p=u("IE_PROTO"),d=function(){},f=function(e){return" - + @@ -46,6 +46,6 @@

Distributed Infrastructure

Adhering to design principles of distributed systems, Venus chain service enables you to scale and guarantees availability to your storage providing systems

Optimized Storage Deal

Solution for both storage client and storage provider enables seamless storage deal process

Reimagined Storage Power

Completely revamped sealer submodule to help you to grow and maintain your storage power with more efficiency and stability

- + diff --git a/intro/_Footer.html b/intro/_Footer.html index 3a31b07c9..a8a386f87 100644 --- a/intro/_Footer.html +++ b/intro/_Footer.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -38,6 +38,6 @@

See something missing? Have tips to share? File an issue (opens new window), and we'll follow up as soon as possible. (If you have write permission in this repo, feel free to edit directly.)

Last Updated: 12/11/2023, 8:37:54 AM
- + diff --git a/intro/contribute-docs.html b/intro/contribute-docs.html index 97b0dfc14..836f9aece 100644 --- a/intro/contribute-docs.html +++ b/intro/contribute-docs.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -72,6 +72,6 @@ Droplet (opens new window)

- + diff --git a/intro/damocles.html b/intro/damocles.html index ee8819e10..38b406261 100644 --- a/intro/damocles.html +++ b/intro/damocles.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -38,6 +38,6 @@

damocles

# Damocles

Damocles, formerly known as Venus Power Service, is THE Filecoin storage power solution. Learn more about Damocles here (opens new window).

Last Updated: 12/11/2023, 8:37:54 AM
- + diff --git a/intro/droplet.html b/intro/droplet.html index b72c841c4..cc2cffe69 100644 --- a/intro/droplet.html +++ b/intro/droplet.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -38,6 +38,6 @@

droplet

# Droplet

Droplet, formerly known as Venus Deal Service, is THE Filecoin storage deal solution. Learn more about Droplet here (opens new window).

Last Updated: 12/11/2023, 8:37:54 AM
- + diff --git a/intro/index.html b/intro/index.html index 3583f7517..b277df4d1 100644 --- a/intro/index.html +++ b/intro/index.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -42,6 +42,6 @@ →

- + diff --git a/intro/one-pager.html b/intro/one-pager.html index 61bdcb839..400ef0180 100644 --- a/intro/one-pager.html +++ b/intro/one-pager.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -47,6 +47,6 @@ (opens new window)

- + diff --git a/intro/sophon.html b/intro/sophon.html index fdbc6a925..9e001ec56 100644 --- a/intro/sophon.html +++ b/intro/sophon.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -38,6 +38,6 @@

sophon

# Sophon

Sophon, formerly known as Venus chain service, is THE Filecoin super node solution. Learn more about Sophon here (opens new window).

Last Updated: 12/11/2023, 8:37:54 AM
- + diff --git a/operation/Efficiency_of_sealing.html b/operation/Efficiency_of_sealing.html index 4d9d7c7e5..33f0da7fd 100644 --- a/operation/Efficiency_of_sealing.html +++ b/operation/Efficiency_of_sealing.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -140,6 +140,6 @@ MaxSealingSectors = 7

# Stop-loss

If one of tasks fails too many times, manual intervention is needed to get sealing pipeline back to its normal output.

Remove sectors when you have the following issues.

  1. Expired ticket
  2. Expired Commit
  3. Corrupted proof params

To remove incomplete sectors.

venus-sealer sectors remove --really-do-it <sectorNum>
 
Last Updated: 12/11/2023, 8:37:54 AM
- + diff --git a/operation/System_monitor_of_Zabbix.html b/operation/System_monitor_of_Zabbix.html index be6d8b7ea..a7f9fcd78 100644 --- a/operation/System_monitor_of_Zabbix.html +++ b/operation/System_monitor_of_Zabbix.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -113,6 +113,6 @@

Check zabbix RAM usage.

Check problems in dashboard.

Last Updated: 12/11/2023, 8:37:54 AM
- + diff --git a/operation/_Footer.html b/operation/_Footer.html index 6713def50..ff8592318 100644 --- a/operation/_Footer.html +++ b/operation/_Footer.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -38,6 +38,6 @@

See something missing? Have tips to share? File an issue (opens new window), and we'll follow up as soon as possible. (If you have write permission in this repo, feel free to edit directly.)

Last Updated: 12/11/2023, 8:37:54 AM
- + diff --git a/operation/example-single-box.html b/operation/example-single-box.html index f6d80811e..4572d3d89 100644 --- a/operation/example-single-box.html +++ b/operation/example-single-box.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -38,6 +38,6 @@

# Venus Single box setup

This is an exmaple venus single box setup that is estimated to grow 1TiB power per day.

# Specs

Parts Recommendation
CPU 3970X * 1 (32 core)
RAM 512G
NVMe (for sealing) 3T/SSD
SSD (for OS) 500G
GPU RTX 3080 * 1

# Job scheduling

Task Core limit Minutes RAM(G) Hourly production rate Daily growth(T)
P1 * 5 20 220 376 1.3636 1.0227
AP, P2, Commit 12 10 120 3 1.125

For more information on core limit, please refer to the next tutorial.

Last Updated: 12/11/2023, 8:37:54 AM
- + diff --git a/operation/index.html b/operation/index.html index 8d28e07be..f84625d9d 100644 --- a/operation/index.html +++ b/operation/index.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -42,6 +42,6 @@ →

- + diff --git a/operation/lotus-vs-venus.html b/operation/lotus-vs-venus.html index 680311cfe..d0c5e8e7e 100644 --- a/operation/lotus-vs-venus.html +++ b/operation/lotus-vs-venus.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -38,6 +38,6 @@

# Commands from Lotus

Many basic commands including but not limited to creating worker/controler addresses (opens new window), setting different types of configurations (opens new window), or changing storage locations (opens new window) apply to both Lotus and Venus. Node operators are expected to follow the same process as what is instructed on the Lotus documentation. If you encounter any questions please do not hesitate to reach out to us on #fil-venus (opens new window).

Last Updated: 12/11/2023, 8:37:54 AM
- + diff --git a/operation/nv15-upgrade.html b/operation/nv15-upgrade.html index 5662f6a65..63beb1e9a 100644 --- a/operation/nv15-upgrade.html +++ b/operation/nv15-upgrade.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -51,6 +51,6 @@

- + diff --git a/operation/nv16-upgrade.html b/operation/nv16-upgrade.html index d18a274d3..cef2df813 100644 --- a/operation/nv16-upgrade.html +++ b/operation/nv16-upgrade.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -69,6 +69,6 @@ →

- + diff --git a/operation/nv17-upgrade.html b/operation/nv17-upgrade.html index 106a9b9d7..cbd859c0f 100644 --- a/operation/nv17-upgrade.html +++ b/operation/nv17-upgrade.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -70,6 +70,6 @@ →

- + diff --git a/operation/nv18-upgrade.html b/operation/nv18-upgrade.html index d65c30be5..98d701ae2 100644 --- a/operation/nv18-upgrade.html +++ b/operation/nv18-upgrade.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -98,6 +98,6 @@ →

- + diff --git a/operation/nv19-upgrade.html b/operation/nv19-upgrade.html index 85c7c72c4..510aeddd1 100644 --- a/operation/nv19-upgrade.html +++ b/operation/nv19-upgrade.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -79,6 +79,6 @@ →

- + diff --git a/operation/nv21-upgrade.html b/operation/nv21-upgrade.html index 6342a04e2..13a50a7d1 100644 --- a/operation/nv21-upgrade.html +++ b/operation/nv21-upgrade.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -87,6 +87,6 @@ →

- + diff --git a/questions.html b/questions.html index 3f70821da..b38d91025 100644 --- a/questions.html +++ b/questions.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -38,6 +38,6 @@

# Have a question?

Filecoin.io (opens new window) - general information about the Filecoin network

Community Channels (opens new window) - links to Filecoin community chat and forum

Last Updated: 12/11/2023, 8:37:54 AM
- + diff --git a/zh/TODO.html b/zh/TODO.html index 4fe1149e3..50dab12b0 100644 --- a/zh/TODO.html +++ b/zh/TODO.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -39,6 +39,6 @@ 简体中文

# 原则

  基于目前的需要,先从重构 guide 和 modules 模块,让两块联动,形成比较易读的 venus 集群部署介绍。

  • modules 模块存储各组件的简介,将不相干的文档移到对应位置

  • guide 和 modules 对于组件介绍存在很多重复的,只保留一份

  • modules 模块组件介绍老旧,超链接到项目的介绍文档,避免项目内更新后 doc 中不及时及重复劳动

  • guide 将组件介绍,编译构建,部署文档独立

  • guide 模块增加 QA 模块,将 venus discussion 的问题以超链接方式统一到 QA 模块

  • 部署模块尽量少一些设计的介绍,简明扼要,每个指定的操作尽量不涉及不相干的,以免造成误解

# TODO list

  • [ ] modules 模块

    • [ ] 引导页内容更新
    • [ ] 不相关文档移走
    • [ ] 文档命名一致
    • [ ] 组件介绍匹配项目进度
    • [x] 编译构建独立到一个文档
    • [ ] 组件文档移除从项目中搬过来的内容,用超链接
    • [ ] market 和 cluster 模块的技术文档移到 modules 模块,
  • [ ] guide 模块

    • [ ] 将部署用到的基础知识单独形成文档
    • [x] 编译构建超链接到对应文档
    • [x] 增加部分组件的验证:怎么判断部署成功
    • [ ] 目录结构调整
      • [ ] market 和 cluster 归属到链服务部署和独立组件部署文档
      • [ ] .fil_withdraw_and_send.md.swp 文件删除
      • [ ] sealer 文档放到单独的目录
    • [ ] Troubleshooting-&-FAQ.md 用超链接方式管理 venus discussion
  • [ ] 移除没有价值或过时的文档

  • [ ] 在很多模块中重复的内容整合

  • [ ] 每个项目搬过来的内容使用超链接

- + diff --git a/zh/about/index.html b/zh/about/index.html index 1f6065fb5..e62491133 100644 --- a/zh/about/index.html +++ b/zh/about/index.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -38,6 +38,6 @@

# 使命,愿景,价值观

  • ❗️使命:建设 Filecoin 基础设施和工具,支持生态繁荣发展
  • 🌏 愿景:人人都能参与 Filecoin 生态
  • ☯️ 价值观:开放并且去信任

# 联系方式

# 其他资源

- + diff --git a/zh/index.html b/zh/index.html index ea09690c5..a4e2de726 100644 --- a/zh/index.html +++ b/zh/index.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -46,6 +46,6 @@

分布式架构

依照分布式系统的设计理念和原则,实现了一套快速扩展,高可用的分布式基础架构

优化订单体验

完善了一整套方便存储提供者接收真实存储订单,同时也方便存储客户发送存储订单的解决方案

全新的算力服务

安全,有韧性的算力维持服务;高效,灵活,可扩容的算力增长服务

- + diff --git a/zh/intro/_Footer.html b/zh/intro/_Footer.html index 2664d1357..38c1d3bd5 100644 --- a/zh/intro/_Footer.html +++ b/zh/intro/_Footer.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -38,6 +38,6 @@

See something missing? Have tips to share? File an issue (opens new window), and we'll follow up as soon as possible. (If you have write permission in this repo, feel free to edit directly.)

- + diff --git a/zh/intro/contribute-doc.html b/zh/intro/contribute-doc.html index 67629459d..e033d3a28 100644 --- a/zh/intro/contribute-doc.html +++ b/zh/intro/contribute-doc.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -50,6 +50,6 @@ 水滴 (opens new window)

- + diff --git a/zh/intro/damocles.html b/zh/intro/damocles.html index 3f67a9936..7a0ceba97 100644 --- a/zh/intro/damocles.html +++ b/zh/intro/damocles.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -38,6 +38,6 @@

damocles

# 执剑人

执剑人,原 Venus 算力服务,是一个Filecoin存储算力解决方案。请在 (opens new window)了解更多关于执剑人的信息。

- + diff --git a/zh/intro/droplet.html b/zh/intro/droplet.html index f63275547..02e9649ba 100644 --- a/zh/intro/droplet.html +++ b/zh/intro/droplet.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -38,6 +38,6 @@

droplet

# 水滴

水滴,原 Venus 订单服务,是一个Filecoin存储订单解决方案。请在 (opens new window)了解更多关于水滴的信息。

- + diff --git a/zh/intro/index.html b/zh/intro/index.html index 03ad9af50..e85fedf1c 100644 --- a/zh/intro/index.html +++ b/zh/intro/index.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -42,6 +42,6 @@ →

- + diff --git a/zh/intro/one-pager.html b/zh/intro/one-pager.html index 064cb050c..e3560c3ac 100644 --- a/zh/intro/one-pager.html +++ b/zh/intro/one-pager.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -47,6 +47,6 @@ (opens new window)

- + diff --git a/zh/intro/sophon.html b/zh/intro/sophon.html index 30003c84c..da9ec7d8a 100644 --- a/zh/intro/sophon.html +++ b/zh/intro/sophon.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -38,6 +38,6 @@

sophon

# 智子

智子,原 Venus 链服务,是一个 Filecoin 超级节点解决方案。请在 (opens new window)了解更多关于智子的信息。

- + diff --git a/zh/operation/Efficiency_of_sealing.html b/zh/operation/Efficiency_of_sealing.html index fef3ce82e..3ebd68d3c 100644 --- a/zh/operation/Efficiency_of_sealing.html +++ b/zh/operation/Efficiency_of_sealing.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -201,6 +201,6 @@ MaxSealingSectorsForDeals = 0

此时我们可以通过一个简单的定时脚本就可以做到,始终维持最佳的任务量了

# 损失和止损

  如果一个任务执行错误之后又被反复的重试,这就像我们有 7 个通道进行算力的封装,但是此时有一通道阻塞或者损坏,这就会降低我们 1 / 7 的产量,所以及时的处理错误也是非常重要的

  • 何种情况下应该立刻抛弃任务

    1. ticket 过期
    2. Commit 过期
    3. 依赖文件损坏重试多次都未成功时;
  • 移除无法完成的 sector

venus-sealer sectors remove --really-do-it <sectorNum>
 

如遇到无法彻底删除请查询:顽固扇区如何删除 (opens new window)

- + diff --git a/zh/operation/Independent_com_access_analysis.html b/zh/operation/Independent_com_access_analysis.html index 44c744060..9740aff0b 100644 --- a/zh/operation/Independent_com_access_analysis.html +++ b/zh/operation/Independent_com_access_analysis.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -64,6 +64,6 @@ INFO filecoin_proofs::caches > no params in memory cache for STACKED[34359738368] INFO storage_proofs_core::parameter_cache > parameter set identifier for cache: layered_drgporep::PublicParams{ graph: stacked_graph::StackedGraph{expansion_degree: 8 base_graph
- + diff --git a/zh/operation/Sealing_deploy_plan_1.html b/zh/operation/Sealing_deploy_plan_1.html index 702c070cc..35fdb7a48 100644 --- a/zh/operation/Sealing_deploy_plan_1.html +++ b/zh/operation/Sealing_deploy_plan_1.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -101,6 +101,6 @@ ./venus-worker storage attach --seal <ABSOLUTE_LOCAL_PATH>

TRUST_PARAMS=1 环境变量可以跳过校验证明参数文件,如果你确定参数文件都在且是正确的可以用此环境变量用加快 venus-sealer 或 venus-worker 的启动的速度;

seal 要求较高的磁盘吞吐量,建议 ssd 盘。

  • 磁盘空间及并发数计算:

    • 32G 内存消耗:56G cache + 64G * 运行数量

    • 32G 磁盘消耗:520G 左右 * 运行数量

    • 64G 内存消耗:112G cache + 128G

    • 64G 磁盘消耗:1T 左右 * 运行数量

    • 故这两台机器 1t 的内存大约能做 64G sector 的数量为:

   (1024G-112G)/128G=7.125,保险起见我们可以先并发 6 个观察一段时间资源使用率。

   确定了并发密封扇区个数后,就可以确定 seal 需要的磁盘空间= 6*1t=6t.

做策略的思路:先考虑内存,确定并发数,在补充其他资源,如临时磁盘空间,至于 cpu,如果不足,可以限额,这样做的好处是系统可以持续运行,而不被 oom。

可以利用 gpu 加速的任务时 P2,C2 和 windowPoSt,分配 gpu 的顺序是:wdPoSt>C2>P2

  • 并发数控制    ./venus-sealer sectors pledge 发送一个密封任务,通常写一个定时脚本或系统事务,每隔一段时间发送一个 sector 任务;配置文件 MaxSealingSectors 控制同时进行的 sector 上限数。
- + diff --git a/zh/operation/Sealing_deploy_plan_2.html b/zh/operation/Sealing_deploy_plan_2.html index 3bc79d012..15d2d3992 100644 --- a/zh/operation/Sealing_deploy_plan_2.html +++ b/zh/operation/Sealing_deploy_plan_2.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -91,6 +91,6 @@ sudo echo <PID> > /sys/fs/cgroup/cpuset/worker/cgroup.procs

PID: 进程 ID 号;

每次 worker 重启后 PID 会变化,需要更新文件。

/sys/fs/cgroup/cpuset是系统目录,worker是自己创建的.

- + diff --git a/zh/operation/System_monitor_of_Zabbix.html b/zh/operation/System_monitor_of_Zabbix.html index 6821de53d..a4489ee44 100644 --- a/zh/operation/System_monitor_of_Zabbix.html +++ b/zh/operation/System_monitor_of_Zabbix.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -117,6 +117,6 @@

5、查看 zabbix 监控机器的内存图

6、异常报警,需要处理的机器

- + diff --git a/zh/operation/_Footer.html b/zh/operation/_Footer.html index 231ed379d..8fb10108b 100644 --- a/zh/operation/_Footer.html +++ b/zh/operation/_Footer.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -38,6 +38,6 @@

See something missing? Have tips to share? File an issue (opens new window), and we'll follow up as soon as possible. (If you have write permission in this repo, feel free to edit directly.)

- + diff --git a/zh/operation/example-single-box.html b/zh/operation/example-single-box.html index 6cf40235c..d2147557a 100644 --- a/zh/operation/example-single-box.html +++ b/zh/operation/example-single-box.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -38,6 +38,6 @@

# venus 集群日增算力 1T 机器选型方案

# 机器配置

资源 配置
CPU 3970X * 1 (32c)
内存 512G
硬盘 3T/SSD
网卡 千兆
系统盘 500G
显卡 3080 * 1

台数:1 台

# 任务配比

任务分为 AP,P1,P2,Commit 阶段

运行方式 核数限制 耗时 (分钟) 内存消耗 (G) 效率 (个/小时) 日产量 (T)
P1 * 5 20 220 376 1.3636 1.0227
P2,AP,Commit 12 10 120 3 1.125

关于限核,配置执行任务类型,并发任务数等请参考 venus-docs 项目中相关文档。

- + diff --git a/zh/operation/index.html b/zh/operation/index.html index d9fecfff7..20ad086eb 100644 --- a/zh/operation/index.html +++ b/zh/operation/index.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -42,6 +42,6 @@ →

- + diff --git a/zh/operation/lotus-vs-venus.html b/zh/operation/lotus-vs-venus.html index 0d7232a94..52201b13c 100644 --- a/zh/operation/lotus-vs-venus.html +++ b/zh/operation/lotus-vs-venus.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -38,6 +38,6 @@

# 从 Lotus 来的命令

很多日常的命令包括但不限于创建worker/controler地址 (opens new window),设置不同的配置 (opens new window),或者修改存储路径 (opens new window)等等,都同时适用于LotusVenus。节点运维工程师可以按照 Lotus 文档中的步骤来操作。如果遇到任何问题,欢迎到#fil-venus-cn (opens new window)来提出问题。

- + diff --git a/zh/operation/migrate_market_v1_to_v2.html b/zh/operation/migrate_market_v1_to_v2.html index f72768296..28c45afac 100644 --- a/zh/operation/migrate_market_v1_to_v2.html +++ b/zh/operation/migrate_market_v1_to_v2.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -50,6 +50,6 @@

- + diff --git a/zh/operation/nv15-upgrade.html b/zh/operation/nv15-upgrade.html index fd2f9af53..a2d5e5c48 100644 --- a/zh/operation/nv15-upgrade.html +++ b/zh/operation/nv15-upgrade.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -82,6 +82,6 @@ →

- + diff --git a/zh/operation/nv16-upgrade.html b/zh/operation/nv16-upgrade.html index 13d0a24fd..755fff88f 100644 --- a/zh/operation/nv16-upgrade.html +++ b/zh/operation/nv16-upgrade.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -69,6 +69,6 @@ →

- + diff --git a/zh/operation/nv17-upgrade.html b/zh/operation/nv17-upgrade.html index 5dead2b19..41e99e923 100644 --- a/zh/operation/nv17-upgrade.html +++ b/zh/operation/nv17-upgrade.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -69,6 +69,6 @@ →

- + diff --git a/zh/operation/nv18-upgrade.html b/zh/operation/nv18-upgrade.html index 142225449..49237a292 100644 --- a/zh/operation/nv18-upgrade.html +++ b/zh/operation/nv18-upgrade.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -98,6 +98,6 @@ →

- + diff --git a/zh/operation/nv19-upgrade.html b/zh/operation/nv19-upgrade.html index e7ebd7dfc..a53bfc62b 100644 --- a/zh/operation/nv19-upgrade.html +++ b/zh/operation/nv19-upgrade.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -79,6 +79,6 @@ →

- + diff --git a/zh/operation/nv21-upgrade.html b/zh/operation/nv21-upgrade.html index 446678101..989b19d0a 100644 --- a/zh/operation/nv21-upgrade.html +++ b/zh/operation/nv21-upgrade.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -83,6 +83,6 @@ →

- + diff --git a/zh/operation/prometheus-instruction.html b/zh/operation/prometheus-instruction.html index 992353deb..2691bdd62 100644 --- a/zh/operation/prometheus-instruction.html +++ b/zh/operation/prometheus-instruction.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -110,6 +110,6 @@ instance: "messager"

# 启动

$ ./prometheus --config.file=prometheus.yml
 

使用http://localhost:9090/targets, 可查询组件的指标。

- + diff --git a/zh/operation/troubleshoot-consensus-fault.html b/zh/operation/troubleshoot-consensus-fault.html index 0cbf82400..ee610c1cd 100644 --- a/zh/operation/troubleshoot-consensus-fault.html +++ b/zh/operation/troubleshoot-consensus-fault.html @@ -13,7 +13,7 @@ gtag('config', 'G-SMSDTMGLTV'); - + @@ -190,6 +190,6 @@ implicit message(f00 -> f03, method : 2, nonce:1288233) idx:480, Compare msg({'/': 'bafy2bzacebka5xwpzelt4cl5pa452k3oi45mbcy7pyrlc3om7sfnul4cz7dcu'}) stateAfterApply: bafy2bzacebhpihnow4fwuebtxenpl27kvl4k7aeozlsruwcdj3berrposkfgs execution-traces: failed

程序会打印出不同的 execution-trace 的消息,以及不匹配的调用堆栈,可以方便快速定位问题。

- +