Skip to content

Commit 78645e6

Browse files
stephenfinkk7ds
authored andcommitted
Remove deprecated Core/Ram/DiskFilter
These were deprecated during Stein [1] and can now be removed, lest they cause hassle with the PCPU work. As noted in [1], the aggregate equivalents of same are left untouched for now. [1] https://review.opendev.org/#/c/596502/ Change-Id: I8a0d332877fbb9794700081e7954f2501b7e7c09 Signed-off-by: Stephen Finucane <[email protected]>
1 parent 4781ef3 commit 78645e6

File tree

13 files changed

+165
-484
lines changed

13 files changed

+165
-484
lines changed

api-ref/source/parameters.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2378,14 +2378,16 @@ disabled_reason_body:
23782378
disk_available_least:
23792379
description: |
23802380
The actual free disk on this hypervisor(in GiB). If allocation ratios used
2381-
for overcommit are configured, this may be negative.
2381+
for overcommit are configured, this may be negative. This is intentional as
2382+
it provides insight into the amount by which the disk is overcommitted.
23822383
in: body
23832384
required: true
23842385
type: integer
23852386
disk_available_least_total:
23862387
description: |
23872388
The actual free disk on all hypervisors(in GiB). If allocation ratios used
2388-
for overcommit are configured, this may be negative.
2389+
for overcommit are configured, this may be negative. This is intentional as
2390+
it provides insight into the amount by which the disk is overcommitted.
23892391
in: body
23902392
required: true
23912393
type: integer

doc/source/admin/configuration/schedulers.rst

Lines changed: 38 additions & 159 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Filters host by CPU core numbers with a per-aggregate ``cpu_allocation_ratio``
156156
value. If the per-aggregate value is not found, the value falls back to the
157157
global setting. If the host is in more than one aggregate and more than one
158158
value is found, the minimum value will be used. For information about how to
159-
use this filter, see :ref:`host-aggregates`. See also :ref:`CoreFilter`.
159+
use this filter, see :ref:`host-aggregates`.
160160

161161
Note the ``cpu_allocation_ratio`` :ref:`bug 1804125 <bug-1804125>` restriction.
162162

@@ -167,7 +167,7 @@ Filters host by disk allocation with a per-aggregate ``disk_allocation_ratio``
167167
value. If the per-aggregate value is not found, the value falls back to the
168168
global setting. If the host is in more than one aggregate and more than one
169169
value is found, the minimum value will be used. For information about how to
170-
use this filter, see :ref:`host-aggregates`. See also :ref:`DiskFilter`.
170+
use this filter, see :ref:`host-aggregates`.
171171

172172
Note the ``disk_allocation_ratio`` :ref:`bug 1804125 <bug-1804125>`
173173
restriction.
@@ -302,7 +302,7 @@ Filters host by RAM allocation of instances with a per-aggregate
302302
value falls back to the global setting. If the host is in more than one
303303
aggregate and thus more than one value is found, the minimum value will be
304304
used. For information about how to use this filter, see
305-
:ref:`host-aggregates`. See also :ref:`ramfilter`.
305+
:ref:`host-aggregates`.
306306

307307
Note the ``ram_allocation_ratio`` :ref:`bug 1804125 <bug-1804125>` restriction.
308308

@@ -364,50 +364,6 @@ Passes all hosts that are operational and enabled.
364364

365365
In general, you should always enable this filter.
366366

367-
.. _CoreFilter:
368-
369-
CoreFilter
370-
----------
371-
372-
.. deprecated:: 19.0.0
373-
374-
``CoreFilter`` is deprecated since the 19.0.0 Stein release. VCPU
375-
filtering is performed natively using the Placement service when using the
376-
``filter_scheduler`` driver. Furthermore, enabling CoreFilter may
377-
incorrectly filter out `baremetal nodes`_ which must be scheduled using
378-
custom resource classes.
379-
380-
Only schedules instances on hosts if sufficient CPU cores are available. If
381-
this filter is not set, the scheduler might over-provision a host based on
382-
cores. For example, the virtual cores running on an instance may exceed the
383-
physical cores.
384-
385-
You can configure this filter to enable a fixed amount of vCPU overcommitment
386-
by using the ``cpu_allocation_ratio`` configuration option in ``nova.conf``.
387-
The default setting is:
388-
389-
.. code-block:: ini
390-
391-
cpu_allocation_ratio = 16.0
392-
393-
With this setting, if 8 vCPUs are on a node, the scheduler allows instances up
394-
to 128 vCPU to be run on that node.
395-
396-
To disallow vCPU overcommitment set:
397-
398-
.. code-block:: ini
399-
400-
cpu_allocation_ratio = 1.0
401-
402-
.. note::
403-
404-
The Compute API always returns the actual number of CPU cores available on a
405-
compute node regardless of the value of the ``cpu_allocation_ratio``
406-
configuration key. As a result changes to the ``cpu_allocation_ratio`` are
407-
not reflected via the command line clients or the dashboard. Changes to
408-
this configuration key are only taken into account internally in the
409-
scheduler.
410-
411367
DifferentHostFilter
412368
-------------------
413369

