[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fast `guix environment --container' switch
From: |
Pierre Neidhardt |
Subject: |
Re: Fast `guix environment --container' switch |
Date: |
Wed, 09 Dec 2020 11:55:45 +0100 |
`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/
signature.asc
Description: PGP signature
Re: Fast `guix environment --container' switch, Ludovic Courtès, 2020/12/17