From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxp6g-0007Cu-1A for guix-patches@gnu.org; Fri, 29 Sep 2017 02:49:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxp6c-0004eF-It for guix-patches@gnu.org; Fri, 29 Sep 2017 02:49:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:56996) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dxp6c-0004e8-F9 for guix-patches@gnu.org; Fri, 29 Sep 2017 02:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dxp6c-0004OG-8b for guix-patches@gnu.org; Fri, 29 Sep 2017 02:49:02 -0400 Subject: [bug#28635] [bug#28198] [PATCH 1/4] vm: Add disk-image-size to . Resent-Message-ID: Date: Fri, 29 Sep 2017 07:48:21 +0100 From: Christopher Baines Message-ID: <20170929074821.06100e60@cbaines.net> In-Reply-To: <87y3p22ap7.fsf@gnu.org> References: <20170823101831.72c11e2f@cbaines.net> <20170823092516.6846-1-mail@cbaines.net> <87y3pzudh7.fsf@gnu.org> <20170925213648.25ef5dd1@cbaines.net> <87y3p22ap7.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/ctP2jS/=o3ddyUwsV=sjojU"; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 28198@debbugs.gnu.org, 28635@debbugs.gnu.org --Sig_/ctP2jS/=o3ddyUwsV=sjojU Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, 26 Sep 2017 09:14:28 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > Hi Chris! >=20 > Christopher Baines skribis: >=20 > > On Thu, 31 Aug 2017 14:29:56 +0200 > > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > > =20 > >> Hi Chris, =20 > > > > Thanks for reviewing these patches Ludo, unfortunately its taken me > > nearly a month to get around to replying. > > > > Thankfully, I've made some progress in that time. > > =20 > >> Christopher Baines skribis: > >> =20 > >> > * gnu/system/vm.scm (): Add > >> > disk-image-size. > >> > (port-forwardings->qemu-options): Use disk-image-size from > >> > . =20 > >>=20 > >> In which case is it useful? Perhaps if you want to create lots of > >> data on the root file system in the MongoDB test? > >>=20 > >> Currently builds a shared-store VM (like =E2=80=98gu= ix > >> system vm=E2=80=99) in which the root file system has a fixed size tha= t=E2=80=99s > >> usually good enough. =20 > > > > The best answer I have at the moment is that I think MongoDB > > creates a rather large file, even if it has no data to store in it. > > I'll do some more investigation to confirm this though. =20 >=20 > OK, that=E2=80=99s a good reason anyway. :-) >=20 > >> > --- a/gnu/system/vm.scm > >> > +++ b/gnu/system/vm.scm > >> > @@ -653,6 +653,8 @@ it is mostly useful when FULL-BOOT? is > >> > true." (default #f)) > >> > (memory-size virtual-machine-memory-size ;integer (MiB) > >> > (default 256)) > >> > + (disk-image-size virtual-machine-disk-image-size ;integer > >> > (bytes) > >> > + (default (* 70 (expt 2 20)))) =20 > >>=20 > >> I think we can use 'guess here as the default value (and we should > >> do the same in places where #:disk-image-size has an arbitrary > >> default.) =20 > > > > I've been looking at this in the last few days. Making 'guess the > > default value here does mean something, and I think it's a good > > idea. > > > > As far as I can tell, for this specific test, these are the 3 > > functions that are called on the way to using the actual size, and > > the defaults they have: > > > > system-qemu-image/shared-store-script default: > > (* (if full-boot? 500 70) > > (expt 2 20))) > > > > system-qemu-image/shared-store default:=20 > > (* (if full-boot? 500 30)=20 > > (expt 2 20))) > > > > qemu-image default: > > 'guess > > > > From my tests, if the default in the is set to > > 'guess, then for the mongodb test the guess seems to be 0 MiB at the > > moment, which doesn't work. I've started looking at setting a > > sensible default in qemu-image, so that the root filesystem size > > isn't 0 MiB. =20 >=20 > Indeed. Maybe we can go with your patch as-is and investigate the > problem with 'guess separately. Thoughts? That's fine with me. I've also now created a separate bug with this patch, and another to add a default value [1]. I tested it with the memcached system test, and the disk image size was the same plus the test still passed. I haven't checked the other tests yet. 1: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D28635 --Sig_/ctP2jS/=o3ddyUwsV=sjojU Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlnN7LVfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xd47g//RZ3W1CeY1S72/5ZVwSi1panfjnE8f3ZxPfnWWi5Xsu9BA8NW2fWvsoxG A7bpzIyK09aqOhinKgAZDsS7TdNXGQOvyfs7zmF00OKppAh+ntixyqdaa8uMitS0 aV2JSFAbg6/b+wTqMPrfH+RWPsuW4e+ADx+VGSRCCbeUyBLluN+gL+D/rI3cAUSr yfwypHDS1YF0wmX48Kcmk2SpV2JB6CLyTlLrm/hrwMlXdKPDAhTqce89zmBlF1uI RWegm5s7n9Ii+sp++BDUhUShetadoK89oSYmt1l+08FkXdAU8kMntqJwDTzLJznS +X/Q+16bm1fInt88BpxonzBI1nrdl90UUsLRWDfo/N+AMNWfTkR/P3X5R2Q1NYPG Vi9/loTvymuck+HnhyfDLoLu1f4NPVzW8iuVNNjQBgrFkQDhOaQhm2wNjJDJ+ZY+ doGekWiQu+FUF63vLohboWVSriVJsIoyUhYFoK2US7W3BemvExfZHSiSv7lpVPu7 M5tHKTA8JNqC+ISgFT4ue6HySKSW7MmrR7HuTwYiK7xx0c+RcsZUwUauqYoWZBl2 u0sJ+TyYF6RuqlMaVzPKd8CesvnTa7vW1J+MUY37syAnbHfodEf/6xQsfPYAfdHb RnyJKbbet+l5VdC84KHLufkwTwn5z6Es3R4h8RzT02ImbQy2DRM= =+o3L -----END PGP SIGNATURE----- --Sig_/ctP2jS/=o3ddyUwsV=sjojU--