Bug 1733 - [Build Appliance] Improve Self-Hosted Performance
Summary: [Build Appliance] Improve Self-Hosted Performance
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Low enhancement
Target Milestone: 1.2 M2
Assignee: Edwin Zhai
QA Contact:
URL:
Whiteboard: (P2) (Test Plan Ready) : Not need now.
Depends on:
Blocks:
 
Reported: 2011-11-04 03:43 UTC by Edwin Zhai
Modified: 2012-01-10 00:03 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Edwin Zhai 2011-11-04 03:43:28 UTC
Improve bitbake build performance in L1 target. To achieve bug 1732, we make true hardware platform as work around, like n450, as L1 target, in which start the build process. And one NFS server in host is used as source server.

we need do:
1. pre-install another disk image for source/sstate
2. build performance improvement/test: enabling KVM, SMP or device pass-through for network/disk
Comment 1 Dexuan Cui 2011-11-21 00:58:59 UTC
Let me change the owner to Edwin since he is actually doing the work. :-)
Edwin has enabled KVM so the recipe parsing time was reduced from 30min to 2min now.
Edwin will try to enable SMP and other things.

Edwin, can you please update the WhiteBoard field with the below format?
[P2] [D7] Development (xx% completed)
Comment 2 Edwin Zhai 2011-11-21 04:36:23 UTC
I have enabed KVM, guest smp, and virtio for net/blk. The result is promising: parsing time drop to 2 mins from 30 mins, but still has gap with native(4~5X slower as my rough estimation).

At this point, 50% work are done with some tuning potentials left: device pass-through(like NIC or USB hard disk), cpu/memory virtualization optimization(like vcpu scheduling or memory/cache optimization), but all of them needs more  efforts and depends on specific hardware. 

So I'd like to change L1 target as physical machine(like what Dexuan did on sugarbay) at this point, and re-visit performance issue in future if needed.

The risk I can see is the platform difference when we convert the disk image from physical machine to emulated vmware system. This may affect hob integration efforts as it depends on X...
Comment 3 Edwin Zhai 2011-11-21 04:59:10 UTC
Saved the setup BKMs for future use:)

== network virtualization ==
Set it via bridge, so that guest act as a true machine in the network.
http://www.linux-kvm.org/page/Networking#public_bridge

== guest smp ==
need following in qemux86 kernel config 
+CONFIG_SMP=y
then append "-smp 4" with qemu

== virtio ==
need following in qemux86 kernel config
+CONFIG_VIRTIO=y
+CONFIG_VIRTIO_PCI=y
+CONFIG_VIRTIO_BALLOON=y
+CONFIG_VIRTIO_RING=y
+CONFIG_VIRTIO_NET=y
+CONFIG_VIRTIO_BLK=y

for blk, append following parameter with qemu:
"-drive file=/home/gzhai/osel/images/source.img,if=virtio -drive file=/home/gzhai/osel/images/build.img,if=virtio"

for net, append following to original "-net nic..."
"model=virtio,"
Comment 4 Edwin Zhai 2011-11-28 06:36:02 UTC
Tested directed assign usb disk to qemu without VTd. The result is not good.
Comment 5 Edwin Zhai 2012-01-10 00:03:11 UTC
performance BKM @
https://wiki.yoctoproject.org/wiki/BKM:_improve_qemu_performance

As we can get vmdk image directly, there is no need to continue tuning performance on KVM. KVM image should be a debug tools in future. Mark it as fix.