Skip to contentSkip to conversation

How to manage disk space while working with Yocto?

DISCUSSION Sourabh Hegde 4 participants 9 messages Mar 16, 2022

lore
Share & tools
lore
#0 lore raw

Hello All,

I am using Yocto for one of my project. I know that Yocto needs a good amount of disk space for build activities. And also I am working as non-root user in Ubuntu 20.04. But I often run into space issues during build.

WARNING: The free space of [...]/tmp-glibc (overlay) is running low (0.555GB left)
ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!
WARNING: The free space of [...]/downloads (overlay) is running low (0.555GB left)
ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!
WARNING: The free space of [...]/sstate-cache (overlay) is running low (0.555GB left)
ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!

I have tried deleting $TMPDIR (build/tmp) , $SSTATE_DIR (build/sstate-cache) , $DL_DIR (build/downloads). But these things didn't help me.

Is there any way to allocate more space to user in Ubuntu? And also what is the best practice for space usage while working with Yocto?

Can anyone please let me know how to resolve this issue?

Your help will be much appreciated.

Thanks in advance.

P.S: I working with Yocto "Honister" release. Please let me know if any info is missing here.

#1 lore raw

Hi,

Quoted 11 lines · Sourabh Hegde

Hello All,

I am using Yocto for one of my project. I know that Yocto needs a good amount of disk space for build activities. And also I am working as non-root user in Ubuntu 20.04. But I often run into space issues during build.

WARNING: The free space of [...]/tmp-glibc (overlay) is running low (0.555GB left)
ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!
WARNING: The free space of [...]/downloads (overlay) is running low (0.555GB left)
ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!
WARNING: The free space of [...]/sstate-cache (overlay) is running low (0.555GB left)
ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!

Quoted 7 lines

I have tried deleting $TMPDIR (build/tmp) , $SSTATE_DIR (build/sstate-cache) , $DL_DIR (build/downloads). But these things didn't help me.

Is there any way to allocate more space to user in Ubuntu? And also what is the best practice for space usage while working with Yocto?

Can anyone please let me know how to resolve this issue?

Your help will be much appreciated.

This is a common problem. I run to this almost weekly basis doing a lot yocto compiles on my developer machine.

Solution for me is to manually check before compiling that I still have 100's gigabytes of diskspace free. If not, I will delete first build/tmp directories. If that doesn't give me enough free space, I sometimes need to delete the whole build directory which includes the sstate cache directories. In worst case I need to delete also the download cache directories which in my case lives outside of build directories.

On CI build servers I start every build by cleaning the build directory but I do preserve the sstate cache, cache directory (prserv database from previous release), and download cache. Size of the caches on each CI server is monitored separately.

Hope this helps,

-Mikko

#2 lore raw
In reply to Sourabh Hegde

Am Mi, 16. Mär 2022, um 08:54, schrieb Sourabh Hegde:

Quoted 1 line

I have tried deleting $TMPDIR (build/tmp), $SSTATE_DIR (build/sstate-cache), $DL_DIR (build/downloads). But these things didn't help me.

These directories are crucial for a yocto build and they will get recreated if not existing. Deleting them does nothing besides prolonging the build process.

You could try putting INHERIT += "rm_work" in the build/conf/local.conf. It will delete the work directories at build completition. I just don't know if they get deleted when building of the individual package is finished (which would be good for you), or after completition of the complete build. (That would be too late for you, as you already ran out of disk space then.)

Regards, Manuel

#3 lore raw
Quoted 4 lines · Manuel Wagesreither

I have tried deleting $TMPDIR (build/tmp), $SSTATE_DIR (build/sstate-cache), $DL_DIR (build/downloads). But these things didn't help me.

These directories are crucial for a yocto build and they will get recreated if not existing. Deleting them does nothing besides prolonging the build process.

Only the last two. Deleting tmp/ does help as then any needed binary items will be taken from sstate cache instead of being unpacked from source and rebuilt.

Alex

#4 lore raw

Hello,

Thanks for the update.

Even after deleting build/tmp and build/sstate-cache and setting INHERIT += "rm_work" in the build/conf/local.conf. But still I am facing same issue.

Is there any way to allocate more space to user in ubuntu?

I don't have any CI build servers.

#5 lore raw
Quoted 6 lines · Sourabh Hegde

Even after deleting build/tmp and build/sstate-cache and setting INHERIT += "rm_work" in the build/conf/local.conf. But still I am facing same issue.

Is there any way to allocate more space to user in ubuntu?

I don't have any CI build servers.

Can you show the output of 'df' please?

Alex

#7 lore raw

Are you running in a virtual machine of some kind? It's better to get a real linux computer. Otherwise you need to check how to allocate more disk space to the virtual machine from the host.

Alex

Quoted 16 lines · Sourabh Hegde

Hi Alex,

Below is the output of "df":

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#56464):
https://lists.yoctoproject.org/g/yocto/message/56464
Mute This Topic: https://lists.yoctoproject.org/mt/89817082/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#8 lore raw
Quoted 3 lines

Are you running in a virtual machine of some kind? It's better to get a real linux computer.

Yes, I am building Yocto inside docker containers. But previously, I did not face this issue with docker container.