all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Julien Lepiller <julien@lepiller.eu>
To: Jacob Hrbek <kreyren@rixotstudio.cz>, zimoun <zimon.toutoune@gmail.com>
Cc: "guix-devel@gnu.org" <guix-devel@gnu.org>
Subject: Re: Proposal: Build timers
Date: Tue, 23 Nov 2021 07:05:20 -0500	[thread overview]
Message-ID: <41445168-F908-4316-8AC4-55AFB3F43FB0@lepiller.eu> (raw)
In-Reply-To: <HktDVm3xNb7mUmY6ZZ_ebsG4s9SJ1LFVYGbce9pIRfjvKli4phmJ1P-D19z7FrsZxav708l7cKkFkT2QrN8btGgNFRzDIqnRgZ5-WNTPC10=@rixotstudio.cz>



Le 23 novembre 2021 01:21:06 GMT-05:00, Jacob Hrbek <kreyren@rixotstudio.cz> a écrit :
>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 subtraction 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 that add values to it like simple listener waiting for POST requests.

We already log time on cuirass, but we don't use this information at all. If you could provide some wip code to show how you would implement the feature with this info, that would be great for this discussion.

For jocal logs, there is the store database (in /var/guix) for instance, though running the gc will also erase the info along with the store item.

>- within the guix repo: Since we are already building the package we can take the time and then do the provided math in reverse to calculate the time:
>
>    Build took 100 sec on system with 8 threads at 2.4 Ghz max cpu frequency:
>
>    100 * (2.4 * 8) = 1920 (build time value per one thread at 1 Ghz)
>
>    Building the package on system with 2 threads at 2.4 Ghz max cpu frequency:
>
>    1920 / (2 * 2.4) = 400
>
>    We can then assume that the build will take 1920/400=4.8 -> 4.8 times longer on this system.

LFS has a notion of a Standard Build Unit (SBU), that is the build time of a particular package on your machine. Each package build time is estimated in SBU. However, they do not take threads into account, because the relation is not exactly proportional (some parts are linear, there is some overhead, …). SBUs change quite often with versions, so I don't think averaging on different versions/derivations would make a lot of sense… But I suppose this info could help determine how long it should take to build the same derivation or a similar one.


  parent reply	other threads:[~2021-11-23 12:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22 22:02 Proposal: Build timers Jacob Hrbek
2021-11-23  1:06 ` zimoun
2021-11-23  6:21   ` Jacob Hrbek
2021-11-23 11:56     ` zimoun
2021-11-23 14:39       ` Jacob Hrbek
2021-11-24 11:35         ` zimoun
2021-11-25  4:00           ` Jacob Hrbek
2021-11-23 12:05     ` Julien Lepiller [this message]
2021-11-23 16:23       ` zimoun
2021-11-23 20:09 ` Liliana Marie Prikler
2021-11-23 21:31   ` Jacob Hrbek
2021-11-23 21:35   ` Jacob Hrbek
2021-11-23 23:50     ` Julien Lepiller
2021-11-24 11:31       ` zimoun
2021-11-24 20:23         ` Vagrant Cascadian
2021-11-24 21:50           ` zimoun
2021-11-25  4:03           ` Jacob Hrbek
2021-11-25  5:21             ` Liliana Marie Prikler
2021-11-25 10:23             ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41445168-F908-4316-8AC4-55AFB3F43FB0@lepiller.eu \
    --to=julien@lepiller.eu \
    --cc=guix-devel@gnu.org \
    --cc=kreyren@rixotstudio.cz \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.