Yocto Boot2Qt build performance

Hi,

I’ve always built my Yocto-based images using the processes outlined in the various Toradex articles, using Toradex console images as the base/reference. My workstation has 12 cores (24 threads), and throughout the build process, all 24 threads are at/around 100% utilisation as one would expect. A complete build takes somewhere in the vicinity of ~2 hours.

I’m now in the process of using Boot2Qt, and while the build process is essentially the same (it’s still just a Yocto build), I’m finding strange performance differences. When building the standard ‘b2qt-embedded-qt5-image’ image, I’m finding the following:

  1. The do_fetch() processes for each of the packages are extremely slow. I have a 100Mbit connection, and when building a Toradex Yocto image the packages are fetched quickly as you’d expect. When building using Boot2Qt, the do_fetch() download speeds are minute. For example, do_fetch() of linux-toradex-4.14-2.0.x+gitAUTOINC+fff496c2a1-r0 is currently sitting at around ~40KB/s.
  2. The bitbake system utilisation is nowhere near the level I’d expect. As per above, I see 100% utilisation across all 24 threads when building a Toradex-based Yocto image, but when building in the Boot2Qt-based environment, the average utilisation across the 24 threads is somewhere between 5% and 20%.

The combination of the above two issues means that the Boot2Qt build is going to take a considerably longer time than a similar Toradex-based build. For example, I’ve been building the ‘b2qt-embedded-qt5-image’ image for 2 hours now and it’s only at 19%, with many processes still in the do_fetch() phase, downloading at <50KB/s.

Have you encountered performance issues such as these when using Boot2Qt?

After 6 hours an error occurred, causing the build to fail. I’ve deleted the build directory, and reconfigured the build environment and started a completely standard ‘b2qt-embedded-qt5-image’ build. I had added a patch to the kernel in the previous build, whereas this time I left the configuration completely standard. This time the performance seemed as expected, with fast downloads and high CPU utilisation. I don’t understand why my single .bbappend and corresponding patch file would have had any impact, but I’ll leave that for the time being.

The larger issue I’m working through at the moment, is trying to understand how to build a custom layer within Boot2Qt. As mentioned above, I’m comfortable with the Toradex approach (i.e. ‘meta-mylayer’ from the 2-part video series), but this link on Qt’s site mentions manifests, etc., which aren’t well documented or explained. Is it possible to add a custom layer and build a custom image using the traditional Toradex approach, or do I need to create and use a manifest as suggested in the Qt article? If the latter, are you able to provide any reference information or example manifests, etc. as a starting point?

Hi @jars121

We haven’t experienced any issue with boot2qt and download speed so far. Boot2Qt is also based on Yocto you can add your custom meta layer to it. The third party meta layers are located under sources/. They even use some meta layers from our BSP so there shouldn’t be a huge difference. The manifest is probably the one for repo. It just tells repo where to fetch which version of a git repository. However, you don’t need that if you work locally.

Regards,
Stefan