On 6/23/20 6:13 AM, Fredrik Gustafsson wrote:
When building and having a good cache hit, a significant amount of time is
spent in the phase of generating a rootfs, which is really about the
performance of the package manager. ipkg is way slower than deb or rpm.
I was interested enough in your comment here to collect a small sampling of comparative do_rootfs runs on one of my dev machines.

I used a virgin poky clone and tried to replicate the steps you provided in your OP, timing only the execution of `bitbake -c do_rootfs core-image-minimal`. I used the debian `time` package for timing. Here's what I got:

# Summary
PM     Avg do_rootfs time (s)
--     ----------------------
deb    33.89
ipk    33.35
rpm    31.85

# Raw Data
deb    00:33.54
deb    00:34.66
deb    00:33.55
deb    00:33.23
deb    00:34.46
ipk    00:33.96
ipk    00:34.43
ipk    00:33.99
ipk    00:32.17
ipk    00:32.22
rpm    00:29.92
rpm    00:32.31
rpm    00:31.90
rpm    00:33.31
rpm    00:31.80

Based on those results, it seems like all the current PMs are similar in terms of execution time. Are there major differences between my test setup and yours? And do you already have a layer with APK available that I could compare against on my hardware?

This is the crude script I used to automate the test runs:

```
#!/bin/bash
set -euxo pipefail

TIME=/usr/bin/time

recipe=core-image-minimal

# Options are:
#  - 'package_deb' for debian style deb files
#  - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager)
#  - 'package_rpm' for rpm style packages
function set_pkg_man() {
    pkg_man=${1}
    sed -i "s/\(^PACKAGE_CLASSES ?= \)\"\(.*\)\"/\1\"$pkg_man\"/" conf/local.conf
}

function rebuild_recipe() {
    bitbake -c cleanall $recipe
    bitbake $recipe
}

function test_recipe() {
    local name=${1}
    bitbake -c cleansstate $recipe
    bitbake -c clean $recipe
    $TIME bitbake -c do_rootfs -f $recipe 2>&1 | tee outs/out.$name
}

# rpm
set_pkg_man package_rpm
rebuild_recipe

test_recipe rpm.1
test_recipe rpm.2
test_recipe rpm.3
test_recipe rpm.4
test_recipe rpm.5


# ipk
set_pkg_man package_ipk
rebuild_recipe

test_recipe ipk.1
test_recipe ipk.2
test_recipe ipk.3
test_recipe ipk.4
test_recipe ipk.5

# deb
set_pkg_man package_deb
rebuild_recipe

test_recipe deb.1
test_recipe deb.2
test_recipe deb.3
test_recipe deb.4
test_recipe deb.5
```

Thanks,

--
Alex Stewart
Software Engineer - LabVIEW Real-Time OS
National Instruments

[email protected]
office: +1(512)683-8522

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#139891): 
https://lists.openembedded.org/g/openembedded-core/message/139891
Mute This Topic: https://lists.openembedded.org/mt/75057633/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to