From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2KmBC4Kh92G32AAAgWs5BA (envelope-from ) for ; Mon, 31 Jan 2022 09:44:50 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qNz0CIKh92HGPgEA9RJhRA (envelope-from ) for ; Mon, 31 Jan 2022 09:44:50 +0100 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 6515F39B76 for ; Mon, 31 Jan 2022 09:44:48 +0100 (CET) Received: from localhost ([::1]:59062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nESIo-0004Z1-Em for larch@yhetil.org; Mon, 31 Jan 2022 03:44:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nESCb-0007x0-2U for help-guix@gnu.org; Mon, 31 Jan 2022 03:38:23 -0500 Received: from flashner.co.il ([178.62.234.194]:51248) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nESCV-0008Ev-Dq for help-guix@gnu.org; Mon, 31 Jan 2022 03:38:19 -0500 Received: from localhost (unknown [31.210.177.79]) by flashner.co.il (Postfix) with ESMTPSA id 8305940190; Mon, 31 Jan 2022 08:37:39 +0000 (UTC) Date: Mon, 31 Jan 2022 10:37:07 +0200 From: Efraim Flashner To: Phil Subject: Re: Using --max-jobs Message-ID: Mail-Followup-To: Phil , help-guix@gnu.org References: <8735l8jjxj.fsf@beadling.co.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5Wv+8B3AAopaCscs" Content-Disposition: inline In-Reply-To: <8735l8jjxj.fsf@beadling.co.uk> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643618689; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=sTchPa/HnNdqbEf+Ea19aDPuZT4b0gtWZAFUX4nSsPo=; b=RBV/RYFpquAKGS+gu4neTlsiOLJbYbQmUpyTiWIjNH7mCc/kvwSuYTsDqpNFH2JQMB/sKg b2Bkqoe8Mix0iarYmbpoIYCjkoHFCLeBRs9im7L94HXQ3DybfHSOKVnaw1M4mmZcpwJRgQ 0BBuM0pTD7iLU1ANBKwy7dMaZxrIhv9xQHzb2qxjyWGPPJ758LJgODt2ow+QHcyq8knf9u nBosxN5ubF7hjJn1ytzl2FFvGYAJf+8Su9havwTJ2aGdIgEDuUp61j3vmtk39SXN3WpBsv lap9PF36h/iAZ0ZGq9PmLTmW28Xub49P3ImXvM+Ur4lHSIL5emZ3h1hYfXVl8Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643618689; a=rsa-sha256; cv=none; b=lShbZSY5WtFDSo+TWHT/dq4fZGxs1GKAyjgjKHpOmZMhNjhiFmrHkdpT01IduC/KLOZr2B U9lNIeFZGpxM00QN/z05juM0Q/eeCBIyyVXuuwNSx3S1Py5Z95ziuoXEA64Oa/xlLOQryo DK4ZvO7VGftHPPLRyPuGb+00/jeST56M8Bxq7jZts/6/DqWNr0t+Fnirv6I1kPMBntqUuv DGSY9UQ0Zbr4spDpspkC2oswf9s8/PCM0wfHjR2PqnuiTKD6B28duUcl5yz+JWUD1TYv7A NyuQmZOyGsWpEfAuSdrC8CkSZWU6yuei9zixir1jI2KsxjdC58AQsGba1lmdQQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.73 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6515F39B76 X-Spam-Score: -4.73 X-Migadu-Scanner: scn1.migadu.com X-TUID: ZcmUE7Ks1P/F --5Wv+8B3AAopaCscs Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 28, 2022 at 09:20:24AM +0000, Phil wrote: > Hi all, >=20 > A few questions about running multiple build jobs in parallel: >=20 > According to the manual the number of build users (eg guixbuilder01) > determines how many jobs can be run in parallel. >=20 > If we have 10 guix builder accounts and do not specify --max-jobs > explicitly, does this mean that 10 builds can be done in parallel - i.e > 10 invocations of "guix build" will run in parallel, for example? IIRC the default is only 1 job at a time for each invocation. You can, however, run two different guix commands and each will only use one builder, for a total of 2. > If I set the daemon to --max-jobs=3D4, will that restrict it to 4 builds > in parallel, even if more guix builder accounts exist? If yes, then are > further builds queued until an available account becomes available, or do > they fail? Similar to above. If you have --max-jobs=3D4 and run 'guix build foo' and 'guix upgrade' each guix command will use up to 4 builders. If you try to use more builders than you have on your system then one (or more) of the commands will error with 'not enough builders' as it tries to allocate more builders to hit the 4 allowed. > Are these conditions changed by the introduction of a machines.scm? i.e.= if we > have a build farm containing 4 machines, each with 10 guix builder > accounts, will parallel building still be restricted to the 10 guix > builder accounts on the parent machine (the machine with the machines.scm= )? If you offload to a machine and in your machines.scm you say that it can do 4 parallel builds then the guix daemon on the originating machine will try to pass 4 individual build jobs to that one machine. You can still run guix commands on that offload machine too, and they don't count toward the 4 jobs which were offloaded to it. The originating machine will create its graph of the order of builds and will pass them off one at a time until the max number of offload builds is reached for that machine; 4 in the example you gave before. It doesn't try to offload 4 builds, each of which spawn multiple builds of their own. > I see that settting --max-jobs to 0 and having machines to offload to > results in no builds taking place on the parent. I understand if no > machines are contactable the build will fail? However, what happens if a= ll > machines in the machines.scm are already busy (no slots available)? > Does any further build request fail, or is it queued? If --max-jobs is > set to 0 on the parent, are builds still restricted by the number of > build users on the parent box? This isn't something I have tried before, but I believe you are correct, if it isn't possible to offload the build (and you don't pass --no-offload or the derivation isn't flagged as local-only) then it will fail. If the offload machines are busy then the originating machine will keep the builds queued and will offload them once the build slots open up and the machine load decreases. The --max-jobs on the parent/originator machine determine the number of jobs which can be built per guix invocation. The max-jobs field in machines.scm determine the number of jobs which can be passed off to an offload machine. The --max-jobs flag on the offload machine determine the number of jobs which can be spawned by a guix command when run on that machine and doesn't affect the parent/originator machine. To both complicate the matter and to try to clarify it, lets say you have your main machine and 4 offload machines. The main machine can offload to one offload machine, and that one can offload to 3 additional machines. In a default configuration (max-jobs=3D1 everywhere), the main machine will offload exactly one build to the offload machine (regardless of the number of guix commands run), which will offload that build to exactly one of its offload machines. A second guix command which would be offloaded will wait until the first guix command is completed entirely, since only one build is allowed to be offloaded. > Thanks! > Phil. Hope that helps. --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --5Wv+8B3AAopaCscs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmH3n7AACgkQQarn3Mo9 g1Ey8g/+MiSEpI9eQ80F7v693sNjBsJKqDJzqgxBeNx6oKBmXz7j12ncEMuw4kIB AQLStY1zfGb70iHp0iD24LiRiPf5DeRSzc3oOimEFY0yeu7K5SE5pGNB3HXuoTxt s+e7JIdNDP+Z5IW4Rm2/AfQmsU1CA7NlawxeZYt2+wY4bOGsZKDZahJXFp1wZWwA EW4IlI/xHBLw7vI3BL3KFxVzNzj1dltYyqaMBCMd9TTlatGsU7m/OMR7lpak1T9E HJPp2HKfQE+MAtYF+ZE9w9r/tY2Zq8egpRxn6q74C+0oggNj7OQYLDghSH0lO03k vSVZtsLjbFpbsOGvWapILAN6B2aX5SFNbTVxCHQ5ocl7t5RLGdgGNBpctBkO5EvW zrluhI4uJfwq7qvp3D2e9hKmlI9/tbhCwd1AJ3USUutvNM5eHgY9JY6bERXEXHzV jkomjNeF4zd8MNdIBEfwPwNPoX9TszigoGJyWYRRoRnjRz/Vi6DGh9V/fACgQuvc Vf9YBUairqoqMFJOCFFpYRXCbCUicMxTUhYnqOTrvmDxCI1uyacBKWCiFFMEhBlb w3QQFHIFPpFbE/4IqMHDfLD2tloeG95faMSE3/suhai4R1S9P/wppq7lUXiSIL7q /Yptlh1Yi+fcekaAWuacHRWRjKsMJlvscREdjVVF1dlMCQQh0AI= =NZFx -----END PGP SIGNATURE----- --5Wv+8B3AAopaCscs--