From: Robert Yang <liezhi.yang@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH 0/2] Improve performance for native/cross/crosssdk's cleansstate
Date: Thu, 22 Nov 2018 19:51:57 +0800 [thread overview]
Message-ID: <cover.1542887170.git.liezhi.yang@windriver.com> (raw)
Hi RP and Ross,
These 2 patches can improve performance a lot for native/cross/crosssdk's
cleansstate:
This test is based on more than 600,000 sstate files
* Without disk caches
# echo 3 >/proc/sys/vm/drop_caches
$ bitbake -p
$ time bitbake quilt-native -ccleansstate
- Before:
real 4m53.815s
user 0m0.820s
sys 0m0.128s
- After
real 0m58.483s
user 0m0.744s
sys 0m0.108s
Saved 293 - 58 = 235s (80% improvement)
* With disk caches (26.6s -> 5.8s, 78% improvement)
$ bitbake -p
$ time bitbake quilt-native -ccleansstate
- Before:
real 0m26.682s
user 0m0.748s
sys 0m0.088s
- After
real 0m5.846s
user 0m0.716s
sys 0m0.116s
Saved 26.6 - 5.8 = 20.8s (78% improvement)
======
I have another idea is put sstate files into the directory
named by the recipe, e.g.:
sstate-cache/quilt-native/sstate:quilt-native::0.65:r0::3:773341447192feb6c1519cace0e6be35_populate_lic.tgz
sstate-cache/quilt-native/sstate:quilt-native::0.65:r0::3:773341447192feb6c1519cace0e6be35_populate_lic.tgz.siginfo
sstate-cache/quilt-native/sstate:quilt-native::0.65:r0::3:ab4a82a07b10926bb42d2f37242413c7_patch.tgz.siginfo
sstate-cache/quilt-native/sstate:quilt-native::0.65:r0::3:e8a4c952a66942653e36f289eaf68ca5_fetch.tgz.siginfo
sstate-cache/quilt-native/sstate:quilt-native::0.65:r0::3:fd35240c437cefa66e24cfe65d3fb335_unpack.tgz.siginfo
This can make it easier to manage sstate files, and can reduce the load of
glob.glob(), currently, the remove command is something like:
$ rm -f glob.glob(sstate-cache/*/sstate:foo.*bar.*)
If we put them into recipe named directory, then we can run:
$ rm -f glob.glob(sstate-cache/<recipe>/sstate:foo.*bar.*)
Which should be faster, what's your opinion, please ?
// Robert
The following changes since commit fc5418e7bbdecfb27bafe595084e0fd0f991a388:
meta/icecc.bbclass: Update system blacklists (2018-11-21 11:48:18 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/sstate
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/sstate
Robert Yang (2):
nopackages.bbclass: improve performance for cleansstate
sstate.bbclass: set SSTATE_EXTRAPATHWILDCARD explicitly
meta/classes/nopackages.bbclass | 35 +++++++++++++++++++++++------------
meta/classes/sstate.bbclass | 2 +-
2 files changed, 24 insertions(+), 13 deletions(-)
--
2.7.4
next reply other threads:[~2018-11-22 11:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-22 11:51 Robert Yang [this message]
2018-11-22 11:51 ` [PATCH 1/2] nopackages.bbclass: improve performance for cleansstate Robert Yang
2018-11-22 12:15 ` Richard Purdie
2018-11-22 12:47 ` Yang, Liezhi
2018-11-22 11:51 ` [PATCH 2/2] sstate.bbclass: set SSTATE_EXTRAPATHWILDCARD explicitly Robert Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1542887170.git.liezhi.yang@windriver.com \
--to=liezhi.yang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.