unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Edouard Klein <edou@rdklein.fr>
To: guix-devel <guix-devel@gnu.org>
Subject: guix --container is RAM hungry
Date: Thu, 21 Mar 2024 22:44:41 +0100	[thread overview]
Message-ID: <87v85fp8bj.fsf@rdklein.fr> (raw)

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.


             reply	other threads:[~2024-03-21 21:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21 21:44 Edouard Klein [this message]
2024-03-25  9:27 ` guix --container is RAM hungry 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

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=87v85fp8bj.fsf@rdklein.fr \
    --to=edou@rdklein.fr \
    --cc=guix-devel@gnu.org \
    /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).