From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id ME6kBc+60F8YXQAA0tVLHw (envelope-from ) for ; Wed, 09 Dec 2020 11:53:51 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id UBZ/Ac+60F9MYQAA1q6Kng (envelope-from ) for ; Wed, 09 Dec 2020 11:53:51 +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 8525094038E for ; Wed, 9 Dec 2020 11:53:50 +0000 (UTC) Received: from localhost ([::1]:34414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmy2V-0006hK-Lb for larch@yhetil.org; Wed, 09 Dec 2020 06:53:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmxxz-0002vQ-Cu for help-guix@gnu.org; Wed, 09 Dec 2020 06:49:07 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:37149) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kmxxt-0007CT-26 for help-guix@gnu.org; Wed, 09 Dec 2020 06:49:07 -0500 Received: by mail-wm1-x32f.google.com with SMTP id q75so1348286wme.2 for ; Wed, 09 Dec 2020 03:49:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=52QWJSs4uplHvvTgO+niew87LtwLCjGTij+lzs+2wCA=; b=F2OYAUSRzemI0RR/fNHA70x9c/0w5ilaVjjHE6m24DkzjkXnClkEyw0RrgXmUafyJD L+RJt/vGfVQvyXhHcgQr6Vpw7lnH2ch53BlWrZZiUTTOfVWMB8P/UPCmreX18aWNT0CT T/odCCyE7FaXh3OiYQ7djz4Br/9xi+ANzWxzulIL9rlXzXyPckTGLx5iRfzaqykHmrud +0ULqa4bJXnCGOzyZifV4jPPjw2lvgDnmFPuc//MceHCwxKGWfys+AbMmqWUVnqOqqkB Olm4kDhIvFTZQhLEUFxAdxAO+s5WpdQXNWoj57rGUv1aeJBYtv0eufXzfZSYZMF4sSN4 ffCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=52QWJSs4uplHvvTgO+niew87LtwLCjGTij+lzs+2wCA=; b=U4g6+E4jwjRLHz2KPDz0vnnJldgJ2L+i+t9yN+GHw4a5bn9gqX4yeh+bEZY21zH7Jf TpegrN2idjq9rMdyUp92fPbB5XX9V7KbHA8Yy/9gzG/0pGF5vJoLY4A3P8h5yJoXj7+6 gxfYFyi6nzvYdksAIdvlv4GGSwyS922WwVfPjkynzPpMtNl5LehEPus6nK0Ew5blgHnU 8Kft6xw8BSLQNVUB6uFMQORdzSBL71V7vgwmBhH5Kws946JMT5Epw8UDFoHPb6GW+xJ9 sjvGXO2dNMoPMeT2MFiPR9YHKaxz4RckeUJcPogC9Jpcr7/nhJAadrarNM51X5QTa8H3 hhpw== X-Gm-Message-State: AOAM533TU/TwSnNlxIgLed8KhlZ1wsDMHqZRlargrOQdny6YUMcuc5Rc +nGLGkk9Bvs/k0NOipuJ+/kFV0DiBFU= X-Google-Smtp-Source: ABdhPJy2Y5O7uCNCwApuTppCvcArZdxy9AuxNVuQGg7rNhlTBuhxcR4nRysRA0gDuIbrKxHxRkf3Fg== X-Received: by 2002:a7b:c3c8:: with SMTP id t8mr2342290wmj.88.1607514538987; Wed, 09 Dec 2020 03:48:58 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id m4sm2793856wmi.41.2020.12.09.03.48.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Dec 2020 03:48:58 -0800 (PST) From: zimoun To: Pierre Neidhardt , help-guix@gnu.org Subject: Re: Fast `guix environment --container' switch In-Reply-To: <87lfe72qq6.fsf@ambrevar.xyz> References: <87o8j35ncu.fsf@ambrevar.xyz> <86r1nzi96t.fsf@gmail.com> <871rfz478c.fsf@ambrevar.xyz> <86o8j3i7t5.fsf@gmail.com> <87lfe72qq6.fsf@ambrevar.xyz> Date: Wed, 09 Dec 2020 12:47:29 +0100 Message-ID: <86czzji4ku.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=ham 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: -1.51 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=F2OYAUSR; dmarc=pass (policy=none) header.from=gmail.com; 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: 8525094038E X-Spam-Score: -1.51 X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: xCHmmisn98a3 On Wed, 09 Dec 2020 at 11:55, Pierre Neidhardt wrote: > `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: It by-passes the computations of derivations and profiles. Somehow, using --root is using a precomputed profile. IIUC. > So is it possible to use a similar trick to run something containerized > "instantly", i.e. with less than, say, 100ms overhead? I see, you would like to be able to run a profile in container, right? Somehow, it is similar to the wanted [1], IIUC. 1: Cheers, simon