Hi, Richard,

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:
Green: 7.4G
Yocto-0.9: 27G


The "work" dir occupies most of the space (~90%) in both releases.
Here are the details with "work" dir.

Green:
1.5M    all-poky-linux
5.2G    i586-poky-linux
675M    i686-linux
1.1G    qemux86-poky-linux

Yocto-0.9:
1.8M    all-poky-linux
16G     i586-poky-linux
4.8G    qemux86-poky-linux
3.5G    x86_64-linux

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.

Green:
Total: 112M
12M     image
36M     ncurses-5.4
16M     package
16M     packages-split
18M     staging-pkg
15M     sysroot-destdir
1.1M    temp

Yocto-0.9:
Total: 167M
13M     image
36M     ncurses-5.4
17M     package
17M     packages-split
16M     sysroot-destdir
1.4M    temp
2.5M    deploy-ipks
2.6M    deploy-rpms
4.0K    ncurses.requires
116K    ncurses.spec
40K     pkgdata
12M     pseudo
12K     shlibs
2.5M    sstate-build-deploy-ipk
2.6M    sstate-build-deploy-rpm
33M     sstate-build-package
16M     sstate-build-populate-sysroot

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?

Thanks,
Dongxiao 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to