From: Pierre Neidhardt <mail@ambrevar.xyz>
To: zimoun <zimon.toutoune@gmail.com>, help-guix@gnu.org
Subject: Re: Fast `guix environment --container' switch
Date: Wed, 09 Dec 2020 11:55:45 +0100 [thread overview]
Message-ID: <87lfe72qq6.fsf@ambrevar.xyz> (raw)
In-Reply-To: <86o8j3i7t5.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]
`guix environment` incurs an overhead:
--8<---------------cut here---------------start------------->8---
time /gnu/store/a462kby1q51ndvxdv3b6p0rsixxrgx1h-hello-2.10/bin/hello
Hello, world!
real 0m0.002s
user 0m0.002s
sys 0m0.000s
--8<---------------cut here---------------end--------------->8---
--8<---------------cut here---------------start------------->8---
$ time guix environment --ad-hoc hello -- hello
Hello, world!
real 0m0.921s
user 0m1.003s
sys 0m0.091s
--8<---------------cut here---------------end--------------->8---
It's possible to bypass this overhead by using --root:
--8<---------------cut here---------------start------------->8---
$ guix environment --ad-hoc hello --root=foo
[env]$ exit
$ source foo/etc/profile && time hello
Hello, world!
real 0m0.003s
user 0m0.003s
sys 0m0.000s
--8<---------------cut here---------------end--------------->8---
The above `source' is of course not containerized.
So is it possible to use a similar trick to run something containerized
"instantly", i.e. with less than, say, 100ms overhead?
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]
next prev parent reply other threads:[~2020-12-09 10:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-09 9:40 Fast `guix environment --container' switch Pierre Neidhardt
2020-12-09 10:07 ` zimoun
2020-12-09 10:13 ` Pierre Neidhardt
2020-12-09 10:37 ` zimoun
2020-12-09 10:55 ` Pierre Neidhardt [this message]
2020-12-09 11:47 ` zimoun
2020-12-09 12:02 ` Pierre Neidhardt
2020-12-17 21:52 ` Ludovic Courtès
2020-12-29 21:47 ` Pierre Neidhardt
2021-01-05 22:50 ` Christopher Lemmer Webber
2021-01-26 10:31 ` Pierre Neidhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lfe72qq6.fsf@ambrevar.xyz \
--to=mail@ambrevar.xyz \
--cc=help-guix@gnu.org \
--cc=zimon.toutoune@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).