guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal: Build timers


From: Julien Lepiller
Subject: Re: Proposal: Build timers
Date: Tue, 23 Nov 2021 07:05:20 -0500
User-agent: K-9 Mail for Android


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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]