6.3.3. 修改节点调优配置


使用 ROSA 命令行界面(CLI) (rosa)查看和更新节点调优配置,以调整集群的性能设置。

先决条件

  • 您已下载了 ROSA CLI 的最新版本。
  • 您在最新版本中有一个集群。
  • 您的集群有一个节点调优配置。

流程

  1. 使用 rosa describe 命令查看调优配置:

    $ rosa describe tuning-config -c <cluster_id> \
           --name <name_of_tuning> \
           [-o json]

    其中:

    <cluster_id>
    指定您要应用节点调优配置的集群 ID。
    <name_of_tuning>
    指定调优配置的名称。
    -o json
    指定输出类型。这个参数是可选的。如果没有指定任何输出,则只看到调优配置的 ID 和名称。

    没有指定输出类型的输出示例

    Name:    sample-tuning
    ID:      20468b8e-edc7-11ed-b0e4-0a580a800298
    Spec:    {
                "profile": [
                  {
                    "data": "[main]\nsummary=Custom OpenShift profile\ninclude=openshift-node\n\n[sysctl]\nvm.dirty_ratio=\"55\"\n",
                    "name": "tuned-1-profile"
                  }
                ],
                "recommend": [
                  {
                     "priority": 20,
                     "profile": "tuned-1-profile"
                  }
                ]
             }

    指定 JSON 输出的输出示例

    {
      "kind": "TuningConfig",
      "id": "20468b8e-edc7-11ed-b0e4-0a580a800298",
      "href": "/api/clusters_mgmt/v1/clusters/23jbsevqb22l0m58ps39ua4trff9179e/tuning_configs/20468b8e-edc7-11ed-b0e4-0a580a800298",
      "name": "sample-tuning",
      "spec": {
        "profile": [
          {
            "data": "[main]\nsummary=Custom OpenShift profile\ninclude=openshift-node\n\n[sysctl]\nvm.dirty_ratio=\"55\"\n",
            "name": "tuned-1-profile"
          }
        ],
        "recommend": [
          {
            "priority": 20,
            "profile": "tuned-1-profile"
          }
        ]
      }
    }
  2. 验证调优配置后,使用 rosa edit 命令编辑现有配置:

    $ rosa edit tuning-config -c <cluster_id> --name <name_of_tuning> --spec-path <path_to_spec_file>

    在这个命令中,您可以使用 spec.json 文件编辑您的配置。

验证

  • 再次运行 rosa describe 命令,以查看您在调优配置中更新您对 spec.json 文件所做的更改:

    $ rosa describe tuning-config -c <cluster_id> --name <name_of_tuning>

    输出示例

    Name:  sample-tuning
    ID:    20468b8e-edc7-11ed-b0e4-0a580a800298
    Spec:  {
               "profile": [
                 {
                  "data": "[main]\nsummary=Custom OpenShift profile\ninclude=openshift-node\n\n[sysctl]\nvm.dirty_ratio=\"55\"\n",
                  "name": "tuned-2-profile"
                 }
               ],
               "recommend": [
                 {
                  "priority": 10,
                  "profile": "tuned-2-profile"
                 }
               ]
           }
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部