Some investigation on disk space occupation for Yocto Linux
Xu, Dongxiao <dongxiao.xu@...>
I just had a quick investigation on disk space occupation for Yocto linux.
Here are some findings and thoughts.
I built poky-image-minimal based on poky green release and yocto-0.9 release,
within the build directory, I dumped the tmp dir size:
Tmp dir size:
The "work" dir occupies most of the space (~90%) in both releases.
Here are the details with "work" dir.
For the directory of "i586-poky-linux", Green has 34 sub directories, while Yocto-0.9
has 64 sub directories, which doubles Green's number. However the size is triple.
This should be a problem.
For a certain package directory, for example, ncurses-5.4-r14.
We saw in Yocto-0.9, size is 50% larger than Green release.
Some directories within package are new in Yocto-0.9, like pseudo, sstate-build-*.
I just took a glance at sstate.bbclass, the current logic seems that it will first
copy directories (like deploy-rpms, deploy-ipks, package, package-split, sysroot, etc)
into sstate-build-*, and then archive it into sstate-cache directory.
So the first step of optimization from my thoughts are:
1) Can we remove the sstate-build-* directories after archive is done?
2) Or is it possible to omit the copy process and archive directly from directories
(deploy-rpms, deploy-ipks, package, package-split, sysroot, etc) to sstate-cache?