6.3.3. 修改节点调优配置
使用 ROSA 命令行界面(CLI) (rosa)查看和更新节点调优配置,以调整集群的性能设置。
先决条件
- 您已下载了 ROSA CLI 的最新版本。
- 您在最新版本中有一个集群。
- 您的集群有一个节点调优配置。
流程
使用
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" } ] } }验证调优配置后,使用
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" } ] }