Search

Appendix 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 Chapter 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

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.