搜索

15.3. 部署和测试场景示例

download PDF

以下示例流程使用简单的单节点部署来测试环境变量和其他支持配置是否已正确设置。实际性能结果可能会因您在云中部署的节点和实例数量而异。

流程

  1. 使用以下参数创建 compute-real-time.yaml 文件:

    parameter_defaults:
      ComputeRealTimeParameters:
        IsolCpusList: "1"
        NovaComputeCpuDedicatedSet: "1"
        NovaComputeCpuSharedSet: "0"
        KernelArgs: "default_hugepagesz=1G hugepagesz=1G hugepages=16"
        NovaComputeDisableIrqBalance: true
  2. 使用 ComputeRealTime 角色创建一个新的 rt_roles_data.yaml 文件:

    $ openstack overcloud roles generate \
     -o ~/rt_roles_data.yaml Controller ComputeRealTime
  3. 使用其他环境文件将 compute-real-time.yamlrt_roles_data.yaml 添加到堆栈中,并部署 overcloud:

    (undercloud)$ openstack overcloud deploy --templates \
      -r /home/stack/rt_roles_data.yaml \
      -e [your environment files] \
      -e /home/stack/templates/compute-real-time.yaml

    此命令部署一个 Controller 节点和一个 Real-time Compute 节点。

  4. 登录到 Real-time Compute 节点并检查以下参数:

    [root@overcloud-computerealtime-0 ~]# uname -a
    Linux overcloud-computerealtime-0 4.18.0-80.7.1.rt9.153.el8_0.x86_64 #1 SMP PREEMPT RT Wed Dec 13 13:37:53 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
    [root@overcloud-computerealtime-0 ~]# cat /proc/cmdline
    BOOT_IMAGE=/boot/vmlinuz-4.18.0-80.7.1.rt9.153.el8_0.x86_64 root=UUID=45ae42d0-58e7-44fe-b5b1-993fe97b760f ro console=tty0 crashkernel=auto console=ttyS0,115200 default_hugepagesz=1G hugepagesz=1G hugepages=16
    [root@overcloud-computerealtime-0 ~]# tuned-adm active
    Current active profile: realtime-virtual-host
    [root@overcloud-computerealtime-0 ~]# grep ^isolated_cores /etc/tuned/realtime-virtual-host-variables.conf
    isolated_cores=1
    [root@overcloud-computerealtime-0 ~]# cat /usr/lib/tuned/realtime-virtual-host/lapic_timer_adv_ns
    4000 # The returned value must not be 0
    [root@overcloud-computerealtime-0 ~]# cat /sys/module/kvm/parameters/lapic_timer_advance_ns
    4000 # The returned value must not be 0
    # To validate hugepages at a host level:
    [root@overcloud-computerealtime-0 ~]# cat /proc/meminfo | grep -E HugePages_Total|Hugepagesize
    HugePages_Total:      64
    Hugepagesize:    1048576 kB
    # To validate hugepages on a per NUMA level (below example is a two NUMA compute host):
    [root@overcloud-computerealtime-0 ~]# cat /sys/devices/system/node/node0/hugepages/hugepages-1048576kB/nr_hugepages
    32
    [root@overcloud-computerealtime-0 ~]# cat /sys/devices/system/node/node1/hugepages/hugepages-1048576kB/nr_hugepages
    32
    [root@overcloud-computerealtime-0 ~]# crudini --get /var/lib/config-data/puppet-generated/nova_libvirt/etc/nova/nova.conf compute cpu_dedicated_set
    1
    [root@overcloud-computerealtime-0 ~]# crudini --get /var/lib/config-data/puppet-generated/nova_libvirt/etc/nova/nova.conf compute cpu_shared_set
    0
    [root@overcloud-computerealtime-0 ~]# systemctl status irqbalance
    ● irqbalance.service - irqbalance daemon
       Loaded: loaded (/usr/lib/systemd/system/irqbalance.service; enabled; vendor preset: enabled)
       Active: inactive (dead) since Tue 2021-03-30 13:36:31 UTC; 2s ago
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

© 2024 Red Hat, Inc.