Skip to content

RFC Poky disk space size optimization

Dongxiao Xu poky 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3package.bbclass: Use hard link for package split instead of copymeta/classes/package.bbclass+5 -30 replies
2/3sstate.bbclass: Use hard link when staging files into sysrootsmeta/classes/sstate.bbclass meta/lib/oe/path.py+29 -10 replies
3/3staging.bbclass: use hardlink when staging files to sysroot-destdirmeta/classes/staging.bbclass+26 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3][RFC] Poky disk space size optimization

This RFC aims to reduce the poky disk space size.

The optimization point is the duplicated file copies in WORKDIR and sysroot directories. When installing, files will be copied from source code package into the image folder; Then some files will be copied from image folder to sysroot-destdir, and some other files will be copied from image folder to package folder. While doing package split, some files will be copied from package folder to packages-split folder, etc.

The thought is to use hard link to replace the direct copy. The three commits do the work of:

a) package.bbclass: hard link "image-->sysroot-destdir"
b) sstate.bbclass:  hard link "package-->packages-split"
c) staging.bbclass: hard link "sysroot-destdir-->sysroots".

After testing with minimal/sato/sdk build, this approach could save about 20% disk space.
(minimal: 23G -> 19G, sato: 44G -> 35G, sdk: 54G -> 44G).

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: dxu4/perf
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/perf

Thanks,
Dongxiao Xu <[email protected]>
---

Dongxiao Xu (3):
package.bbclass: Use hard link for package split instead of copy sstate.bbclass: Use hard link when staging files into sysroots staging.bbclass: use hardlink when staging files to sysroot-destdir

 meta/classes/package.bbclass |    8 +++++---
 meta/classes/sstate.bbclass  |    2 +-
 meta/classes/staging.bbclass |   27 ++++++++++++++++++++++++++-
 meta/lib/oe/path.py          |   28 ++++++++++++++++++++++++++++
 4 files changed, 60 insertions(+), 5 deletions(-)