From: "Ludovic Courtès" <ludo@gnu.org>
To: Edouard Klein <edou@rdklein.fr>
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>,
guix-devel <guix-devel@gnu.org>, Csepp <raingloom@riseup.net>
Subject: Re: guix --container is RAM hungry
Date: Wed, 10 Apr 2024 16:02:51 +0200 [thread overview]
Message-ID: <87r0fdl3hw.fsf@gnu.org> (raw)
In-Reply-To: <87zfubv6xr.fsf@rdklein.fr> (Edouard Klein's message of "Tue, 02 Apr 2024 22:33:18 +0200")
Hi,
Edouard Klein <edou@rdklein.fr> skribis:
> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>
>> Hi Ludovic,
>>
>> Ludovic Courtès <ludo@gnu.org> writes:
>>
>>> Hi Edouard,
>>>
>>> Edouard Klein <edou@rdklein.fr> skribis:
>>>
>>>> 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.
>>>
>>> Ouch, confirmed:
>>>
>>> $ \time -v guix shell -C coreutils -- uname 2>&1 |grep 'Maximum resident'
>>> Maximum resident set size (kbytes): 283048
>>> $ \time -v guix shell coreutils -- uname 2>&1 |grep 'Maximum resident'
>>> Maximum resident set size (kbytes): 56588
>>> $ guix describe
>>> Generation 297 Mar 24 2024 23:12:25 (current)
>>> guix 28bc0e8
>>> repository URL: https://git.savannah.gnu.org/git/guix.git
>>> branch: master
>>> commit: 28bc0e870b4d48b8e3e773382bb0e999df2e3611
>>>
>>>
>>> As raingloom and Ricardo wrote, there’s a Guile process that keeps
>>> waiting.
>>
>> Is there a technical reason for this? Couldn't we replace the
>> current Guix process with 'exec', as hinted by Edouard?
>>
>
> Raingloom did, I just reported the problem without investigating the
> cause.
Did what?
I don’t think execing is possible in this case, unless we let the user’s
process run as PID 1 inside its namespace (which isn’t recommended).
See #:child-is-pid1? in ‘call-with-container’.
I submitted a patch set to help a bit with that and related issues:
https://issues.guix.gnu.org/70132
(I shouldn’t have said in the cover letter that it’s a boring patch
series: I got zero comments. :-))
Thanks,
Ludo’.
prev parent reply other threads:[~2024-04-10 14:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 21:44 guix --container is RAM hungry Edouard Klein
2024-03-25 9:27 ` raingloom
2024-03-26 20:37 ` Ricardo Wurmus
2024-03-28 23:30 ` Ludovic Courtès
2024-03-30 2:33 ` Maxim Cournoyer
2024-04-02 20:33 ` Edouard Klein
2024-04-10 14:02 ` Ludovic Courtès [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0fdl3hw.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=edou@rdklein.fr \
--cc=guix-devel@gnu.org \
--cc=maxim.cournoyer@gmail.com \
--cc=raingloom@riseup.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).