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

build-fhs-chrootenv: bind mount chroots /tmp to hosts /tmp #4007

Merged
merged 1 commit into from
Sep 9, 2014

Conversation

hrdinka
Copy link
Contributor

@hrdinka hrdinka commented Sep 9, 2014

@svanderburg here is the /tmp related, rebased & checked change to build-fhs-chrootenv as mentioned in #2355

The patch handles how /tmp is handled in build-fhs-chrootenv. Till now it just created a tmp subdirectory within /run. /run lies in memory therefore the chroots /tmp will reside there as well, this triggers two problems 1) the hosts memory is limited and this will also limit the /tmp size of the chroot (this is very bad for example graphical applications) 2) you ram will get polluted leaving you with less bang for your apps.
With the patch applied it will create a directory within the hosts /tmp and will then mount the chroot's /tmp to this newly created directory. So the chroot's /tmp will use the same capabilities and optimizations as the host's does.

@svanderburg
Copy link
Member

Looks ok. I just integrated it!

svanderburg added a commit that referenced this pull request Sep 9, 2014
build-fhs-chrootenv: bind mount chroots /tmp to hosts /tmp
@svanderburg svanderburg merged commit 2c25f38 into NixOS:master Sep 9, 2014
@hrdinka hrdinka deleted the chrootenv-bind-tmp branch September 28, 2014 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants