This document describes how to change NBD transport NFC parameters for increased migration performance when using the {project-first} product.
Warning
|
Cold Migration Only
Using AIO buffering is only suitable for Cold Migration use cases.
|
-
The best migration performance was achieved by migrating using multiple VMs (10) on a single ESXi host with the following values:
-
VixDiskLib.nfcAio.Session.BufSizeIn64KB=16
-
vixDiskLib.nfcAio.Session.BufCount=4
-
-
The following improvements were noted when using AIO buffer (Asynchronous Buffer Counts) settings:
-
Migration time was reduced by 31.1%, from
0:24:32
to0:16:54
. -
Read rate was increased from
347.83 MB/s
to504.93 MB/s
.
-
-
There was no significant improvement observed when using AIO buffer settings with a single VM.
-
There was no significant improvement observed when using AIO buffer settings with multiple VMs from multiple hosts.
-
Ensure that the
forklift-controller
pod in theopenshift-mtv
namespace supports the AIO buffer values.Since the pod name prefix is dynamic, check the pod name first by running the following command:
oc get pods -n openshift-mtv | grep forklift-controller | awk '{print $1}'
The example output is as follows:
forklift-controller-667f57c8f8-qllnx
NoteThis is the pod name prefix from the example:
forklift-controller-667f57c8f8-qllnx
-
Check the environment variables of the pod by running:
oc get pod forklift-controller-667f57c8f8-qllnx -n openshift-mtv -o yaml
-
Check for the following lines in the output:
... \- name: VIRT\_V2V\_EXTRA\_ARGS \- name: VIRT\_V2V\_EXTRA\_CONF\_CONFIG\_MAP ...
-
In the
openshift-mtv namespace
, edit theForkliftController
object to include the AIO buffer values by running the following command:oc edit forkliftcontroller -n openshift-mtv
Add the following under the spec section:
virt_v2v_extra_args: "--vddk-config /mnt/extra-v2v-conf/input.conf" virt_v2v_extra_conf_config_map: "perf"
perf
-
Create the required ConfigMap using the following command:
oc -n openshift-mtv create cm perf
-
Convert the desired buffer configuration values to Base64. For example, for 16/4:
echo -e "VixDiskLib.nfcAio.Session.BufSizeIn64KB=16\nvixDiskLib.nfcAio.Session.BufCount=4" | base64
The output will be similar to the following:
Vml4RGlza0xpYi5uZmNBaW8uU2Vzc2lvbi5CdWZTaXplSW42NEtCPTE2CnZpeERpc2tMaWIubmZjQWlvLlNlc3Npb24uQnVmQ291bnQ9NAo=
-
Update the perf ConfigMap with the Base64 string under the
binaryData
section, for example:apiVersion: v1 kind: ConfigMap binaryData: input.conf: Vml4RGlza0xpYi5uZmNBaW8uU2Vzc2lvbi5CdWZTaXplSW42NEtCPTE2CnZpeERpc2tMaWIubmZjQWlvLlNlc3Npb24uQnVmQ291bnQ9NAo= metadata: name: perf namespace: openshift-mtv
-
Restart the forklift-controller pod to apply the new configuration.
-
Ensure the
VIRT_V2V_EXTRA_ARGS
environment variable reflects the updated settings.
-
Run a migration plan and check the logs of the migration pod. Confirm that the AIO buffer settings are passed as parameters, particularly the
--vddk-config value
.For example:
exec: /usr/bin/virt-v2v … --vddk-config /mnt/extra-v2v-conf/input.conf
Sample log excerpt:
Buffer size calc for 16 value: (16 * 64 * 1024 = 1048576) nbdkit: vddk[1]: debug: [NFC VERBOSE] NfcAio_OpenSession: Opening an AIO session. nbdkit: vddk[1]: debug: [NFC INFO] NfcAioInitSession: Disabling read-ahead buffer since the AIO buffer size of 1048576 is >= the read-ahead buffer size of 65536. Explicitly setting flag '`NFC_AIO_SESSION_NO_NET_READ_AHEAD`' nbdkit: vddk[1]: debug: [NFC VERBOSE] NfcAioInitSession: AIO Buffer Size is 1048576 nbdkit: vddk[1]: debug: [NFC VERBOSE] NfcAioInitSession: AIO Buffer Count is 4
NoteThe above logs were when using
debug_level = 4
-
Log in to the migration pod and verify the buffer settings using the following command:
cat /mnt/extra-v2v-conf/input.conf
The example output is as follows:
VixDiskLib.nfcAio.Session.BufSizeIn64KB=16 vixDiskLib.nfcAio.Session.BufCount=4
-
To enable debug logs, convert the configuration to Base64, including a high log level:
echo -e "`VixDiskLib.nfcAio.Session.BufSizeIn64KB=16\nVixDiskLib.nfcAio.Session.BufCount=4\nVixDiskLib.nfc.LogLevel=4`" | base64
NoteAdding a high log level will degrade performance and is for debugging purposes only.
To disable the AIO buffer configuration, complete the following steps:
-
Edit the ForkliftController Object: Remove the previously added lines from the spec section in the ForkliftController object:
oc edit forkliftcontroller -n openshift-mtv
-
Remove the following lines:
virt_v2v_extra_args: "`–vddk-config /mnt/extra-v2v-conf/input.conf`" virt_v2v_extra_conf_config_map: "`perf`"
-
Delete the ConfigMap: Remove the perf ConfigMap that was created earlier:
oc delete cm perf -n openshift-mtv
-
Restart the Forklift Controller Pod (Optional).
If needed, ensure the changes take effect by restarting the forklift-controller pod.
Support is based upon tests performed using the following versions:
-
vSphere : 7.0.3
-
VDDK : 7.0.3
-
For other VDDK and vSphere versions, please check the AIO buffer support in the official VMware documentation.