@@ -442,83 +398,6 @@ With the API, use the ``os:scheduler_hints`` key. For example:
442398
}
443399
}
444400
445-
.. _DiskFilter:
446-
447-
DiskFilter
448-
----------
449-
450-
.. deprecated:: 19.0.0
451-
452-
``DiskFilter`` is deprecated since the 19.0.0 Stein release. DISK_GB
453-
filtering is performed natively using the Placement service when using the
454-
``filter_scheduler`` driver. Furthermore, enabling DiskFilter may
455-
incorrectly filter out `baremetal nodes`_ which must be scheduled using
456-
custom resource classes.
457-
458-
Only schedules instances on hosts if there is sufficient disk space available
459-
for root and ephemeral storage.
460-
461-
You can configure this filter to enable a fixed amount of disk overcommitment
462-
by using the ``disk_allocation_ratio`` configuration option in the
463-
``nova.conf`` configuration file. The default setting disables the possibility
464-
of the overcommitment and allows launching a VM only if there is a sufficient
465-
amount of disk space available on a host:
466-
467-
.. code-block:: ini
468-
469-
disk_allocation_ratio = 1.0
470-
471-
DiskFilter always considers the value of the ``disk_available_least`` property
472-
and not the one of the ``free_disk_gb`` property of a hypervisor's statistics:
473-
474-
.. code-block:: console
475-
476-
$ openstack hypervisor stats show
477-
+----------------------+-------+
478-
| Field | Value |
479-
+----------------------+-------+
480-
| count | 1 |
481-
| current_workload | 0 |
482-
| disk_available_least | 14 |
483-
| free_disk_gb | 27 |
484-
| free_ram_mb | 15374 |
485-
| local_gb | 27 |
486-
| local_gb_used | 0 |
487-
| memory_mb | 15886 |
488-
| memory_mb_used | 512 |
489-
| running_vms | 0 |
490-
| vcpus | 8 |
491-
| vcpus_used | 0 |
492-
+----------------------+-------+
493-
494-
As it can be viewed from the command output above, the amount of the available
495-
disk space can be less than the amount of the free disk space. It happens
496-
because the ``disk_available_least`` property accounts for the virtual size
497-
rather than the actual size of images. If you use an image format that is
498-
sparse or copy on write so that each virtual instance does not require a 1:1
499-
allocation of a virtual disk to a physical storage, it may be useful to allow
500-
the overcommitment of disk space.
501-
502-
When disk space is overcommitted, the value of ``disk_available_least`` can
503-
be negative. Rather than rounding up to 0, the original negative value is
504-
reported, as this way a user can see the amount by which they are
505-
overcommitting, and the disk weigher can select a host which is less
506-
overcommitted than another host.
507-
508-
To enable scheduling instances while overcommitting disk resources on the node,
509-
adjust the value of the ``disk_allocation_ratio`` configuration option to
510-
greater than ``1.0``:
511-
512-
.. code-block:: none
513-
514-
disk_allocation_ratio > 1.0
515-
516-
.. note::
517-
518-
If the value is set to ``>1``, we recommend keeping track of the free disk
519-
space, as the value approaching ``0`` may result in the incorrect
520-
functioning of instances using it at the moment.
521-
522401
.. _ImagePropertiesFilter:
523402

524403
ImagePropertiesFilter
@@ -709,37 +588,6 @@ PciPassthroughFilter
709588
The filter schedules instances on a host if the host has devices that meet the
710589
device requests in the ``extra_specs`` attribute for the flavor.
711590

712-
.. _RamFilter:
713-
714-
RamFilter
715-
---------
716-
717-
.. deprecated:: 19.0.0
718-
719-
``RamFilter`` is deprecated since the 19.0.0 Stein release. MEMORY_MB
720-
filtering is performed natively using the Placement service when using the
721-
``filter_scheduler`` driver. Furthermore, enabling RamFilter may
722-
incorrectly filter out `baremetal nodes`_ which must be scheduled using
723-
custom resource classes.
724-
725-
.. _baremetal nodes: https://docs.openstack.org/ironic/latest/install/configure-nova-flavors.html
726-
727-
Only schedules instances on hosts that have sufficient RAM available. If this
728-
filter is not set, the scheduler may over provision a host based on RAM (for
729-
example, the RAM allocated by virtual machine instances may exceed the physical
730-
RAM).
731-
732-
You can configure this filter to enable a fixed amount of RAM overcommitment by
733-
using the ``ram_allocation_ratio`` configuration option in ``nova.conf``. The
734-
default setting is:
735-
736-
.. code-block:: ini
737-
738-
ram_allocation_ratio = 1.5
739-
740-
This setting enables 1.5 GB instances to run on any compute node with 1 GB of
741-
free RAM.
742-
743591
RetryFilter
744592
-----------
745593

