From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id kClpBV00A2aFHAAAe85BDQ:P1 (envelope-from ) for ; Tue, 26 Mar 2024 21:47:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id kClpBV00A2aFHAAAe85BDQ (envelope-from ) for ; Tue, 26 Mar 2024 21:47:25 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b=hHJstMQi; 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"; dmarc=none; arc=pass ("zohomail.com:s=zohoarc:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711486045; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=3xYfLc0NQTvXLKF6CdPgphacngiTqJrmax2/6ec3scU=; b=qpb+LcOFtHTOgERn6dLCkzS7wjkJ0E1v0JEK+yOuAjdq5MtAdLHp9QynO81zHN+ATy0foA Xjo7aT+6kwxldi5rlUlpoyXOx3Wc1Xn6PGY8pAapwfknS4A9v/O6yv0e5vChXRhWz6jEo6 QLzHAkfL2/mIlE8xf2M14puMLUbPrJEN6Hbrmz5N3Q38bx7+EJzcoEs9WAzfSG+de2eisj iERLnBN83Z4weAJBo/oJIaVpOdj+2dUE1n6t08uuZxiw/RShg0aHALJM4lQYQG/KE5UQOZ mbKMCWDrDtHAPDBR7atnNjmQ3sUR0LEwusNPHtIgsFp0YWE52UbYIXqEhmU1hg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b=hHJstMQi; 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"; dmarc=none; arc=pass ("zohomail.com:s=zohoarc:i=1") ARC-Seal: i=2; s=key1; d=yhetil.org; t=1711486045; a=rsa-sha256; cv=pass; b=VByjtFVjFPm0vRaA+bQM1EhYU2ID+IrYqLnpjgwdBULydYRIPitoRxrFPN659MpjZrxrF9 lSqsS6neZd0pET0lLLgM0/YPJ6IKfM7Gn30DT6VkRJPb6k5aPFG6Zei0DYWNvFSMb7n0aY HJYMEYB/79GsHQA9aclRwH+87lEjjUjfPSOHBMtwFkJOrTWlZcjnbA2/EWFrzZgtWLfdwv dYVXk7svBsZDq7LDZH5h0BwzwTfq/57S3LxsdKvNSpciZTQVRHkZCZWcEeC3Ueaggxm/xn NrD3HI/AmeeqN5/swqatZMtiQSIsqCTRzVItMBqK4HCerSGWsegD7wi0kp6htQ== 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 0235C3C7E6 for ; Tue, 26 Mar 2024 21:47:24 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpDhB-0002RZ-Id; Tue, 26 Mar 2024 16:46:57 -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 1rpDh8-0002Qz-9c for guix-devel@gnu.org; Tue, 26 Mar 2024 16:46:54 -0400 Received: from sender3-of-o57.zoho.com ([136.143.184.57]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpDh5-000894-Uw for guix-devel@gnu.org; Tue, 26 Mar 2024 16:46:54 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1711486007; cv=none; d=zohomail.com; s=zohoarc; b=Vi0SyC180+hO+em07qhqz8b6FQs8Aay2EqOczpgpL7N0YJvrHyHjuRDk4bl4aFFE7U5qkWArwjHn5tbOTRPFp3bze8wO+rN6N4jq/4C+LwG05qIKg/yYlMsn3kOdlydqpOcGNwVQM7jah3mincxkhUTY+kfrxE8Uz0yiruFO0tQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1711486007; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=3xYfLc0NQTvXLKF6CdPgphacngiTqJrmax2/6ec3scU=; b=FxfQoDVz8NJgagtFgPo7CO5N/dZZr/4cRpqGPywd1/k7ui43GiMHlkdgFpcmpv+e+1ooRO9auDL2+Pxicn1gyuoSSrzsWnHOXT7vnf3qIdzsYTL09kIJLTsZxkef6OdQ3WlaLGDs2RJEDi9DvH8IRLGepRQCLrTDntlOkchL+QU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1711486007; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Message-Id:Reply-To; bh=3xYfLc0NQTvXLKF6CdPgphacngiTqJrmax2/6ec3scU=; b=hHJstMQiZKW/aglh6jl3Bvp4lVMnCOnouQ/1I4q/eJRtWfzSYibNBcpQzNmPDPE3 0NWukC294PImv3+yR4iRU6CT/GADV1k2IPkH2zURZ6/SsHsej8+hFXP+sCuym2GuqoJ EZhEf5xsnxaiGryH6I5mrouZi3G01DstMmcufkrI= Received: from localhost (196-110-142-46.pool.kielnet.net [46.142.110.196]) by mx.zohomail.com with SMTPS id 1711486005421277.81809829196845; Tue, 26 Mar 2024 13:46:45 -0700 (PDT) References: <87v85fp8bj.fsf@rdklein.fr> <9f5fb6729e8a3ab6756e923ce1c6e194@riseup.net> User-agent: mu4e 1.10.8; emacs 29.1 From: Ricardo Wurmus To: raingloom@riseup.net Cc: Edouard Klein , guix-devel@gnu.org Subject: Re: guix --container is RAM hungry Date: Tue, 26 Mar 2024 21:37:34 +0100 In-reply-to: <9f5fb6729e8a3ab6756e923ce1c6e194@riseup.net> Message-ID: <874jcsd8lq.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.184.57; envelope-from=rekado@elephly.net; helo=sender3-of-o57.zoho.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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=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-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -7.87 X-Migadu-Queue-Id: 0235C3C7E6 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -7.87 X-TUID: viDKNbpQZrFR raingloom@riseup.net writes: > 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. [...] > My first guess is that the Guile process is hanging around waiting for > the process it launched, instead of exec-ing into it directly. In (@@ (guix scripts environment) launch-environment) we use execlp; launch-environment is used by both launch-environment/fork as well as launch-environment/container. There is, however, an awful lot of forking going on. launch-environment/container uses call-with-container, which ends in using launch-environment. call-with-container forks, and launch-environment also forks. The Guile process that was started when launching Guix probably doesn't get replaced in this case, as raingloom guessed. -- Ricardo