Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] Improve performance for native/cross/crosssdk's cleansstate
@ 2018-11-22 11:51 Robert Yang
  2018-11-22 11:51 ` [PATCH 1/2] nopackages.bbclass: improve performance for cleansstate Robert Yang
  2018-11-22 11:51 ` [PATCH 2/2] sstate.bbclass: set SSTATE_EXTRAPATHWILDCARD explicitly Robert Yang
  0 siblings, 2 replies; 5+ messages in thread
From: Robert Yang @ 2018-11-22 11:51 UTC (permalink / raw)
  To: openembedded-core

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-11-22 12:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-22 11:51 [PATCH 0/2] Improve performance for native/cross/crosssdk's cleansstate Robert Yang
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox