From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +IksOOuJnGEw2QAAgWs5BA (envelope-from ) for ; Tue, 23 Nov 2021 07:27:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id SLfgM+uJnGEWSgAAB5/wlQ (envelope-from ) for ; Tue, 23 Nov 2021 06:27:55 +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 922F639BA7 for ; Tue, 23 Nov 2021 07:27:55 +0100 (CET) Received: from localhost ([::1]:38394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpPHW-00048a-NR for larch@yhetil.org; Tue, 23 Nov 2021 01:27:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpPB6-0005Sj-8S for guix-devel@gnu.org; Tue, 23 Nov 2021 01:21:17 -0500 Received: from mail-40136.proton.ch ([185.70.40.136]:33669) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpPB1-0007ac-Iq for guix-devel@gnu.org; Tue, 23 Nov 2021 01:21:15 -0500 Date: Tue, 23 Nov 2021 06:21:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rixotstudio.cz; s=protonmail2; t=1637648467; bh=jw8ch8xh90q6muptt7u2RgdPIWuhdeJsOrRqKTxRbw0=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=ji9aE+e0m20v2JADFxhPAEBmSVOYOMTpjLD8sBDB5foOJu5UgThmpkg/VNtG+g7K2 FVH/vX5CN2uLqtpXRFnWgXKcJsdMuGIulcSoUhfEvWn+8PyEhubcC3O7Rv4Ak7/5ZB aUYAb9eV5ieDI8foKHqCpSuR5XEIQfbS62wdniA39AalVzkoKy7nWVNifFIgvXSsjO uvAgtssv7jTWvQJP6Rbtl933+mWqqP8i6XpMM1KdNd4gxC7Eavp0VZY6lje1Z/C9cB pqegSfH8G3Rs8UCVBCNeijKn3fQkAtaBGs4wpBG4fYsrxnVF9qKT+YQHa6OWVpJYpb N8LjqUUR+Ieng== To: zimoun From: Jacob Hrbek Subject: Re: Proposal: Build timers Message-ID: In-Reply-To: <868rxfwuib.fsf@gmail.com> References: <868rxfwuib.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha512; boundary="------eb850081f80a4e3011d4fa263d72e13a2fe1fc0d3628db075c1a7a06fde3e468"; charset=utf-8 Received-SPF: pass client-ip=185.70.40.136; envelope-from=kreyren@rixotstudio.cz; helo=mail-40136.proton.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jacob Hrbek Cc: "guix-devel@gnu.org" Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" 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=1637648875; h=from:from:sender:sender:reply-to: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:dkim-signature; bh=jw8ch8xh90q6muptt7u2RgdPIWuhdeJsOrRqKTxRbw0=; b=G3FGu37miLmXXagZaPi72GK+1Z6Rh5IPzFkAkw0XJpeTkJ3vWg41p2d+ZBQueQvvwQ33nB Myofp9Wf33lvZ+Zxa4x9DpIGRG9I/WPhJBJfp5Y7FydoOVhoCDVIXlNfFaqgMQOUfZb9vw KO8R11xUBmFrBIpw4ej3Nn9HyNdHihkAFh9i+5DgDJ7V26Pay5Sh5Llsqleofrv1pOJXUY 6aiCSG6dOCFKgexOmb/hgGUpFQB0FUYzJGKjr4jkuFdPkE6PwW4Lda1Y/AU46Sc3joeAbC T9L5QewYekkmMiyq1BBDsktZt/kELVWOCHhmYphFfInUNrWfpR//xJvNBg+S0w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637648875; a=rsa-sha256; cv=none; b=MkWjpVXeDnNnC1qi6p9yaW3Lhc5dqu7pmtfvy3u3vIHg4++HWIuCPdll/+OvJbfzAKUq1I txNTa25subKXB5kiinhiQ6ICAZ60g/UcrlGaEJLXwBqQXI+gaFKZCWCVq6FsmB1OFUS5pH 69QcJWbCgE41wBM0qVfB1lFd50M2CjiFJBZCMMBtVR61z4CO+99TtxxdcvWHMqyyGfE0xM NajXCVa5FNfG6+AyIluIaew1HvBe1E6LRi7dPf7K2oJDjELJM7kH9IUho9sWNf9Pbth2Wt QLy3rzNrSucWb6GnD4yfoZYWGd+pWyngozh9BRd2shLLhczgeNZ8EVCVeTQrNw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=rixotstudio.cz header.s=protonmail2 header.b=ji9aE+e0; dmarc=pass (policy=none) header.from=rixotstudio.cz; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -6.08 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=rixotstudio.cz header.s=protonmail2 header.b=ji9aE+e0; dmarc=pass (policy=none) header.from=rixotstudio.cz; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 922F639BA7 X-Spam-Score: -6.08 X-Migadu-Scanner: scn0.migadu.com X-TUID: rm+S0SY9POfv This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------eb850081f80a4e3011d4fa263d72e13a2fe1fc0d3628db075c1a7a06fde3e468 Content-Type: multipart/mixed;boundary=---------------------1b3c9d4235987ddea77fa83ced9081d8 -----------------------1b3c9d4235987ddea77fa83ced9081d8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain;charset=utf-8 I think you are overcomplicating the implementation.. What I am proposing = is to store the time value before and after the build and then log the sub= traction of these two values per package (or even per package's phase). For storage it can be either/both: 1. locally: Storing the value somewhere on the system and adding up to it = each build to provide more accurate average. **optionally** This local database can be shared across multiple systems t= hat add values to it like simple listener waiting for POST requests. - within the guix repo: Since we are already building the package we can t= ake the time and then do the provided math in reverse to calculate the tim= e: Build took 100 sec on system with 8 threads at 2.4 Ghz max cpu frequen= cy: 100 * (2.4 * 8) =3D 1920 (build time value per one thread at 1 Ghz) Building the package on system with 2 threads at 2.4 Ghz max cpu frequ= ency: 1920 / (2 * 2.4) =3D 400 We can then assume that the build will take 1920/400=3D4.8 -> 4.8 time= s longer on this system. The math might need to be adjusted, but it seems to be sufficiently accura= te through my testing, fwiw I see that `(max cpu frequency * cpu threads)`= is an important component of the equasion using the analogy of a (possibl= y silly) "pokemon battle" assuming interpreting a mathematical equasion to= define the Health Points of the package and damage per second of the CPU = then simply substracting these two values to determine how long it will ta= ke to build alike package has 500 HP -> Needs a CPU that deals 100 HP to c= omplete in 5 sec or CPU that deals 50 HP to finish in 10 sec. About accuracy: I highly doubt that we need to worry about the system nois= e as that will be mitigated after enough systems submit average build time= with their max CPU frequency and threads used.. we shouldn't really bothe= r past that at the current stage and we can always add additional metadata= if needed. Either way if we decide to not implement the logging of the build time I w= ould still argue that we should still consider just plain outputting of th= e time needed to complete the phase and package as I see it as a best prac= tice for monitoring and assuming that it's very cheap (5~20 cpu cycles?) i= n terms of processing resources to do so. -- Jacob "Kreyren" Hrbek Sent with ProtonMail Secure Email. =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original M= essage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Tuesday, November 23rd, 2021 at 1:06 AM, zimoun wrote: > Hi, > = > On Mon, 22 Nov 2021 at 22:02, Jacob Hrbek kreyren@rixotstudio.cz wrote: > = > > See the proposal in https://git.dotya.ml/guix.next/GUIX.next/issues/5 > = > If I understand well your proposal, you are suggesting to attach a value > = > =E2=80=99build time=E2=80=99. While I understand it could be useful for = monitoring; > = > especially CI (Cuirass or Build Coordinator) =E2=80=93 but it appears us= eless > = > for your use case. Where do you want to attach such value? I think it > = > is not affordable to add another field (or =E2=80=99properties=E2=80=99)= for all the > = > packages. > = > When discussing the Cuirass revamp, it had been mentioned to grab the > = > Cuirass database and then try some analytics to infer heuristics helping > = > for a better scheduling strategy. However, the task is not as easy as > = > it appears at first. Some builds are blocked by unrelated IO > = > operations, e.g., [1], thus it is hard to distinguish between a > = > regression or something unexpected in the build farms. Something useful > = > for monitoring, but hard to exploit for local builds, IMHO. > = > Other said, the =E2=80=9Ctelemetry=E2=80=9C you are suggesting require n= on-trivial > = > filtering to gain the robust feature you expect, again IMHO. > = > Last, build-time depends on the environment (how the machine is > = > stressed), and for instance, I do not want to stop a build because on > = > average people are building it using X time when my machine builds it > = > today using X+y time (because it is CPU stressed by something else or > = > whatever). Well, I am doubtful that the standard error would not be too > = > much compared to the mean; other said, my guess is a flat Gaussian > = > function because of heterogeneous hardware and various levels of stress > = > for the same build. > = > To be explicit, I do not think Guix should take care of this. From my > = > opinion, if the build farm does not have the substitute (guix weather), > = > it is a bad sign the package will build locally; therefore, if resources > = > are limited, before building locally, I would inspect the output of > = > build farms (ci.guix.gnu.org and bordeaux.guix.gnu.org). Obviously, it > = > depends your target architecture and some are poorly supported, sadly. > = > 1: http://issues.guix.gnu.org/issue/51787 > = > Cheers, > = > simon -----------------------1b3c9d4235987ddea77fa83ced9081d8 Content-Type: application/pgp-keys; filename="publickey - kreyren@rixotstudio.cz - 0x1677DB82.asc"; name="publickey - kreyren@rixotstudio.cz - 0x1677DB82.asc" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="publickey - kreyren@rixotstudio.cz - 0x1677DB82.asc"; name="publickey - kreyren@rixotstudio.cz - 0x1677DB82.asc" LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tDQpWZXJzaW9uOiBPcGVuUEdQLmpz IHY0LjEwLjEwDQpDb21tZW50OiBodHRwczovL29wZW5wZ3Bqcy5vcmcNCg0KeGpNRVlBbDNGaFlK S3dZQkJBSGFSdzhCQVFkQVFLQXBtZFI4dEc5YUtFZHh3SEovWktPMkN2Wk1SV1B0DQpCTk5HcUpV aHAyTE5MMnR5WlhseVpXNUFjbWw0YjNSemRIVmthVzh1WTNvZ1BHdHlaWGx5Wlc1QWNtbDQNCmIz UnpkSFZrYVc4dVkzbyt3bzhFRUJZS0FDQUZBbUFKZHhZR0N3a0hDQU1DQkJVSUNnSUVGZ0lCQUFJ Wg0KQVFJYkF3SWVBUUFoQ1JDdDAzMFVxMEw4cVJZaEJCWjMyNEtUaktobGM0RWpCNjNUZlJTclF2 eXA1N1FBDQovMHRsYmRuQ0l6cmVLWG12VzJYU1lYekFKb3RKZHhDekUrWEFUTStxUERLekFRQ2Ni SHA3eXc2K0FybmcNCmVTdEdGbi9vbGh4VFBkcHU2NDFDTEdpZ1BtRW9CYzQ0QkdBSmR4WVNDaXNH QVFRQmwxVUJCUUVCQjBEYQ0KaUkzalFmU29pM0RaNC9OZm14R2RzUnN2OS9CcU1nVzVqNmpkQnFr eUlBTUJDQWZDZUFRWUZnZ0FDUVVDDQpZQWwzRmdJYkRBQWhDUkN0MDMwVXEwTDhxUlloQkJaMzI0 S1RqS2hsYzRFakI2M1RmUlNyUXZ5cEhjRUINCkFPUXhTL0ovVU0wZWU4azJqYmxpV2QvUTBJZCtY OFVIQlhoeXFWUmMyMnFyQVFETEhjVzk3V1FiU0pGbw0KMTlrd3Q3ME95SGVwRjZMV3BERDBQdUlT WkQ2SUNnPT0NCj05a1pnDQotLS0tLUVORCBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tDQo= -----------------------1b3c9d4235987ddea77fa83ced9081d8-- --------eb850081f80a4e3011d4fa263d72e13a2fe1fc0d3628db075c1a7a06fde3e468 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: ProtonMail wnUEARYKAAYFAmGciD8AIQkQrdN9FKtC/KkWIQQWd9uCk4yoZXOBIwet030U q0L8qfLaAQCU15suqS2PbuvxyKGl2Wg4YhClGzdVRSENbkdbuF6xHAD/Th8O 47VT7yhOPYPyuTNYYismGqe+lNkquC/Czn8Y3AY= =P/Qj -----END PGP SIGNATURE----- --------eb850081f80a4e3011d4fa263d72e13a2fe1fc0d3628db075c1a7a06fde3e468--