Este conteúdo não está disponível no idioma selecionado.

A. Enabling Instance Locality


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, InstanceLocalityFilter must be included to the list of enabled filter schedulers in /etc/cinder/cinder.conf:

scheduler_default_filters = AvailabilityZoneFilter,CapacityFilter,CapabilitiesFilter,InstanceLocalityFilter
Copy to Clipboard Toggle word wrap

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,InstanceLocalityFilter'
Copy to Clipboard Toggle word wrap
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 in the Storage Guide.

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

After you enable InstanceLocalityFilter, 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 ...
        +------------+--------------------------------------+
    Copy to Clipboard Toggle word wrap
  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          |
        ...
    Copy to Clipboard Toggle word wrap

    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}
    Copy to Clipboard Toggle word wrap
  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          |
        ...
    Copy to Clipboard Toggle word wrap

    Doing so will set the volume_local_to_instance property to True.

Voltar ao topo
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2025 Red Hat