BKM: improve qemu performance: Difference between revisions

From Yocto Project
Jump to navigationJump to search
No edit summary
No edit summary
Line 15: Line 15:


== Add extra disk space ==
== Add extra disk space ==
If workload inside qemu is disk-intensive.
If workload inside qemu is disk-intensive, it may requires huge disk space. You can set up NFS server or add extra disk image, which is preferred as NFS server introduce extra network workload.

Revision as of 06:44, 6 December 2011

improve qemu performance

Qemu in yocto is emulator, and is slow when running huge task inside. E.g. running yocto build inside qemu. This article illustrate possible performance improvement to accelerate it

Enable KVM

If you have processor with VTx support, you can enable KVM so that virtualization rather than emulation is used for performance. Pls. refer following:

Add big memory

Sometimes, workload inside qemu requires huge memory. Fail to do this lead performance drop. So pls. add enough memory to qemu via -m 2048 (2G).

enable SMP

If workload inside qemu is CPU-intensive, you can enable smp:

  • enable smp configuration in yocto kernel
  • enable smp option for qemu, like -smp 4 to give 4 vcpu to guest.

Add extra disk space

If workload inside qemu is disk-intensive, it may requires huge disk space. You can set up NFS server or add extra disk image, which is preferred as NFS server introduce extra network workload.