特定 Red Hat OpenStack Platform 服务的部署建议


Red Hat OpenStack Platform 16.1

最大化 Red Hat OpenStack Platform Telemetry 和 Object Storage 服务的性能

OpenStack Documentation Team

摘要

在使用 director 部署 Red Hat OpenStack Platform 时,您可以按照这些建议解决很多性能问题。

第 1 章 优化 overcloud 的原因

如果您计划缩放或部署大型 overcloud,请优化 overcloud,以防止在工作负载增加时产生潜在的性能问题。按照这些建议,您可以防止缩放影响 overcloud 中的遥测服务和对象存储服务的性能。

第 2 章 遥测服务的配置建议

因为 Red Hat OpenStack Platform (RHOSP) Telemetry 服务是 CPU 密集型的,所以在 RHOSP 16.1 中不默认启用遥测。但是,遵循这些部署建议,如果您启用遥测,您可以避免性能下降。

这些程序是一个小型测试 overcloud,一个用于可最大化遥测服务性能的大型生产 overcloud 的建议。

2.1. 在小型测试 overcloud 上配置遥测服务

当您在小的、测试 overcloud 上启用 Red Hat OpenStack Platform (RHOSP) Telemetry 服务时,您可以使用文件后端提高其性能。

先决条件

  • 您要在其上配置 Telemetry 服务的 overcloud 部署 不是 生产系统。
  • overcloud 是一个支持少于 100 个实例的小型部署,每个 Controller 节点上最多有 12 个物理内核,或者启用了超线程的 24 个内核。
  • overcloud 部署 已禁用 高可用性。

流程

  1. 将以下内容添加到 /usr/share/openstack-tripleo-heat-templates/environments/enable-legacy-telemetry.yaml 环境文件中的 parameter_defaults 中:

    parameter_defaults:
      GnocchiBackend: file
    Copy to Clipboard Toggle word wrap
  2. enable-legacy-telemetry.yaml 文件添加到 openstack overcloud deploy 命令中:

    openstack overcloud deploy \
    -e /home/stack/environment.yaml \
    -e /usr/share/openstack-tripleo-heat-templates/environments/enable-legacy-telemetry.yaml \
    [...]
    Copy to Clipboard Toggle word wrap

2.2. 在大型生产 overcloud 上配置遥测服务

当您在大型生产 overcloud 上启用 Red Hat OpenStack Platform (RHOSP) Telemetry 服务时,您可以通过在专用节点上部署 Telemetry 服务来提高其性能。

遥测服务使用哪个 RHOSP 对象存储作为其存储后端。如果没有启用 Red Hat Ceph Storage,Telemetry 服务将使用 RHOSP Object Storage 服务(swift)。默认情况下,RHOSP director 将对象存储服务与控制器上的遥测服务并置。

警告

将 RHOSP Object Storage (swift)用于时间序列数据库(gnocchi)存储只支持小型和非生产环境。

先决条件

  • 部署遥测服务的 overcloud 是大型的生产 overcloud。

流程

  1. 要设置专用遥测节点,请从 Controller 角色中删除遥测服务。

    通过将 /usr/share/openstack-tripleo-heat-templates/roles_data.yaml 复制到 /home/stack/templates/roles_data.yaml,创建编排服务(heat)自定义环境文件。

  2. /home/stack/templates/roles_data.yaml 中,从 Controller 角色的 ServicesDefault 列表中删除以下行:

        - OS::TripleO::Services::CeilometerAgentCentral
        - OS::TripleO::Services::CeilometerAgentNotification
        - OS::TripleO::Services::GnocchiApi
        - OS::TripleO::Services::GnocchiMetricd
        - OS::TripleO::Services::GnocchiStatsd
        - OS::TripleO::Services::AodhApi
        - OS::TripleO::Services::AodhEvaluator
        - OS::TripleO::Services::AodhNotifier
        - OS::TripleO::Services::AodhListener
        - OS::TripleO::Services::PankoApi
        - OS::TripleO::Services::CeilometerAgentIpmi
    Copy to Clipboard Toggle word wrap
  3. 添加以下代码片段并保存 roles_data.yaml

    - name: Telemetry
      ServicesDefault:
        - OS::TripleO::Services::CACerts
        - OS::TripleO::Services::CertmongerUser
        - OS::TripleO::Services::Kernel
        - OS::TripleO::Services::Ntp
        - OS::TripleO::Services::Timezone
        - OS::TripleO::Services::Snmp
        - OS::TripleO::Services::Sshd
        - OS::TripleO::Services::Securetty
        - OS::TripleO::Services::TripleoPackages
        - OS::TripleO::Services::TripleoFirewall
        - OS::TripleO::Services::SensuClient
        - OS::TripleO::Services::FluentdClient
        - OS::TripleO::Services::AuditD
        - OS::TripleO::Services::Collectd
        - OS::TripleO::Services::MySQLClient
        - OS::TripleO::Services::Docker
        - OS::TripleO::Services::CeilometerAgentCentral
        - OS::TripleO::Services::CeilometerAgentNotification
        - OS::TripleO::Services::GnocchiApi
        - OS::TripleO::Services::GnocchiMetricd
        - OS::TripleO::Services::GnocchiStatsd
        - OS::TripleO::Services::AodhApi
        - OS::TripleO::Services::AodhEvaluator
        - OS::TripleO::Services::AodhNotifier
        - OS::TripleO::Services::AodhListener
        - OS::TripleO::Services::PankoApi
        - OS::TripleO::Services::CeilometerAgentIpmi
    Copy to Clipboard Toggle word wrap
  4. /home/stack/node-info.yaml 文件中,为 Telemetry 服务设置专用节点数量。

    例如,将 TelemetryCount: 3 添加到 parameter_defaults 中,以部署三个专用的遥测节点:

    parameter_defaults:
      TelemetryCount: 3
    Copy to Clipboard Toggle word wrap

    您现在有一个自定义遥测角色。

    使用此角色,您可以定义一个新类别来标记和分配特定的遥测节点。

  5. 部署 overcloud 时,将 roles_data.yamlstorage-environment.yaml 包含在 openstack overcloud deploy 命令调用的模板和环境文件列表中:

    $ openstack overcloud deploy \
      -r /home/stack/templates/roles_data.yaml \
      -e /home/stack/templates/storage-environment.yaml \
      -e /usr/share/openstack-tripleo-heat-templates/environments/enable-legacy-telemetry.yaml \
    [...]
    Copy to Clipboard Toggle word wrap
  6. 如果您无法为对象存储分配专用节点,请将对象存储配置为在 Controller 节点上运行较低的总体存储 I/O。

