From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id mMF0HU2j0F+XFQAA0tVLHw (envelope-from ) for ; Wed, 09 Dec 2020 10:13:33 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id OEEnGU2j0F8aYAAAbx9fmQ (envelope-from ) for ; Wed, 09 Dec 2020 10:13:33 +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 B349C9400BF for ; Wed, 9 Dec 2020 10:13:32 +0000 (UTC) Received: from localhost ([::1]:47020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmwTS-0000qm-J1 for larch@yhetil.org; Wed, 09 Dec 2020 05:13:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmwQ8-0006Yd-Ps for help-guix@gnu.org; Wed, 09 Dec 2020 05:10:04 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:39838) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kmwQ5-0005zD-VB for help-guix@gnu.org; Wed, 09 Dec 2020 05:10:04 -0500 Received: by mail-wm1-x334.google.com with SMTP id 3so1023409wmg.4 for ; Wed, 09 Dec 2020 02:10:01 -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=mPC1QjDbYP9DnniO28VlEGiNGtENU2vbv6bWkcWGOGs=; b=du0olfTVqL7T0Jd8pstX1v2oKHB4X2vNzeZ6sodw/rtGcc+qUZQpx2pgIURetYMbnL 4+c9VxKTHmL8o6W12hdEbCFDA8Nky1UV+umVhhhqB5CrJbOkdx01qR8B6XHu5REc+8Zi wVUIMHmcUZA1ZLqsnGRqDLcg+X1VSTJoaLNzEwOfSf0o8Xp39QKK830KfjfkyVcNHYzF Br72riG8SDjIpkHLrJ80vQY809rZgx3vURySBzgMWDo45VVEkM7o6E+IOeCxyTCzU0qZ xMkVzTOmr7yQYR94NLJ8dMEXfB2ELoqpYQnC1HVvQw8enm+5Kq7Em/J7EGdjQbFCm4Qw CA1Q== 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=mPC1QjDbYP9DnniO28VlEGiNGtENU2vbv6bWkcWGOGs=; b=MGGf1ABaUnONXFskUo9oZoQJqdxNq+6M8Es9Hrz7heufMrI7R2X0OhBLPHhBXHWLZ4 2l+9urfxocwmfqjbZvcOkRcS7V3P25zAnsvki7Jd4zi3ZJivq8So7x2wtBSL5VBkpxMg 8oaUJ4sBiXtM+zF05cg3VM1InDlWQj54Sh+UKUKrwTMPmyGJwQ+BcvE7t7bR4TsdEdyz gaK+uTTtFPgOTugVUjrpY9QFoACpN+zGhMiQxR8jIAgWrkAnMG5oOUOHCJt0lZ2dEG9v mbvD+Slr06XPCn+Xg1lEEWs7IgAZ4zl/KAiPrMczQDLjN/eAKQL6PFLEsTGE5DkyEtPw B+IQ== X-Gm-Message-State: AOAM530hoXCJ23kp/AxwubsBuU1gkZOQhdG6SPv1h2nK2Edc69E8E5zU MhVtbYwrzlxjF/tp3sUM2TijojnGkgs= X-Google-Smtp-Source: ABdhPJwsKqh1DCNZR/kQ08ebtttmYsG3fuAGxK6N1fF8l/z/AuhrjD0SviAMESgJu26OHAkRTcS61A== X-Received: by 2002:a1c:96cb:: with SMTP id y194mr1897727wmd.62.1607508599360; Wed, 09 Dec 2020 02:09:59 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id r2sm2326660wrn.83.2020.12.09.02.09.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Dec 2020 02:09:58 -0800 (PST) From: zimoun To: Pierre Neidhardt , help-guix@gnu.org Subject: Re: Fast `guix environment --container' switch In-Reply-To: <87o8j35ncu.fsf@ambrevar.xyz> References: <87o8j35ncu.fsf@ambrevar.xyz> Date: Wed, 09 Dec 2020 11:07:54 +0100 Message-ID: <86r1nzi96t.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x334.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, SPF_PASS=-0.001 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: -2.00 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=du0olfTV; 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: B349C9400BF X-Spam-Score: -2.00 X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: QlGfSxcgKFSA Hi Pierre, On Wed, 09 Dec 2020 at 10:40, Pierre Neidhardt wrote: > `guix environment --container ... -- my-foo-program` is great but a bit > slow to start. > > Is there a way to speed this up? I get, cold cache: --8<---------------cut here---------------start------------->8--- $ sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches' $ time guix environment --container --ad-hoc hello -- hello Hello, world! real 0m2.815s user 0m1.852s sys 0m0.238s $ sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches' $ time guix environment --pure --ad-hoc hello -- hello Hello, world! real 0m2.656s user 0m1.733s sys 0m0.240s --8<---------------cut here---------------end--------------->8--- and warm cache: --8<---------------cut here---------------start------------->8--- $ time guix environment --container --ad-hoc hello -- hello Hello, world! real 0m1.399s user 0m1.544s sys 0m0.104s $ time guix environment --pure --ad-hoc hello -- hello Hello, world! real 0m1.250s user 0m1.492s sys 0m0.094s --8<---------------cut here---------------end--------------->8--- Do you have examples where the difference is significant? All the best, simon