From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id GlxHKWSt0F9dagAA0tVLHw (envelope-from ) for ; Wed, 09 Dec 2020 10:56:36 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id IMCMJGSt0F/1CgAAB5/wlQ (envelope-from ) for ; Wed, 09 Dec 2020 10:56:36 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 192139400BF for ; Wed, 9 Dec 2020 10:56:36 +0000 (UTC) Received: from localhost ([::1]:38912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmx96-0006No-NH for larch@yhetil.org; Wed, 09 Dec 2020 05:56:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmx8Y-0006M0-HM for help-guix@gnu.org; Wed, 09 Dec 2020 05:55:58 -0500 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:43453) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmx8V-0005Bq-1B for help-guix@gnu.org; Wed, 09 Dec 2020 05:55:58 -0500 X-Originating-IP: 90.92.160.122 Received: from mimimi (lfbn-idf2-1-1094-122.w90-92.abo.wanadoo.fr [90.92.160.122]) (Authenticated sender: mail@ambrevar.xyz) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 0E42220005; Wed, 9 Dec 2020 10:55:50 +0000 (UTC) From: Pierre Neidhardt To: zimoun , help-guix@gnu.org Subject: Re: Fast `guix environment --container' switch In-Reply-To: <86o8j3i7t5.fsf@gmail.com> References: <87o8j35ncu.fsf@ambrevar.xyz> <86r1nzi96t.fsf@gmail.com> <871rfz478c.fsf@ambrevar.xyz> <86o8j3i7t5.fsf@gmail.com> Date: Wed, 09 Dec 2020 11:55:45 +0100 Message-ID: <87lfe72qq6.fsf@ambrevar.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=217.70.183.200; envelope-from=mail@ambrevar.xyz; helo=relay7-d.mail.gandi.net X-Spam_score_int: 0 X-Spam_score: -0.1 X-Spam_bar: / X-Spam_report: (-0.1 / 5.0 requ) BAYES_00=-1.9, FROM_SUSPICIOUS_NTLD=0.499, PDS_OTHER_BAD_TLD=1.318, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -0.41 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 192139400BF X-Spam-Score: -0.41 X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: dYCxE9nVCUnd --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable `guix environment` incurs an overhead: =2D-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 =2D-8<---------------cut here---------------end--------------->8--- =2D-8<---------------cut here---------------start------------->8--- $ time guix environment --ad-hoc hello -- hello Hello, world! real 0m0.921s user 0m1.003s sys 0m0.091s =2D-8<---------------cut here---------------end--------------->8--- It's possible to bypass this overhead by using --root: =2D-8<---------------cut here---------------start------------->8--- $ guix environment --ad-hoc hello --root=3Dfoo [env]$ exit $ source foo/etc/profile && time hello Hello, world! real 0m0.003s user 0m0.003s sys 0m0.000s =2D-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? =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFGBAEBCAAwFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl/QrTESHG1haWxAYW1i cmV2YXIueHl6AAoJEJvc9Jeku8x/Gd8H/2xzMC98iYDbOE+eZJUtVg9MWMCeCFMZ g+TLt3IBNv+ZuqB/GaBir6ZNqdFLmIIePmN3rIE0EQCp8ejnqgvxBBM8h50o24ma fJSXM8sZstV0gS8CE95zEdYSx04k8+jGI8GbcMrHYL7QWh3TuyqM5scqEjklT5ai 2DW6X95Oitm/tUpuaUHKr+txbm5PWmoYQvLQofZdXCyP/zAtMr2iExqQJqvS9pr2 mwIRjy+NWznnQSsWyomiW6FAZJJvRVVAbAw6qjJO6CUsRqjKdiUnqDZWE2eLpSHm 2eGeJiNQxpjdfSWtMvB41gQyGJuIgNbfQmWgjtHreDIZ59IGhHT1604= =fXOS -----END PGP SIGNATURE----- --=-=-=--