From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id mEI4LrlDAWZCLQEAe85BDQ:P1 (envelope-from ) for ; Mon, 25 Mar 2024 10:28:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id mEI4LrlDAWZCLQEAe85BDQ (envelope-from ) for ; Mon, 25 Mar 2024 10:28:25 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b=NmbAiyWE; dmarc=pass (policy=none) header.from=riseup.net; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711358905; a=rsa-sha256; cv=none; b=gdTAJHcll3PeEYXPaTayWvKaFLvlJV7h53ksAY5UiVSrgsAWQlitEvr6qRuoICmNekb05d Q+WlDmWClulTYsieJ4ukKuq03qRkAmRdcO68NrFM7AKrFUrEaIszzLkZo0DYwtH4YqKZug SrWqKaS9+3JW5vpNERqZAknA99w2IvbiixBbZKC8yaAcsBC6B55LnYNrDWlWOev0YCX3/J ukQplQmvZUtxRVm9JGB4t7GYxqLqVaWuu3JRWh7jjIE2ZwRsIarqfKWmGgBAJFe30xFN9V mahL7m1gVZhoK1RlWL0v4o6TJr3XS6suh1r3BJgTgxO+LThLai2SQ3893k20Sw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b=NmbAiyWE; dmarc=pass (policy=none) header.from=riseup.net; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711358905; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ZkdnVWTUjyqZheXCAjiKSJDM4mB/B+uLqLjkKgdXVuY=; b=NldqhFtDvAsC9jlQwD4XqcYQ9+s6NOv37pgJ56y0vWMgY6LUJVD7xLN4hk/e59uga53f2g xfxldJkJ955+ki7EePMJyGaFUdiykTKscsPjQhMdysdCqRN8wjsF9lgwGAqDKiUTHt211j jB3yFgmePMLH5izxzgIZ8fkjMeEQRoi4BJ8U3a6jvZPHjJoOo1tG0nudddybMjJ8tjAe+k IL3VG+T+2e6AcVcylDn3hfm6Ez7MdNswbxDHZTPdqD2MI9aA6RRALq6+cgR24lGUXU1hN2 hZFZqIX3MnV+RSo4u6FkMUr8shV3VFnCFtikVyOsIfQDM33rRF602gWIR3Vs7g== 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 7ADAC1ED18 for ; Mon, 25 Mar 2024 10:28:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rogcf-00050F-0B; Mon, 25 Mar 2024 05:28:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rogcd-0004zv-5B for guix-devel@gnu.org; Mon, 25 Mar 2024 05:28:03 -0400 Received: from mx0.riseup.net ([198.252.153.6]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rogcb-0004oU-79 for guix-devel@gnu.org; Mon, 25 Mar 2024 05:28:02 -0400 Received: from fews01-sea.riseup.net (fews01-sea-pn.riseup.net [10.0.1.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx0.riseup.net (Postfix) with ESMTPS id 4V36zg14V5z9vWC; Mon, 25 Mar 2024 09:27:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1711358879; bh=qzHg0vZDBwH4VdSdbSPFhlo0P0ayoFazNOe7EbI78Yo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NmbAiyWEOaJfZb0v+wGjpqn8BqQoY2IKSDltc9zie+5TODJCOSqpU+kqHG2Qk2qhE PUNQHeOzkZFE1nk+rDXqwpORUQzfKtzhkHnIE6NS7ZxrSIQu8CfSTVFLAtH2ePAxGL RfcyjDsYwylvX2KKwV4sGmzAOSqGDlIfUV3crxpU= X-Riseup-User-ID: 065376E4B60904E329A6311DABAC743B81ACD871E1848D4C517CE9022D3E8D81 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4V36zf6t1gzJtdh; Mon, 25 Mar 2024 09:27:58 +0000 (UTC) MIME-Version: 1.0 Date: Mon, 25 Mar 2024 09:27:58 +0000 From: raingloom@riseup.net To: Edouard Klein Cc: guix-devel Subject: Re: guix --container is RAM hungry In-Reply-To: <87v85fp8bj.fsf@rdklein.fr> References: <87v85fp8bj.fsf@rdklein.fr> Message-ID: <9f5fb6729e8a3ab6756e923ce1c6e194@riseup.net> Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=198.252.153.6; envelope-from=raingloom@riseup.net; helo=mx0.riseup.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -8.20 X-Migadu-Queue-Id: 7ADAC1ED18 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -8.20 X-TUID: rZX7IOPZP+E0 On 2024-03-21 22:44, Edouard Klein wrote: > Dear Guixers, > > I'm a huge fan of guix --container, and I created a system to use those > by default for network services. But the VPS these services run on has > only 2GB of RAM, and I just realized that a container, by default, > requires at least 200MB. > > Try it: > guix shell time which -- bash -c "$(which time) -v guix shell > --container" > > Then Ctrl-D, and look for this line: > Maximum resident set size (kbytes): 291300 > > 291MB of RAM to run bash. > > > By contrast, removing the --container option from above yields: > Maximum resident set size (kbytes): 64496 > > 64MB, still a lot, but I can live with that. > > I tried various calls to unshare, but got no significant increase of > RAM. > > From an outsider's point of view, the --container option is a wrapper > for unshare, and the dependency resolution is done by guix shell with > or without the --container option, so I don't understand where the RAM > explosion come from. > I mean no implication that '--container' is simple or trivial to > implement, I just wrestled with namespaces for a few weeks and I know > they're a pain, to stay polite. I'm thankful for the tool and would like > to use it more, but I can't in its current state. > > > Any ideas ? > > Thanks in advance, > > Edouard. My first guess is that the Guile process is hanging around waiting for the process it launched, instead of exec-ing into it directly.