第 3 章 Object Storage 服务(swift)配置建议。

如果您选择不使用 Red Hat Ceph Storage 部署 Red Hat OpenStack Platform (RHOSP),RHOSP director 部署 RHOSP Object Storage 服务(swift)。对象存储服务是多种 OpenStack 服务的对象存储,包括 RHOSP 遥测服务和 RabbitMQ。以下是在将遥测服务与对象存储服务搭配使用时提高 RHOSP 性能的建议。

3.1. 对象存储服务磁盘建议

为 Red Hat OpenStack Platform (RHOSP)对象存储服务使用一个或多个单独的本地磁盘。

默认情况下,RHOSP director 使用系统磁盘中的目录 /srv/node/d1 作为对象存储服务。在控制器中,这个磁盘也被其他服务使用,当遥测服务在企业设置中开始记录事件后,磁盘可能会成为性能瓶颈。

以下示例是从 RHOSP 编排服务(heat)自定义环境文件的摘录。在每个 Controller 节点上,对象存储服务使用两个独立的磁盘。两个磁盘的整个磁盘包含一个 XFS 文件系统:

parameter_defaults:
  SwiftRawDisks: {"sdb": {}, "sdc": {}}
Copy to Clipboard Toggle word wrap

SwiftRawDisks 定义节点上的每个存储磁盘。这个示例在每个 Controller 节点上定义 sdbsdc 磁盘。

重要

在配置多个磁盘时,请确保 Bare Metal 服务(ironic)使用预期的根磁盘。

3.2. 定义专用对象存储节点

将节点专用于 Red Hat OpenStack Platform (RHOSP) Object Storage 服务可提高性能。

流程

  1. 创建自定义 roles_data.yaml 文件(基于默认的 /usr/share/openstack-tripleo-heat-templates/roles_data.yaml)。
  2. 通过从 Controller 节点中删除 Object Storage 服务条目来编辑自定义 roles_data.yaml 文件。

    特别是,从 Controller 角色的 ServicesDefault 列表中删除以下行:

        - OS::TripleO::Services::SwiftStorage
    Copy to Clipboard Toggle word wrap
  3. 使用自定义环境文件中的 ObjectStorageCount 资源,设置要为对象存储服务分配的专用节点数量。

    例如,将 ObjectStorageCount: 3 添加到环境文件的 parameter_defaults 中,以部署三个专用的对象存储节点:

    parameter_defaults:
      ObjectStorageCount: 3
    Copy to Clipboard Toggle word wrap
  4. 要应用此配置,请部署 overcloud,将 roles_data.yaml 添加到堆栈和其他环境文件中:

    (undercloud) $ openstack overcloud deploy --templates \
      -e [your environment files]
      -e /home/stack/templates/roles_data.yaml
    Copy to Clipboard Toggle word wrap

3.3. 为对象存储服务分区电源建议

当使用单独的 Red Hat OpenStack Platform (RHOSP) Object Storage 服务节点时,使用更高的分区电源值。

对象存储服务使用修改后的 散列环 在磁盘和节点之间分发数据。默认有三个环:一个用于帐户,一个用于容器,另一个用于对象。每个环都使用名为 partition power 的固定参数。此参数设置可以创建的最大分区数。

分区的 power 参数非常重要,只能更改新容器及其对象。因此,在初始部署 之前,务必要设置这个值。

RHOSP director 部署的环境的默认分区电源值是 10。这对较小的部署来说是合理的值,特别是如果您只计划在 Controller 节点上为对象存储服务使用磁盘。

如果使用三个副本,下表可帮助您选择适当的分区电源:

Expand
表 3.1. 每个可用磁盘数量适当的分区电源值

分区 Power

磁盘的最大数量

10

~ 35

11

~ 75

12

~ 150

13

~ 250

14

~ 500

重要

设置大量分区电源值(例如,仅限 14 个磁盘,代表 40 个磁盘)会影响复制时间。

要设置分区电源,请使用以下资源:

parameter_defaults:
  SwiftPartPower: 11
Copy to Clipboard Toggle word wrap
提示

您还可以为新容器配置额外的对象服务器环。如果您要在最初使用低分区电源的对象存储服务部署中添加更多磁盘,这非常有用。

法律通告

Copyright © 2023 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

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

關於紅帽

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

Theme

© 2025 Red Hat