mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-05 05:45:46 +00:00
Add auto convergence migration parameters
They can be used to tune auto-convergence algorithm (which is enabled with VIR_MIGRATE_AUTO_CONVERGE). Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
15f42cba7e
commit
f6e12b4029
@ -845,6 +845,25 @@ typedef enum {
|
|||||||
*/
|
*/
|
||||||
# define VIR_MIGRATE_PARAM_COMPRESSION_XBZRLE_CACHE "compression.xbzrle.cache"
|
# define VIR_MIGRATE_PARAM_COMPRESSION_XBZRLE_CACHE "compression.xbzrle.cache"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VIR_MIGRATE_PARAM_AUTO_CONVERGE_INITIAL:
|
||||||
|
*
|
||||||
|
* virDomainMigrate* params field: the initial percentage guest CPUs are
|
||||||
|
* throttled to when auto-convergence decides migration is not converging.
|
||||||
|
* As VIR_TYPED_PARAM_INT.
|
||||||
|
*/
|
||||||
|
# define VIR_MIGRATE_PARAM_AUTO_CONVERGE_INITIAL "auto_converge.initial"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VIR_MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT:
|
||||||
|
*
|
||||||
|
* virDomainMigrate* params field: the increment added to
|
||||||
|
* VIR_MIGRATE_PARAM_AUTO_CONVERGE_INITIAL whenever the hypervisor decides
|
||||||
|
* the current rate is not enough to ensure convergence of the migration.
|
||||||
|
* As VIR_TYPED_PARAM_INT.
|
||||||
|
*/
|
||||||
|
# define VIR_MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT "auto_converge.increment"
|
||||||
|
|
||||||
/* Domain migration. */
|
/* Domain migration. */
|
||||||
virDomainPtr virDomainMigrate (virDomainPtr domain, virConnectPtr dconn,
|
virDomainPtr virDomainMigrate (virDomainPtr domain, virConnectPtr dconn,
|
||||||
unsigned long flags, const char *dname,
|
unsigned long flags, const char *dname,
|
||||||
|
@ -9960,6 +9960,14 @@ static const vshCmdOptDef opts_migrate[] = {
|
|||||||
.type = VSH_OT_INT,
|
.type = VSH_OT_INT,
|
||||||
.help = N_("page cache size for xbzrle compression")
|
.help = N_("page cache size for xbzrle compression")
|
||||||
},
|
},
|
||||||
|
{.name = "auto-converge-initial",
|
||||||
|
.type = VSH_OT_INT,
|
||||||
|
.help = N_("initial CPU throttling rate for auto-convergence")
|
||||||
|
},
|
||||||
|
{.name = "auto-converge-increment",
|
||||||
|
.type = VSH_OT_INT,
|
||||||
|
.help = N_("CPU throttling rate increment for auto-convergence")
|
||||||
|
},
|
||||||
{.name = NULL}
|
{.name = NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -10120,6 +10128,24 @@ doMigrate(void *opaque)
|
|||||||
VIR_FREE(xml);
|
VIR_FREE(xml);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((rv = vshCommandOptInt(ctl, cmd, "auto-converge-initial", &intOpt)) < 0) {
|
||||||
|
goto out;
|
||||||
|
} else if (rv > 0) {
|
||||||
|
if (virTypedParamsAddInt(¶ms, &nparams, &maxparams,
|
||||||
|
VIR_MIGRATE_PARAM_AUTO_CONVERGE_INITIAL,
|
||||||
|
intOpt) < 0)
|
||||||
|
goto save_error;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((rv = vshCommandOptInt(ctl, cmd, "auto-converge-increment", &intOpt)) < 0) {
|
||||||
|
goto out;
|
||||||
|
} else if (rv > 0) {
|
||||||
|
if (virTypedParamsAddInt(¶ms, &nparams, &maxparams,
|
||||||
|
VIR_MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT,
|
||||||
|
intOpt) < 0)
|
||||||
|
goto save_error;
|
||||||
|
}
|
||||||
|
|
||||||
if (vshCommandOptBool(cmd, "live"))
|
if (vshCommandOptBool(cmd, "live"))
|
||||||
flags |= VIR_MIGRATE_LIVE;
|
flags |= VIR_MIGRATE_LIVE;
|
||||||
if (vshCommandOptBool(cmd, "p2p"))
|
if (vshCommandOptBool(cmd, "p2p"))
|
||||||
|
@ -1550,14 +1550,14 @@ to the I<uri> namespace is displayed instead of being modified.
|
|||||||
=item B<migrate> [I<--live>] [I<--offline>] [I<--direct>] [I<--p2p> [I<--tunnelled>]]
|
=item B<migrate> [I<--live>] [I<--offline>] [I<--direct>] [I<--p2p> [I<--tunnelled>]]
|
||||||
[I<--persistent>] [I<--undefinesource>] [I<--suspend>] [I<--copy-storage-all>]
|
[I<--persistent>] [I<--undefinesource>] [I<--suspend>] [I<--copy-storage-all>]
|
||||||
[I<--copy-storage-inc>] [I<--change-protection>] [I<--unsafe>] [I<--verbose>]
|
[I<--copy-storage-inc>] [I<--change-protection>] [I<--unsafe>] [I<--verbose>]
|
||||||
[I<--abort-on-error>] [I<--auto-converge>] [I<--postcopy>]
|
[I<--abort-on-error>] [I<--postcopy>] [I<--postcopy-after-precopy>]
|
||||||
[I<--postcopy-after-precopy>] I<domain> I<desturi> [I<migrateuri>]
|
I<domain> I<desturi> [I<migrateuri>] [I<graphicsuri>] [I<listen-address>] [I<dname>]
|
||||||
[I<graphicsuri>] [I<listen-address>] [I<dname>]
|
|
||||||
[I<--timeout> B<seconds> [I<--timeout-suspend> | I<--timeout-postcopy>]]
|
[I<--timeout> B<seconds> [I<--timeout-suspend> | I<--timeout-postcopy>]]
|
||||||
[I<--xml> B<file>] [I<--migrate-disks> B<disk-list>] [I<--disks-port> B<port>]
|
[I<--xml> B<file>] [I<--migrate-disks> B<disk-list>] [I<--disks-port> B<port>]
|
||||||
[I<--compressed>] [I<--comp-methods> B<method-list>]
|
[I<--compressed>] [I<--comp-methods> B<method-list>]
|
||||||
[I<--comp-mt-level>] [I<--comp-mt-threads>] [I<--comp-mt-dthreads>]
|
[I<--comp-mt-level>] [I<--comp-mt-threads>] [I<--comp-mt-dthreads>]
|
||||||
[I<--comp-xbzrle-cache>]
|
[I<--comp-xbzrle-cache>] [I<--auto-converge>] [I<auto-converge-initial>]
|
||||||
|
[I<auto-converge-increment>]
|
||||||
|
|
||||||
Migrate domain to another host. Add I<--live> for live migration; <--p2p>
|
Migrate domain to another host. Add I<--live> for live migration; <--p2p>
|
||||||
for peer-2-peer migration; I<--direct> for direct migration; or I<--tunnelled>
|
for peer-2-peer migration; I<--direct> for direct migration; or I<--tunnelled>
|
||||||
@ -1582,14 +1582,18 @@ by the hypervisor, but can be explicitly used to reject the migration if the
|
|||||||
hypervisor lacks change protection support. I<--verbose> displays the progress
|
hypervisor lacks change protection support. I<--verbose> displays the progress
|
||||||
of migration. I<--abort-on-error> cancels
|
of migration. I<--abort-on-error> cancels
|
||||||
the migration if a soft error (for example I/O error) happens during the
|
the migration if a soft error (for example I/O error) happens during the
|
||||||
migration. I<--auto-converge> forces convergence during live migration.
|
migration. I<--postcopy> enables post-copy logic in migration, but does not
|
||||||
I<--postcopy> enables post-copy logic in migration, but does not
|
|
||||||
actually start post-copy, i.e., migration is started in pre-copy mode.
|
actually start post-copy, i.e., migration is started in pre-copy mode.
|
||||||
Once migration is running, the user may switch to post-copy using the
|
Once migration is running, the user may switch to post-copy using the
|
||||||
B<migrate-postcopy> command sent from another virsh instance or use
|
B<migrate-postcopy> command sent from another virsh instance or use
|
||||||
I<--postcopy-after-precopy> to let libvirt automatically switch to
|
I<--postcopy-after-precopy> to let libvirt automatically switch to
|
||||||
post-copy after the first pass of pre-copy is finished.
|
post-copy after the first pass of pre-copy is finished.
|
||||||
|
|
||||||
|
I<--auto-converge> forces convergence during live migration. The initial
|
||||||
|
guest CPU throttling rate can be set with I<auto-converge-initial>. If the
|
||||||
|
initial throttling rate is not enough to ensure convergence, the rate is
|
||||||
|
periodically increased by I<auto-converge-increment>.
|
||||||
|
|
||||||
B<Note>: Individual hypervisors usually do not support all possible types of
|
B<Note>: Individual hypervisors usually do not support all possible types of
|
||||||
migration. For example, QEMU does not support direct migration.
|
migration. For example, QEMU does not support direct migration.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user