@@ -1436,10 +1284,6 @@ The allocation ratio configuration is used both during reporting of compute
14361284
node `resource provider inventory`_ to the placement service and during
14371285
scheduling.
14381286

1439-
The (deprecated) `CoreFilter`_, `DiskFilter`_ and `RamFilter`_ filters will use
1440-
the allocation ratio from the compute node directly when calculating available
1441-
capacity on a given node during scheduling.
1442-
14431287
The `AggregateCoreFilter`_, `AggregateDiskFilter`_ and `AggregateRamFilter`_
14441288
filters allow overriding per-compute allocation ratios by setting an allocation
14451289
ratio value using host aggregate metadata. This provides a convenient way to
@@ -1508,6 +1352,41 @@ here.
15081352

15091353
.. _osc-placement: https://docs.openstack.org/osc-placement/latest/index.html
15101354

1355+
.. _hypervisor-specific-considerations:
1356+
1357+
Hypervisor-specific considerations
1358+
----------------------------------
1359+
1360+
Nova provides three configuration options,
1361+
:oslo.config:option:`reserved_host_cpus`,
1362+
:oslo.config:option:`reserved_host_memory_mb`, and
1363+
:oslo.config:option:`reserved_host_disk_mb`, that can be used to set aside some
1364+
number of resources that will not be consumed by an instance, whether these
1365+
resources are overcommitted or not. Some virt drivers may benefit from the use
1366+
of these options to account for hypervisor-specific overhead.
1367+
1368+
HyperV
1369+
Hyper-V creates a VM memory file on the local disk when an instance starts.
1370+
The size of this file corresponds to the amount of RAM allocated to the
1371+
instance.
1372+
1373+
You should configure the
1374+
:oslo.config:option:`reserved_host_disk_mb` config option to
1375+
account for this overhead, based on the amount of memory available
1376+
to instances.
1377+
1378+
XenAPI
1379+
XenServer memory overhead is proportional to the size of the VM and larger
1380+
flavor VMs become more efficient with respect to overhead. This overhead
1381+
can be calculated using the following formula::
1382+
1383+
overhead (MB) = (instance.memory * 0.00781) + (instance.vcpus * 1.5) + 3
1384+
1385+
You should configure the
1386+
:oslo.config:option:`reserved_host_memory_mb` config option to
1387+
account for this overhead, based on the size of your hosts and
1388+
instances.
1389+
15111390
Cells considerations
15121391
~~~~~~~~~~~~~~~~~~~~
15131392

doc/source/contributor/development-environment.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,8 @@ Using fake computes for tests
184184

185185
The number of instances supported by fake computes is not limited by physical
186186
constraints. It allows you to perform stress tests on a deployment with few
187-
resources (typically a laptop). But you must avoid using scheduler filters
188-
limiting the number of instances per compute (like RamFilter, DiskFilter,
189-
AggregateCoreFilter), otherwise they will limit the number of instances per
190-
compute.
191-
187+
resources (typically a laptop). Take care to avoid using scheduler filters
188+
that will limit the number of instances per compute, such as ``AggregateCoreFilter``.
192189

193190
Fake computes can also be used in multi hypervisor-type deployments in order to
194191
take advantage of fake and "real" computes during tests:

