From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aA9iOiDlmGA8EgAAgWs5BA (envelope-from ) for ; Mon, 10 May 2021 09:47:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id +M7uNSDlmGDiVgAAB5/wlQ (envelope-from ) for ; Mon, 10 May 2021 07:47:44 +0000 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 4D79DF7A4 for ; Mon, 10 May 2021 09:47:44 +0200 (CEST) Received: from localhost ([::1]:51590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lg0dj-0007KK-1k for larch@yhetil.org; Mon, 10 May 2021 03:47:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lg0d4-0007K4-3D for bug-guix@gnu.org; Mon, 10 May 2021 03:47:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45742) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lg0d3-0002eu-Rs for bug-guix@gnu.org; Mon, 10 May 2021 03:47:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lg0d3-0004VF-Q1 for bug-guix@gnu.org; Mon, 10 May 2021 03:47:01 -0400 Subject: bug#48178: Out of memory error when generating a docker-image. Resent-From: Roel Janssen Original-Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Date: Mon, 10 May 2021 07:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 48178 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Efraim Flashner Mail-Followup-To: 48178@debbugs.gnu.org, roel@gnu.org, roel@gnu.org Received: via spool by 48178-done@debbugs.gnu.org id=D48178.162063279717273 (code D ref 48178); Mon, 10 May 2021 07:47:01 +0000 Received: (at 48178-done) by debbugs.gnu.org; 10 May 2021 07:46:37 +0000 Received: from localhost ([127.0.0.1]:57287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lg0cf-0004UX-4u for submit@debbugs.gnu.org; Mon, 10 May 2021 03:46:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lg0cd-0004UJ-0H for 48178-done@debbugs.gnu.org; Mon, 10 May 2021 03:46:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56512) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lg0cX-0002Jc-7K; Mon, 10 May 2021 03:46:29 -0400 Received: from 2001-1c02-0b18-2900-222e-248e-9586-e52d.cable.dynamic.v6.ziggo.nl ([2001:1c02:b18:2900:222e:248e:9586:e52d]:59956) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lg0cW-0005jz-VS; Mon, 10 May 2021 03:46:29 -0400 Message-ID: <1d6f2f78d43e79457f53d865ae1905385da30006.camel@gnu.org> From: Roel Janssen Date: Mon, 10 May 2021 09:46:25 +0200 In-Reply-To: References: <2f30ed4cd1e7154fc49f800a2d8950df2ac6bc8f.camel@gnu.org> <5578dcab6d15ae85a544b92f03b6a5d89223967c.camel@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.1 (3.40.1-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 48178-done@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620632864; 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:resent-to: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=W1VOsPIkxajqFAyU7akAdgRVLG+/1NOqDsfBWMKLQ84=; b=DQlicn8DgiSWLqAnlWPLmFbS03brZHd0RI/Qie1I5offa8RIRg+w/Dq0f24dxyvIBAcD/N 0HoEFO8G+FQzg/ClKVEP7YgbN9xzvqsYBRWNide0GhLX1leGIclrNEoyqVyALrFpR/L76T T8xeA+85anpfzagMnqi7iHz0t1k1UqJNJ+Ei6Fj4a4R6FErcDB7AEsIdpku0FvLONfCM/Q T9GD0dPDqPz9fEVQ23MBgKfg/ZHyd/lY5Z5fpDZFzbyJ2sOSVhoF1dN13/DREo95n561nx 1X4WJ+ypI9I6lIUGr7HUgFULf7mhWH/BlefIpGVbcnpn/sa+v+mSsrvfDSRIWg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620632864; a=rsa-sha256; cv=none; b=EOdMxW9QFhtQZGcL6MvNWOgc1NbFk5TTPuHv50eWXOrR2rOKg2fJA3WS83C/7586pCJMIA abA0WmlhCCU4Po8IV6tJHZn1hLA7x+BUhjnQXAOCMs1TDGVr8oyr4QCjhKT5YU/IiCelpT gC+LdM33HyR8N2C8GogeOT1PS7Sr4kLZ5SPBzo0IJ1n/En15LjQb9zp8TGzgBx3t7UicZn lQCCQxo1HiaOHXgcg/1NHEosF4EU/wOy248XXtlXtaB1NIznK6CVan12K2GDCgpDFmxkwt Oh2l+1moDXk+phzsAp1Ly+mPKVOaIKOI1ngxnj8Cnod4WkDhGk62b6059IxTFg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.95 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 4D79DF7A4 X-Spam-Score: -2.95 X-Migadu-Scanner: scn0.migadu.com X-TUID: 06iHG/JfeOu2 On Mon, 2021-05-10 at 10:29 +0300, Efraim Flashner wrote: > On Mon, May 03, 2021 at 07:47:49PM +0200, Roel Janssen wrote: > > On Mon, 2021-05-03 at 12:39 -0400, Leo Famulari wrote: > > > On Mon, May 03, 2021 at 12:09:36AM +0200, Roel Janssen wrote: > > > > Looking at 'guix/scripts/system.scm', it seems that we always > > > > pass > > > > 256M > > > > of memory to the VM.  After bumping that to 4096M, I was able > > > > to > > > > produce a docker image. > > > > > > Can you test somes values that are in between? Like, 512M, 1024M, > > > etc, > > > until we know how much is actually required? If 512M is enough, I > > > don't > > > see a problem with increasing the hard-coded value to that. > > > > > > > I monitored the VM's memory usage and it peaked at 1.6G. But after > > testing, it seems 1024 also works. > > > > I tested with 2048 (worked), 1024 (worked), and 512 (didn't work). > > > > > > I'd like to see what we can do here.  Assigning too little > > > > memory > > > > leads > > > > to problems generating the container, but assigning too much > > > > memory > > > > wil > > > > l cause problems for computing machines that don't have much > > > > memory > > > > to > > > > spare. > > > > > > > In that case... The attached patch would only increase the size > > when > > generating a Docker container image.  Would that be acceptable? > > > > > There are some use cases for this code that we'd like to work on > > > low-resource machines (`guix system vm`), and other use cases > > > (like > > > building Docker images) that shouldn't be expected to work on > > > machines > > > with limited RAM. > > > > > > > Would it be a good idea to make it configurable at run-time? > > > > > > Yeah, maybe. > > > > > > > I think it'd be better to have it somehow dynamically increase, but > > I > > don't see how I could determine the VM size needed for a given > > system > > configuration.  So perhaps the attached patch is an acceptable > > compromise. > > > > Kind regards, > > Roel Janssen > > > > Looks good to me! > Thank you for looking at it! I pushed the proposed patch in ce3d05cc08c01351756ab5d5b7f25cfe0295c230. Kind regards, Roel Janssen