What is the unit of "migration_max_bandwidth" in vdsm.conf ?

Solution Verified - Updated

Environment

  • Red Hat Enterprise Virtualization 3.x
  • Red Hat Virtualization 4.x

Issue

  • To increase the migration_max_bandwidth value ( to allow large VMs to migrate within the timeout period)
  • What unit does migration_max_bandwidth expect?
  • Is that parameter applied per VM migration ?

Resolution

Note: in RHV 4, migration policy should be configured via the engine, and vdsm.conf manual config would be overwritten by engine values.
Units of migration_max_bandwidth option are MiBps, that is megabytes per second.
Please read this article before applying any changes to your environment:
Understanding live migration "migration_max_bandwidth" and "max_outgoing_connections" parameters in vdsm.conf

Note: the below changes have to be applied to all the hosts in the environment / all the hosts within the same cluster.

1. Put the host in maintenance mode.

2. Make the following changes in the vdsm.conf file.

The exact config are.

[root@example.com]#cat /etc/vdsm/vdsm.conf
[vars]
trust_store_path = /etc/pki/vdsm
ssl=true

# Maximum bandwidth for migration, in MiBps, 0 means libvirt's
# default, since 0.10.x default in libvirt is unlimited
# migration_max_bandwidth = 32
migration_max_bandwidth = 100

[addresses]
management_port=54321

Note: You can set the migration_max_bandwidth = 1024, as per requirement. However, you also consider capability of network which is used for migration.

3. Restart the vdsmd service.

# service vdsmd restart

Diagnostic Steps

1. The unit is "MiBps" as mentioned in /usr/share/doc/vdsm-*/vdsm.conf.sample:

# Maximum bandwidth for migration, in MiBps, 0 means libvirt's
# default, since 0.10.x default in libvirt is unlimited
# migration_max_bandwidth = 32

2. It is per vm :

        if MigrationMonitorThread._MIGRATION_MONITOR_INTERVAL:
            monitorThread = MigrationMonitorThread(self._vm)
            monitorThread.start()

        try:
            maxBandwidth = config.getint('vars', 'migration_max_bandwidth')
            self._vm._dom.migrateToURI(duri, libvirt.VIR_MIGRATE_LIVE |
                                    libvirt.VIR_MIGRATE_PEER2PEER, None, maxBandwidth

Note, in older version , there are following "confusing" comment may include in /etc/vdsm/vdsm.conf file or vdsm.conf.sample file.

# Maximum bandwidth for migration, in mbps, 0 means libvirt's default (30mbps?)

usually mbps indicate Mega bits per second. However the units is MiBps actually.

Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.