Files
nova/releasenotes/notes/deprecate-unlimited-max_concurrent_live_migrations-29c54c7eeb77041c.yaml
Balazs Gibizer 9e678b83eb [compute]Use single long task executor
Move the execution of build_and_run_instance and snapshot_instance to
one common long task executor. Originally snapshot ran
on the RPC pool, build_and_run_instance ran on the default pool.
Also each of these tasks had a separate concurrency limit enforced by a
semaphore.

After this patch each of these tasks use a common Executor. The size of
that executor and the way how we limit the concurrency differs in
eventlet and in native threading mode.

In eventlet mode we have one big Executor with "unlimit" size and
individual semaphores are used for each task type to enforce the
configured limits.

In threading mode we requests the admin to configure the 2 limits to the
same number, and we warn if not. We use that limit (or the max of the 2
limits) as the size of the long task Executor. As the limits are the
same we don't enforce individual limit any more. The executor size will
ensure the shared limit is kept. As the limit is shared a single
operation type can consume the whole limit.

Note that while live migration is a long-running task we cannot put it into
the same long_task_executor as build and snapshot as we need:
1. a very small limit of concurrent live migrations compared to
   builds and snapshots
2. a way to cancel live migrations easily that are waiting due to the
   limit

Change-Id: I88a6a593af8a5b518715e1245a76ee54752afe83
Signed-off-by: Balazs Gibizer <gibi@redhat.com>
2026-02-24 16:28:06 +01:00

63 lines
3.2 KiB
YAML

---
upgrade:
- |
The meaning of the 0 value of the config option
``[DEFAULT]max_concurrent_live_migrations`` has been changed. In the past
the implementation of the meaning of "unlimited" used maximum 1000
concurrent worker greenthreads. For eventlet mode this behavior is kept but
for the native threading mode it is now reduced to 5 native threads. It is
almost always a bad idea to change this config option from its default value, 1.
Please read the `concurrency
<https://docs.openstack.org/nova/latest/admin/concurrency.html>`__
guide for more details.
- |
The default value of the configuration option
``[DEFAULT]sync_power_state_thread_pool_size`` is changed from 1000 to 5 to
have a value that is safe to use in native threading mode. If you are still
using the eventlet mode and relying on a higher value then configure that
higher value explicitly before the upgrade. Please read the
`concurrency <https://docs.openstack.org/nova/latest/admin/concurrency.html>`__
guide for more details.
- |
The meaning of the 0 value of the config option
``[DEFAULT]max_concurrent_builds`` has been changed. In the past
it meant "unlimited" but actually it was limited by the oslo.messaging's
``executor_thread_pool_size`` config option. For eventlet mode "unlimited"
now means 1000 concurrent builds. For the native threading mode it is
now reduced to 10 native threads. Please also read the `concurrency
<https://docs.openstack.org/nova/latest/admin/concurrency.html>`__
guide for more details.
- |
The meaning of the 0 value of the config option
``[DEFAULT]max_concurrent_snapshots`` has been changed. In the past
it meant "unlimited" but actually it was limited by the oslo.messaging's
``executor_thread_pool_size`` config option. For eventlet mode "unlimited"
now means 1000 concurrent snapshots. For the native threading mode it is
now reduced to 5 native threads. Please also read the `concurrency
<https://docs.openstack.org/nova/latest/admin/concurrency.html>`__
guide for more details.
- |
In native threading mode the limit expressed by
``[DEFAULT]max_concurrent_builds`` and
``[DEFAULT]max_concurrent_snapshots`` configuration options are shared
across the two operation types as they are executed by the same Executor.
Therefore the two config options need to be set to the same value. If not
then nova will use the bigger value as the shared limit. The shared limit
also means that one operation type can consume the whole limit.
deprecations:
- |
The possible 0 value of the configuration option
``[DEFAULT]max_concurrent_live_migrations`` is deprecated and will be
removed in a future release. It is almost always a bad idea to change the
default value, 1, of this config option. If more performant live migration
is needed, use the ``live_migration_parallel_connections`` config option
instead.
- |
The possible 0 value of the configuration option
``[DEFAULT]max_concurrent_builds`` is deprecated and will be
removed in a future release.
- |
The possible 0 value of the configuration option
``[DEFAULT]max_concurrent_snapshots`` is deprecated and will be
removed in a future release.