此内容没有您所选择的语言版本。
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, 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 theparameter_defaults:
section of an existing environment file.
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:
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 ... +------------+--------------------------------------+
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.Create a file named
setting.json
containing the following string:{"volume_local_to_instance": true}
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.