meta(ci): Stop producing maxperf releases in CI #2615
Labels
No labels
Abandoned
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Compliance
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
bob the builder
No milestone
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
continuwuation/continuwuity#2615
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What new feature do you want to see? What problem does it solve?
Maxperf usually takes 2-4x longer to produce than regular release builds(1 2 3 4 5 6 7 8 9 10), which causes the total runtime of the
release-imagesworkflow to go from 15 minutes to over an hour very frequently. Combined with all of the other build tasks (8x ubuntu+debian builds, 4x nix builds), releasing a new version can take over six hours, excluding the time taken where we have to watch the workflows and restart jobs that encounter transient errors.This is entirely disproportionate to the benefit maxperf builds provide: they are slightly smaller binaries due to strong LTO, marginally improved hwaccel by targeting the
haswellCPU, and a few runtime checks skipped via therelease-max-perfprofile. The name "max perf" misleads people into believing that normal releases have lower performance, which is entirely incorrect, and also costs us valuable debug logs since the maxperf release profile disables debug logs entirely. So we're spending an inordinate amount of time building binaries that have negligible performance benefits that make it significantly harder to fix bugs.I think we should stop producing max perf binaries in CI for these reasons. If people want to run max perf, they should compile the server themselves with a more accurate
TARGET_CPUand other rustflags, which will grant better tuned performance anyway. This also saves us hours of time per release. I'd be happy to outline how to compile maxperf in our documentation instead.This would involve removing:
Further reading
No response
Additional context
No response
@continuwuation/Owners hiiii I'd like ur input on this xoxo
I'm also not a fan of us producing EIGHT ubuntu/deb builds per release, but I think there's more nuance to that issue
We might be able to drop the ubuntu builds, and have ubuntu users use the debian repos. Depending on deps it could work really well or not at all
As a current maxperf user, I wouldn't terribly mind losing those; I did notice a tangible decrease in resource use when i first switched from regular builds on a server with a maxperf-capable CPU, but it's not the biggest of deals in the grand scheme of things.
Re: Debian-family repos: as long as the following conditions are met, it seems plausible to drop distro & version-specific Debian-family repos in favor of a single generic repo (i.e., 2 debs total per release, consisting of one per arch):
I think these two changes alone will drastically reduce the combinatorial explosion of release targets we're currently working with in CI, and if we implement those and are still dissatisfied with overall release times, then that'd be the point to evaluate further changes.
Yeah, that's what I'm getting at - it's not that maxperf is useless/pointless, otherwise I'd be advocating for removing it. The issue is the benefits of it are negligible compared to the cost required for compiling them in CI.
honestly I think we should start targeting haswell for our base x86 builds. having hardware accelerated crc32 is great for rocksdb, and that microarch is, what, thirteen years old? I am certain that a supermajority of our users are using compatible CPUs, and those who are running continuwuity on ancient potato hardware are probably already compiling it themselves
I'd too be in favour of that
to be clear: since the haswell target is the biggest benefit maxperf has, if we add that to the default release profile I'm happy to drop maxperf
@ginger wrote in #2615 (comment):
i somewhat strongly disagree with this. 13 years is not a lot in the span of server CPUs (and most other CPUs for that sake). a lot of selfhosters use old hardware (thinkpads, old servers, NUCs, etc) which wont support haswell, and defaulting to targeting it (and nothing else) would have a massive impact on those users.
i think this is highly unlikely, a majority of self-hosters regardless of hardware support level would much rather prefer to use a pre-compiled binary or container, and will use other software if that is unavailable (speaking from my own experience and experience talking to friends and other communities).
in my opinion, dropping maxperf entirely would be the correct option, at least for the time being. i do not think dropping non-haswell is a good move forwards at all, as it would completely isolate the user groups i listed above.
We could probably delegate non-haswell builds to be a second class platform and make them low-priority in the CI matrix, effectively taking the place of maxperf (except with significantly faster compile times). I don't think we should support CPUs a decade older than our project forever though, given there's genuine detriment to doing so
i agree with this, as long as we keep compiling them and deploying them at all
i agree that it shouldnt be forever, at least with our current CI setup, but i do think we should keep support for the time being. if we can manage to get a build-once package-many workflow going that would probably be the ideal solution as we could add targets without too much cost.
I am in favor of dropping max-perf to save CI time. I am not in favor of upgrading the minimum hardware requirement for project-produced binaries to haswell-or-newer. We want to support the potato hosters directly. People who want a sportscar can compile themselves, which is easy and well-supported.
Temporarily disabled in CI for the 26.11 release so that we don't have to baby the release process for half a day again. Can re-visit later.
I wrote, in part, in #2615 (comment):
In local tests using the
debian-oldstableandubuntu-latesttags of the containers we use in CI, I've confirmed that the project builds successfully in thedebian-oldstableenvironment following the steps laid out in thebuild-debianworkflow.Then, after copying the resulting deb file into the
ubuntu-latestenvironment, I was able to successfully test installation, then get Continuwuity to start and trigger first-registration workflow, including interactively creating the first user.This suggests that both conditions have been met, clearing the way for building debs just once per arch for any given release!
As for how to go about this...
There would be precedent for creating a single "distribution" in the Debian repo named something like "any" or "stable" and uploading built debs there. To preserve deployers' ability to select their release train of choice, the existing "component" logic in the build workflow (
stablefor tagged releases,unstablefor RCs/alphas/etc.,devfor things built off a particular commit) can trivially be left intact, and thus should be.All of this can be accomplished CI-side by modifying the existing Debian workflow in place, for which I don't mind opening a PR.
That said, the sticky part is that this would be a breaking change for deployers using the Debian repos, who would need to slightly modify their local apt repo configurations to use the new "distribution" (i.e. deb822
Suite).