openstack nova filter scheduling document translation

Filter Scheduler

Scheduler weighting filter and filter support in order to make accurate decisions when creating an instance of a node. This schedule is just only support the work on the compute nodes.

 

 

Figure a filtering

During its operation scheduler filter through each computing node is found. The value of each filter according to the filter. The final list of results in accordance with the host weights ordered. Scheduler to select the host for the requested instance. Great choice of host. For special host particular filter employed. Filter matches the user request according to the state of the host, plus some additional definition each filter characteristics (which will be described in more detail below).

If the dispatcher can not find a suitable candidate for the next instance, which means that there is no suitable host can schedule this instance.

Filter scheduler can be very flexible to support a wide variety of filtering and weighting strategies. If these policies are not enough flexible and you can also implement their own scheduling algorithm.

Standard filter class may be used ( nova.scheduler.filters ):

 

AllHostsFilter - does no filtering. It passes all the available hosts.

  • AllHostsFilter - no filter, all available hosts passed

 

  • ImagePropertiesFilter  -filtering on the image based on the principles defined attributes instances. The host can support its delivery specified on the image attributes used by an instance.
  • AvailabilityZoneFilter  -filtering space is available on the host. Example pass it matches the host specified in the properties area availability. Use commas to develop multiple areas. The filter was then ensure that it matches any of the specified area.
  • ComputeCapabilitiesFilter  -Check the function of the host computing service delivered meets the specifications associated with any additional instance of a type. He passed can create an instance of the specified type.

If an additional critical parameter contains a colon (:) anything before the colon is considered namespace, anything after the colon are considered key to match. If there is not the function of the namespace, the filter will ignore this namespace. For example  capabilities: cpu_info: features is a valid range format. For backward compatibility, when a key can not contain a colon (:), this bond is very important. If the key is a property HostState object , such as free_disk_mb , the filter will be considered as additional key key specs to match. If the filter will not ignore this key.

  Additional specifications may have an operator at the beginning of the key / value pairs of strings. If there is no operator, then a default operator s == will be used. The operator is effective:

 

 

 

 

  • AggregateInstanceExtraSpecsFilter - 检查聚合元数据是否满足与实例类型相关的任何额外规范(没有作用域或使用aggregate_instance_extra_specs限定作用域)。他传递能够创建指定类型实例的的主机额外的规范可以具有与 Compute Capabilities Filter相同的操作符若要为同一个键指定多个值,请使用逗号。例如,“value1, value2”。如果没有指定extra_specs,则传递所有主机。
  • ComputeFilter - 传递所有可操作和可启用的主机
  • CoreFilter - DEPRECATED;基于CPU核心利用率的过滤器。他传递具有足够数量核心CPU的主机。
  • AggregateCoreFilter -通过设置每个聚合的cpu_allocation_ratio,按CPU核心数筛选主机。如果没有找到每个per-aggregate的值他将返回全局默认 cpu_allocation_ratio如果为一个主机找到多个值(意味着该主机位于两个具有不同比率设置的不同聚合中),则使用最小值。

 

