搜索

此内容没有您所选择的语言版本。

A. Enabling Instance Locality

download PDF

The performance of a cluster can be greatly improved when it only uses volumes local to the same node. You can force a cluster to only use such volumes through the node group template; specifically, by setting the volume_local_to_instance property to True.

Before you can use this property, you need to enable its corresponding filter in the Block Storage service. To do so, InstanceLocality must be included to the list of enabled filter schedulers in /etc/cinder/cinder.conf:

scheduler_default_filters = AvailabilityZoneFilter,CapacityFilter,CapabilitiesFilter,InstanceLocality

To configure this through the director, add an environment file to your deployment containing:

parameter_defaults:
  ControllerExtraConfig: # 1
    cinder::config::cinder_config:
      DEFAULT/scheduler_default_filters:
        value: 'AvailabilityZoneFilter,CapacityFilter,CapabilitiesFilter,InstanceLocality'
1
You can also add the ControllerExtraConfig: hook and its nested sections to the parameter_defaults: section of an existing environment file.
Note

For information about the filter scheduler, see Configure How Volumes are Allocated to Multiple Back Ends (from the Storage Guide).

See Section 2, “Installation” to learn more about deploying the overcloud with OpenStack Data Processing enabled.

After enabling the InstanceLocality filter, you can now force clusters to use volumes local to the same node. To do so:

  1. From the command line, list the names of all available node group templates:

    $ sahara node-group-template-list
        +------------+--------------------------------------+
        | name       | id                                   ...
        +--------------+------------------------------------+
        | mytemplate | 3d6b4b7c-bca7-4f3a-a6ae-621a31ab7a75 ...
        +------------+--------------------------------------+
  2. View the template’s properties:

    $ sahara node-group-template-show --name mytemplate
        +---------------------------+---------------+
        | Property                  | Value         |
        +---------------------------+---------------+
        | volume_local_to_instance  | False         |
        | volumes_availability_zone | None          |
        | description               |               |
        | availability_zone         |               |
        | volume_mount_prefix       | /volumes/disk |
        | updated_at                | None          |
        ...

    Here, volume_local_to_instance is set to False.

  3. Create a file named setting.json containing the following string:

    {"volume_local_to_instance": true}
  4. Update the node group template with the string from setting.json:

    $ sahara node-group-template-update --json setting.json --id 3d6b4b7c-bca7-4f3a-a6ae-621a31ab7a75
        +---------------------------+---------------+
        | Property                  | Value         |
        +---------------------------+---------------+
        | volume_local_to_instance  | True          |
        | volumes_availability_zone | None          |
        | description               |               |
        | availability_zone         |               |
        | volume_mount_prefix       | /volumes/disk |
        | updated_at                | None          |
        ...

    Doing so will set the volume_local_to_instance property to True.

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

© 2024 Red Hat, Inc.