doc/source/user/filter-scheduler.rst

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ There are many standard filter classes which may be used
9595
use a comma. E.g., "value1,value2". All hosts are passed if no extra_specs
9696
are specified.
9797
* |ComputeFilter| - passes all hosts that are operational and enabled.
98-
* |CoreFilter| - DEPRECATED; filters based on CPU core utilization. It passes
99-
hosts with sufficient number of CPU cores.
10098
* |AggregateCoreFilter| - filters hosts by CPU core number with per-aggregate
10199
:oslo.config:option:`cpu_allocation_ratio` setting. If no
102100
per-aggregate value is found, it will fall back to the global default
@@ -110,20 +108,13 @@ There are many standard filter classes which may be used
110108
and :oslo.config:option:`filter_scheduler.restrict_isolated_hosts_to_isolated_images`
111109
flags.
112110
* |JsonFilter| - allows simple JSON-based grammar for selecting hosts.
113-
* |RamFilter| - DEPRECATED; filters hosts by their RAM. Only hosts with
114-
sufficient RAM to host the instance are passed.
115111
* |AggregateRamFilter| - filters hosts by RAM with per-aggregate
116112
:oslo.config:option:`ram_allocation_ratio` setting. If no per-aggregate value
117113
is found, it will fall back to the global default
118114
:oslo.config:option:`ram_allocation_ratio`.
119115
If more than one value is found for a host (meaning the host is in two
120116
different aggregates with different ratio settings), the minimum value
121117
will be used.
122-
* |DiskFilter| - DEPRECATED; filters hosts by their disk allocation. Only
123-
hosts with sufficient disk space to host the instance are passed.
124-
:oslo.config:option:`disk_allocation_ratio` setting. The virtual disk to
125-
physical disk allocation ratio, 1.0 by default. The total allowed allocated
126-
disk size will be physical disk multiplied this ratio.
127118
* |AggregateDiskFilter| - filters hosts by disk allocation with per-aggregate
128119
:oslo.config:option:`disk_allocation_ratio` setting. If no per-aggregate value
129120
is found, it will fall back to the global default
@@ -356,8 +347,8 @@ of :oslo.config:option:`filter_scheduler.enabled_filters` affects scheduling
356347
performance. The general suggestion is to filter out invalid hosts as soon as
357348
possible to avoid unnecessary costs. We can sort
358349
:oslo.config:option:`filter_scheduler.enabled_filters`
359-
items by their costs in reverse order. For example, ComputeFilter is better
360-
before any resource calculating filters like RamFilter, CoreFilter.
350+
items by their costs in reverse order. For example, ``ComputeFilter`` is better
351+
before any resource calculating filters like ``NUMATopologyFilter``.
361352

362353
In medium/large environments having AvailabilityZoneFilter before any
363354
capability or resource calculating filters can be useful.
@@ -389,15 +380,15 @@ settings:
389380
--scheduler.driver=nova.scheduler.FilterScheduler
390381
--filter_scheduler.available_filters=nova.scheduler.filters.all_filters
391382
--filter_scheduler.available_filters=myfilter.MyFilter
392-
--filter_scheduler.enabled_filters=RamFilter,ComputeFilter,MyFilter
383+
--filter_scheduler.enabled_filters=ComputeFilter,MyFilter
393384

394385
.. note:: When writing your own filter, be sure to add it to the list of available filters
395386
and enable it in the default filters. The "all_filters" setting only includes the
396387
filters shipped with nova.
397388

398389
With these settings, nova will use the ``FilterScheduler`` for the scheduler
399390
driver. All of the standard nova filters and MyFilter are available to the
400-
FilterScheduler, but just the RamFilter, ComputeFilter, and MyFilter will be
391+
FilterScheduler, but just the ``ComputeFilter`` and ``MyFilter`` will be
401392
used on each request.
402393

403394
Weights
@@ -558,13 +549,10 @@ in :mod:`nova.tests.scheduler`.
558549
.. |BaseHostFilter| replace:: :class:`BaseHostFilter <nova.scheduler.filters.BaseHostFilter>`
559550
.. |ComputeCapabilitiesFilter| replace:: :class:`ComputeCapabilitiesFilter <nova.scheduler.filters.compute_capabilities_filter.ComputeCapabilitiesFilter>`
560551
.. |ComputeFilter| replace:: :class:`ComputeFilter <nova.scheduler.filters.compute_filter.ComputeFilter>`
561-
.. |CoreFilter| replace:: :class:`CoreFilter <nova.scheduler.filters.core_filter.CoreFilter>`
562552
.. |AggregateCoreFilter| replace:: :class:`AggregateCoreFilter <nova.scheduler.filters.core_filter.AggregateCoreFilter>`
563553
.. |IsolatedHostsFilter| replace:: :class:`IsolatedHostsFilter <nova.scheduler.filters.isolated_hosts_filter>`
564554
.. |JsonFilter| replace:: :class:`JsonFilter <nova.scheduler.filters.json_filter.JsonFilter>`
565-
.. |RamFilter| replace:: :class:`RamFilter <nova.scheduler.filters.ram_filter.RamFilter>`
566555
.. |AggregateRamFilter| replace:: :class:`AggregateRamFilter <nova.scheduler.filters.ram_filter.AggregateRamFilter>`
567-
.. |DiskFilter| replace:: :class:`DiskFilter <nova.scheduler.filters.disk_filter.DiskFilter>`
568556
.. |AggregateDiskFilter| replace:: :class:`AggregateDiskFilter <nova.scheduler.filters.disk_filter.AggregateDiskFilter>`
569557
.. |NumInstancesFilter| replace:: :class:`NumInstancesFilter <nova.scheduler.filters.num_instances_filter.NumInstancesFilter>`
570558
.. |AggregateNumInstancesFilter| replace:: :class:`AggregateNumInstancesFilter <nova.scheduler.filters.num_instances_filter.AggregateNumInstancesFilter>`

0 commit comments

Comments
 (0)