aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/build-allocator.scm
Commit message (Collapse)AuthorAge
* More efficiently filter and select builds in the allocatorChristopher Baines2022-01-31
| | | | Specifically the derivation ordered allocator.
* Only include active agents in the build allocation planChristopher Baines2021-11-13
|
* Refactor how unprocessed builds are trackedChristopher Baines2021-11-07
| | | | | | | | | | | | Previously, the allocator worked out the derived priorities for each build. Unfortunately this is quite a complex query, and took lots of time. As a result of this, I think the WAL could grow excessively while this long query was running. To try and mitigate this, add a new table to keep track of the derived priorities for unprocessed builds. This requires some maintenance to keep up to date, which in turn will make things like submitting builds slower, but I think this might help keep transaction length and WAL size down overall.
* Increase the basic build allocation strategy default planned buildsChristopher Baines2021-04-27
| | | | | Mostly so the coordinator for building patches plans more builds at once, since the allocator is very slow at the moment.
* Increase the derivation ordered allocator default planned buildsChristopher Baines2021-02-15
| | | | | As the derivation ordered allocator is quite slow when there's a large number of builds to consider.
* Stop the derivation ordered allocator from logging lotsChristopher Baines2021-02-02
| | | | | This value was unintentionally changed, it's just intended for local debugging.
* Remove the created after derivation ordered allocator argumentChristopher Baines2021-01-31
| | | | As this is preventing some builds from excuting.
* Only require matching tags when the build and agent keys matchChristopher Baines2021-01-31
|
* Deduplicate agent-tags-match-build-tagsChristopher Baines2021-01-31
|
* Try to simplify part of the basic allocatorChristopher Baines2021-01-26
| | | | As there has been exceptions in this area, the required build priority is #f.
* Fix up a load of the tag related codeChristopher Baines2021-01-17
| | | | | Turns out vector-fold and vector-map don't work like I'd expected them to, like fold and map for vectors.
* Fix bug in allocators from alist to vector switch for tagsChristopher Baines2021-01-17
|
* Stop treating collections of tags as alistsChristopher Baines2021-01-17
| | | | | | | This translates poorly to JSON, as you can't have multiple values for one name in a JSON object. Is also is risky in terms of assoc-ref being used, and not considering more than one key. Using a vector of pairs should help in both situations.
* Implement agent/build tag matchingChristopher Baines2021-01-17
| | | | | | | | | If the agent and build tags have overlapping keys, compare the tag value, and only match the build to the agent if the value matches. There's a potential issue with some of the code here in that it doesn't cope well with tags with matching keys but differing values, but this is just a first implementation.
* Switch to a stable sort in the basic build allocatorChristopher Baines2020-12-23
| | | | Just in case this has a bearing on the ordering.
* Maintain build order when breaking builds in to sublistsChristopher Baines2020-12-23
| | | | This might help, depending on whether the order they come out of the database.
* Skip some unnecessary prioritisation in the basic allocatorChristopher Baines2020-12-23
|
* Have the basic allocator prioritise builds with all build inputsChristopher Baines2020-12-23
|
* Fix typoChristopher Baines2020-12-22
|
* Fix another number -> boolean changeChristopher Baines2020-12-22
|
* Push builds that should be ready to start to the front of the queueChristopher Baines2020-12-22
| | | | In the basic allocator.
* Extend the default builds-created-after timeChristopher Baines2020-12-14
| | | | | | For the derivation ordered allocator. This is a hack to reduce the number of builds in scope, and I think it's cutting out some builds that I want to happen.
* Fix the use of a slow alist in the basic allocatorChristopher Baines2020-12-11
| | | | Changing this to a hash table really speeds things up.
* Just count the builds onceChristopher Baines2020-12-11
| | | | In the basic allocator.
* Drop the number of builds allocated by defaultChristopher Baines2020-12-04
| | | | Now that the allocators are faster, such a long backlog isn't helpful.
* Guard against a potential crash in the basic allocatorChristopher Baines2020-11-16
| | | | | Builds introduced while the allocator is running may cause this bit to crash, so just ignore any builds that aren't accounted for.
* Handle agent requested systems in the basic allocation strategyChristopher Baines2020-11-13
| | | | | Previously, the derivation system was ignored, but this now takes it in to account. The implementation is copied from the derivation ordered allocator.
* Rework how the derivation ordered allocator gets buildsChristopher Baines2020-11-06
| | | | | | Use a temporary table to avoid computing the priorities for all builds. This speeds up the allocation to only take a few seconds on the database I'm testing against.
* Attempt to more gracefully handle the problem of missing derivationsChristopher Baines2020-11-02
| | | | In the agent and allocator.
* Only consider builds created in the last two weeksChristopher Baines2020-10-29
| | | | | | For the derivation ordered allocator. This is an quick alternative for having some kind of archival mechanism for builds. It should reduce the time it takes the allocator to run.
* Track the number of builds the allocator is consideringChristopher Baines2020-09-23
|
* Factor in which systems agents fetch in the allocation processChristopher Baines2020-07-03
|
* Pass through the db connection in datastore-call-with-transactionChristopher Baines2020-06-20
|
* Fetch the derivation ordered allocator data in a transactionChristopher Baines2020-06-20
| | | | To try and avoid the data from the two queries being inconsistent.
* Fetch the unprocessed builds after the priorititesChristopher Baines2020-05-20
| | | | | This might help avoid any issue with having a unprocessed build, but not knowing the priority, as it's just been processed.
* Remove some unused codeChristopher Baines2020-05-17
|
* Speed up the derivation ordered allocator a little bitChristopher Baines2020-05-11
| | | | | Use EXCEPT, rather than NOT IN to make the SQL query faster. Also, just return and use the build id, rather than a alist.
* Replace datastore-fetch-input-builds-for-unprocessed-buildsChristopher Baines2020-05-10
| | | | | | | It worked under some database conditions, but was very slow under others. Move more of the logic in to SQL in an attempt to make the allocator faster. This sort of works, but there were some advantages to the approach before the approach being replaced in this commit.
* Use some more SQL to speed up the derivation ordered allocatorChristopher Baines2020-05-10
|
* Fix datastore-fetch-input-builds-for-unprocessed-buildsChristopher Baines2020-05-10
| | | | | Previously it was ignoring outputs without builds or build results. This fixes that.
* Speed up part of the derivation ordered allocatorChristopher Baines2020-05-10
| | | | By using a bigger SQL query, rather than lots of small ones.
* Stop the derivation-ordered allocator using missing inputsChristopher Baines2020-05-10
| | | | Because it's building everything, missing inputs shouldn't be as relevant.
* Add a new allocation strategyChristopher Baines2020-05-08
| | | | | This should work better where the build coordinator is being used to build all derivations in the graph.
* Fix the removal of missing input setup failures in the allocatorChristopher Baines2020-05-01
| | | | | Previously it was ignoring all setup failures when a single one of the outputs for a single setup failure should be available.
* Try to better order the buildsChristopher Baines2020-05-01
| | | | | | As well as sorting by priority, this now looks at which builds are missing outputs, and which builds will provide those outputs and tries to order the builds providing the outputs before the builds that need them.
* Have the build priorities propagate between buildsChristopher Baines2020-04-29
| | | | | | | | | This should at least do a better job of boosting the priority of builds required to perform builds which have high priorities. I'm expecting this to result in contiguous chunks of builds with all the same priority, and the ordering within those chunks isn't yet decided intelligently.
* Move output-has-successful-build? out from filter-builds-for-agentChristopher Baines2020-04-29
| | | | As it's not dependent on the agent.
* Memoize output-has-successful-build?Christopher Baines2020-04-29
| | | | This is called for the same outputs multiple times, so memoize the result.
* Add a useful commentChristopher Baines2020-04-29
|
* Use a hash-table for setup failures, rather than an alistChristopher Baines2020-04-29
| | | | This will probably perform better when there are lots of step failures.