IsolatedHostsFilter -基于 filter_scheduler.isolated_imagesfilter_scheduler.isolated_hosts and filter_scheduler.restrict_isolated_hosts_to_isolated_images 标志的过滤器。

  •  
  • JsonFilter -允许使用简单的JSON-based 来选择主机。
  • RamFilter - DEPRECATED通过RAM来过滤主机。只传递具有足够RAM来承载实例的主机。
  • AggregateRamFilter -使用每个聚合ram_allocation_ratio设置按RAM过滤主机。如果没有per-aggregate的值发现,将会返回全局默认的ram_allocation_ratio如果有多个值被发现(这意味着主机处于两个具有不同比率设置的不同聚合中),最小的那个值被发现。
  • DiskFilter -DEPRECATED;通过磁盘分配来过滤主机。只传递具有足够磁盘空间的主机来创建实例。Disk-allocation_ratio setting.虚拟磁盘与物理磁盘的分配比率,默认为1.0。总允许分配的磁盘大小将是物理磁盘乘以这个比率。
  • AggregateDiskFilter -使用每个聚合磁盘的disk_allocation_ratio设置,通过磁盘分配筛选主机。如果没有找到每个聚合值,它将返回到全局默认disk_allocation_ratio。如果为一台主机找到多个值(意味着该主机位于两个或多个具有不同比率设置的不同聚合中),则使用最小值。
  • NumInstancesFilter -根据运行的实例数量来筛选计算节点。具有太多实例数的节点将被筛选。filter_scheduler.max_instances_per_host。此主机上允许运行的最大实例数。如果主机上已经存在多个filter_scheduler.max_instances_per_host,则调度程序将忽略该主机。

 

  • AggregateNumInstancesFilter -使用每个聚合filter_scheduler根据实例的数量筛选主机。max_instances_per_host设置。如果没有找到每个聚合值,它将返回到全局默认的filter_scheduler.max_instances_per_host。如果为一台主机找到多个值(意味着该主机位于两个或多个不同的聚合中,每个主机设置的最大实例数不同),则使用最小值。
  • IoOpsFilter -通过主机上的并发I/O操作筛选主机。具有太多并发I/O操作的主机将被filter .filter_scheduler过滤。max_io_ops_per_host设置。允许在此主机上运行的I/O密集型实例的最大数量,如果超过filter_scheduler,调度程序将忽略该主机。max_io_ops_per_host实例(如构建/调整大小/快照等)在其上运行。
  • AggregateIoOpsFilter -使用每个聚合filter_scheduler通过I/O操作筛选主机。max_io_ops_per_host设置。如果没有找到每个聚合值,它将返回到全局默认值:oslo.config:option: ' filter_scheduler.max_io_ops_per_host。如果为一台主机找到多个值(意味着该主机位于两个或多个具有不同最大io操作设置的不同聚合中),则使用最小值。
  • PciPassthroughFilter -如果主机拥有满足“extra_specs”中设备请求的设备,则筛选器将调度主机上的实例。
  • SimpleCIDRAffinityFilter -允许在同一IP块内的主机上创建一个新实例。
  • DifferentHostFilter -允许不同主机上的实例与一组实例不同。
  • SameHostFilter -将实例与一组实例中的另一个实例放在同一主机上。
  • RetryFilter -筛选已尝试调度的主机。只传递以前未尝试的主机。
  • AggregateTypeAffinityFilter - 按聚合限制instance_type。
    • 如果没有设置instance_type键,或者instance_type聚合元数据值包含所请求的instance_type的名称,则此筛选器将传递主机。
    • instance_type元数据条目的值是一个字符串,该字符串可以包含单个instance_type名称,也可以包含一个逗号分隔的instance_type名称列表。例如“m1。nano”或“m1.nano m1.small”
  • ServerGroupAntiAffinityFilter -此筛选器为服务器组实现反关联。首先,必须通过server groups API创建具有“反关联”策略的服务器组。然后,在引导新服务器时,提供“group=<uuid>”的调度程序提示,其中<uuid>是您创建的服务器组的uuid。这将导致服务器被添加到组中当服务器被调度时,将在该组中的所有服务器之间强制执行反关联。
  • ServerGroupAffinityFilter - 此筛选器的工作方式与ServerGroupAntiAffinityFilter相同。不同之处在于,在创建服务器组时,应该指定一个“关联”策略。
  • AggregateMultiTenancyIsolation-在特定的聚合中隔离租户。要指定多个承租者,请使用逗号。如。“tenant1 tenant2”
  • AggregateImagePropertiesIsolation - 基于镜像属性和聚合元数据隔离主机。使用逗号为同一属性指定多个值。然后过滤器将确保至少有一个值匹配。
  • MetricsFilter -基于指标weight_set过滤主机。只传递具有可用指标的主机
  • NUMATopologyFilter - 根据实例请求的NUMA拓扑过滤主机(如果有的话)现在我们可以更详细地关注这些标准过滤器类。我们将跳过最简单的,如AllHostsFilter、CoreFilter和RamFilter,因为它们的功能相对简单,可以从代码中理解。例如类RamFilter有下一个实现:

图三

Guess you like

Origin blog.csdn.net/lieanwan2780/article/details/88146092