Rate This Document
Findability
Accuracy
Completeness
Readability

Testing the Performance

The VM displays the default cache size before cache size modification and the newly configured size after the modification.

  1. Add the qemu:commandline tag to the end of the XML file, and enable the all_vcpus_paused and all_vcpus_prepared trace events.
    1
    2
    3
    4
    5
    6
    7
    <domain type="kvm" xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
        ...
        <qemu:commandline>
            <qemu:arg value='--trace'/>
            <qemu:arg value="all_vcpus*"/>
        </qemu:commandline>
    </domain>
    
  2. Set the console log level to prevent KAE device driver logs from being printed to the serial port.
    1
    sysctl -w kernel.printk="4 4 1 7"
    
  3. Optional: Synchronize the local time of the migration source and target.
    1
    ntpdate <NTP_server_IP_address>
    
  4. Check whether the time is consistent.
    1
    date +%Y-%m-%d\ %H:%M:%S.%3N
    
  5. Set downtime-limit to 100.
    1
    virsh migrate-setmaxdowntime <VM_name> 100
    
  6. Compile the test tool.
    1
    2
    3
    export LD_LIBRARY_PATH=/usr/local/kaezip/lib:$ LD_LIBRARY_PATH
    cd KAEZlib/test/perftest
    make
    

    KAEZlib/test/perftest is in the KAE 2.0 source package downloaded in Installing KAE.

  7. Optional: Execute the KAE compression task in the VM.
    1
    ./kaezip_perf -m 6 -l 10240 -n 3000
    
  8. Perform VM live migration on the source physical machine.
    1
    virsh migrate --live --unsafe <VM_name> qemu+ssh://<VM_IP_address>/system tcp://<VM_IP_address>
    
  9. After the migration is complete, view the all_vcpus_paused event in the logs of the source machine and the all_vcpus_prepared event in the logs of the target machine, and calculate the downtime of live migration based on the timestamps.
    View the logs.
    1
    less /var/log/libvirt/qemu/<VM_name>.log