Benchmark LXD VMs

How can I benchmark LXD VMs, if it’s possible at all.
I tried one from the doc:

lxd.benchmark launch --count 10 worker-image

but without success:

[Jun  9 07:43:22.030] Failed to launch container 'benchmark-01':
Requested image's type "virtual-machine" doesn't match instance type "container"

Hi @mezobari,
Have you check it out the documentation? May be you should try with the init.
https://linuxcontainers.org/lxd/docs/master/howto/benchmark_performance/
And if the worker-image is the alias name of a vm then maybe the default case is looking for container image.
Regards.

1 Like

Yes, I did it according to the doc.
Getting the same error for both cases, init and launch

Test environment:
  Server backend: lxd
  Server version: 5.14
  Kernel: Linux
  Kernel architecture: x86_64
  Kernel version: 5.15.0-73-generic
  Storage backend: zfs | dir
  Storage version: 2.1.5-1ubuntu6~22.04.1 | 1
  Container backend: qemu | lxc
  Container version: 8.0.0 | 5.0.2

Test variables:
  Container count: 10
  Container mode: unprivileged
  Startup mode: normal startup
  Image: worker-image
  Batches: 0
  Batch size: 48
  Remainder: 10

[Jun  9 12:45:26.129] Found image in local store: f2a2765917eb0d5d8881e2b3389636671837aee285cf39c8f82ba0e98cb08b95
[Jun  9 12:45:26.129] Batch processing start
[Jun  9 12:45:26.147] Failed to launch container 'benchmark-08': Requested image's type "virtual-machine" doesn't match instance type "container"
[Jun  9 12:45:26.150] Failed to launch container 'benchmark-09': Requested image's type "virtual-machine" doesn't match instance type "container"
[Jun  9 12:45:26.162] Failed to launch container 'benchmark-10': Requested image's type "virtual-machine" doesn't match instance type "container"
[Jun  9 12:45:26.182] Failed to launch container 'benchmark-05': Requested image's type "virtual-machine" doesn't match instance type "container"
[Jun  9 12:45:26.182] Failed to launch container 'benchmark-01': Requested image's type "virtual-machine" doesn't match instance type "container"
[Jun  9 12:45:26.182] Failed to launch container 'benchmark-07': Requested image's type "virtual-machine" doesn't match instance type "container"
[Jun  9 12:45:26.186] Failed to launch container 'benchmark-03': Requested image's type "virtual-machine" doesn't match instance type "container"
[Jun  9 12:45:26.190] Failed to launch container 'benchmark-04': Requested image's type "virtual-machine" doesn't match instance type "container"
[Jun  9 12:45:26.192] Failed to launch container 'benchmark-02': Requested image's type "virtual-machine" doesn't match instance type "container"
[Jun  9 12:45:26.193] Failed to launch container 'benchmark-06': Requested image's type "virtual-machine" doesn't match instance type "container"
[Jun  9 12:45:26.193] Batch processing completed in 0.064s

Can you post the lxc image list.
Regards.

+--------------+--------------+--------+-------------------------------------+--------------+-----------------+-----------+------------------------------+
|    ALIAS     | FINGERPRINT  | PUBLIC |             DESCRIPTION             | ARCHITECTURE |      TYPE       |   SIZE    |         UPLOAD DATE          |
+--------------+--------------+--------+-------------------------------------+--------------+-----------------+-----------+------------------------------+
| worker-image | f2a2765917eb | no     | Debian bullseye                     | x86_64       | VIRTUAL-MACHINE | 2029.34MB | May 29, 2023 at 2:11pm (UTC) |
+--------------+--------------+--------+-------------------------------------+--------------+-----------------+-----------+------------------------------+
|              | 201410db8044 | no     | Ubuntu jammy amd64 (20230608_07:42) | x86_64       | VIRTUAL-MACHINE | 262.83MB  | Jun 8, 2023 at 1:54pm (UTC)  |
+--------------+--------------+--------+-------------------------------------+--------------+-----------------+-----------+------------------------------+

if I understand it correctly, the tool only supports container not vm image.
lxd.benchmark --help
Regards.

1 Like