guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guix --container is RAM hungry


From: raingloom
Subject: Re: guix --container is RAM hungry
Date: Mon, 25 Mar 2024 09:27:58 +0000

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]