Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use persistent storage for containerbase binaries #3883

Open
Gabriel-Ladzaretti opened this issue Jan 1, 2025 · 2 comments
Open

Use persistent storage for containerbase binaries #3883

Gabriel-Ladzaretti opened this issue Jan 1, 2025 · 2 comments
Labels
breaking Breaking change, requires major version bump priority-3-normal Default priority, "should be done" but isn't prioritised ahead of others status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality)

Comments

@Gabriel-Ladzaretti
Copy link

Gabriel-Ladzaretti commented Jan 1, 2025

Currently the containerbase tmp dir is /tmp/containerbase.

export CONTAINERBASE_TMP_DIR=/tmp/containerbase

This affects execution duration for micro vms that use a rootfs based on containerbase and run Renovate, as this directory is deleted at boot time.
As per the Linux Foundation: Filesystem Hierarchy Standard:

Although data stored in /tmp may be deleted in a site-specific manner, it is recommended that files and directories located in /tmp be deleted whenever the system is booted.1

A suggested alternative location could be /var/tmp as it is preserved between boots.

The /var/tmp directory is made available for programs that require temporary files or directories that are preserved between system reboots. Therefore, data stored in /var/tmp is more persistent than data in /tmp.2

This change alone will improve boot timesruntime duration by half a second per Renovate job. given the daily throughput, this improvement adds up significantly.

Footnotes

  1. https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s18.html

  2. https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s15.html

@nabeelsaabna
Copy link
Contributor

Since this is a side effect of read-only filesystem changes and the fact we run in microVMs I suggest a simple solution in which we populate both /tmp and /var/tmp with same tools content and we can set CONTAINERBASE_TMP_DIR=/var/tmp/containerbase in the hosted-app

@viceice viceice added the breaking Breaking change, requires major version bump label Jan 1, 2025
@viceice
Copy link
Member

viceice commented Jan 1, 2025

we can't simply populate both paths.
some files and folders are symlinked to that tmp path from home.

@viceice viceice added type:feature Feature (new functionality) priority-3-normal Default priority, "should be done" but isn't prioritised ahead of others status:requirements Full requirements are not yet known, so implementation should not be started labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking change, requires major version bump priority-3-normal Default priority, "should be done" but isn't prioritised ahead of others status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality)
Projects
None yet
Development

No branches or pull requests

3 participants