Imposing performance requirements for architectures hosted in the main Koji instance #3688
Labels
No labels
document it
fast track
meeting
next release
nonresponsive maintainer
packager revocation
pending announcement
provenpackager
python 2 exception
self contained change
stalled
Status
Accepted
Status
Duplicate
Status
Insufficient data
Status
Invalid
Status
Rejected
system wide change
updates policy exception
vote-in-progress
No milestone
No project
No assignees
7 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
fesco/tickets#3688
Loading…
Add table
Add a link
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?
In previous FRCL discussions, the performance problems with IBM architectures in Fedora has come up repeatedly. What has been uncovered is that Fedora Infrastructure doesn't measure build performance in a way that allows them to understand the pain of contributors and proactively resolve it. This has led to a culture of learned helplessness among contributors when it comes to problems in the builder infrastructure. Infrastructure also seems to maintain a perpetual blind spot to all but the worst issues (builders down, etc.) because contributors have learned that complaining and reporting issues does not result in improvements.
It has now gotten bad enough with IBM architectures that there is a serious discussion underway about removing IBM Z (s390x) from all Fedora outputs and discontinue support for the architecture everywhere if Fedora doesn't get substantially more mainframe capacity by the end of the year (see this
devel@message). There's still about 2 months left to demonstrate some concrete progress to hold that off, but if it doesn't happen, that proposal is coming soon.For this ticket, I'd like for us to discuss requesting Infra to track specific core metrics with measures for proactive management of builder capacity. This is basically where my head is at (based on my experience previously managing build system infrastructure):
Alternative primary architecture (defined specifically as architectures hosted in the main Koji instance that aren't x86_64) builds should not be any more than 15% slower on average than x86_64.
This would likely need some careful characterization to weed out extremes on either ends so the numbers make sense, but the general idea is that Fedora packagers (who are volunteers and don’t have the freedom and flexibility to allocate large swathes of dedicated time to managing builds) should not be forced to cycle in and out because of alternative architectures. This also needs to be a hard rule with no wiggle room because the human cost of the wiggle room is so high.
As for why 15%? 15% of one hour is 9 minutes. 15% of one day is 3.6 hours. These are what most people would consider
"reasonable" slack for build time. Anything more than that starts getting into "frustrating" territory and forcing people to swap out and complain. If something takes one hour on x86_64 and 1.5~2 hours on riscv64, people will be upset. If something takes one hour on x86_64 and 3 hours on riscv64, people will revolt. Note that this really only matters if you are putting RISC-V in the main Koji instance, and thus forcing it to be a gate for "successful" builds.
I would personally consider refusing any new architecture additions until that is figured out as a basic step. That means, for example, RISC-V is probably not going to be shifted out of secondary Koji and secondary architecture status for many years. This specifically will avoid the problem we had when we imported ARM in Fedora Linux 20 and suffered painfully slow TTLs for Koji builds for most of the past decade after that.
For existing alternative architectures that fail this test, we should also consider options on how to bring them into compliance. Do we provide a grace period? Do we temporarily offer them a larger range (20% or 30% for X number of Fedora releases?)? Or do we give a deadline to have them move out into secondary Koji instances or risk being removed? There could be even more options to consider.
There are also architectures where the builds are reasonably fast but we don't have enough builders, so users experienced long queue time and then the build itself is reasonably fast. When the hardware is super expensive like s390x though, that is an issue as the scaling we can get has much longer lead time and much lower granularity
I mentioned in private discussion, but one thing to flag is that the CI we run on PRs are also blocked on primary architectures' scratch builds all passing first, which also seems needless. If I am making a small adjustment in a PR, and the adjustment is architecture-agnostic, I'd rather see installability tests from x86_64 sooner rather than wait hours for the s390x builder to be available
@ngompa wrote in #3688 (comment):
I don't agree with this in relation to the s390x issues. We know and have known that there are issues with resources.
Metrics could be useful if anyone at all ever replied to our request for more resources with "well, what more do you need".
That has not happened. We cannot be proactive when no one is providing us with more resources, or even discussing that with us.
I assure you I understand the pain. It sucks up tons of my time trying to tune things so it's least bad on s390x.
I will also note that in a recent FRCL discussion, @humaton said he would put together some metrics and work on a plan to create them. I have no idea where that effort is (and he is on PTO this week), but we should ask him.
I also am completely blindsided by this.
If there is a down builder those are usually handled quite quickly and even so koji would just send the job to another builder?
Are there tickets on these issues?
<...snip...>
Using the stats that @salimma created, what arches pass this test currently? Any of them?
I just did a spot check of a recent gcc build...
https://koji.fedoraproject.org/koji/buildinfo?buildID=3107250
If I'm reading the state.logs correctly, then both ppc64le and aarch64 would have failed the 15% relative to x86_64 measure.
it appears for that build x86_64 completed within 6 hours, but both ppc64le and aarch64 completed in about 15 to 16 hours?
s390z completed in about 30 hours
My numbers are approximate readings of the timestamps of the state.logs for each arch.
I think it only makes sense to look at the total latency. For users, the split between waiting and building is irrelevant.
I agree that in general we need to make s390x (and other architectures) reasonably fast, and setting some expectations would be good, but that proposal seems way too strict. As mentioned by @jspaleta, all non-x86 architectures would fail.
@zbyszek
I very much like the idea of some established SLAs that can help us identify when there are problems in the infrastructure and resourcing committments to address those problems in a timely manner. But I do not think those SLAs can be written as relative to the primary arch.
I have concerned about structuring those SLAs in a way that doesn't anticipate the reality of needing to do reinvestment hardware refreshes in a staggered manner.
If the primary arch gets a generational hardware reinvestment that makes it operate like 300% faster. There's no way the other arches are going to be able to match that without their own generational reinvestment, and that cannot be realistically done all in the same budget cycle.
If this relative SLA language is adopted, what I envision happening is that capacity planning will change in such a way that primary arch capacity will no longer include large scale generational hardware reinvestments and will instead be done in a fashion to ensure other arches stay within the SLA. This will likely result stagnation and we will stop doing the generation hardware refreshes because doing them will be overall too risky.
I would prefer to separate out two different concerns.
I think SLAs can help us come to terms with type 1 problems, but they cannot be cast as relative to primary arch performance on a rolling basis.
I think type 2 problems need something else. I think we need to have expectations that look like renewable/reviewable contract terms that help us set expectations on the timescales over which arch specific hardware will be upgraded, so we can leap frog taking advantage of generation hardware improvements as there is capacity and resources to overhual them. ideally in my head we stagger this on sort of a yearly or two year cycle, and so we can make FTE and hardware budget capacity planning as normal part of annual work load.. so its not a spike to do everything all in one year.
Make sense?
The s390z performance situation appears to be a mix of type 1 and type 2 concerns. Fixing some of the identified storage problems may address the type 1 concerns.. but it might not be enough to get it back to parity with arm or power.
The only way we can stop having a relative performance metric is to split all architectures back to their own Koji instances. Right now, all build tasks are essentially blocked by the slowest architecture.
I deliberately proposed a very strict metric because it's based on the tolerance and irritation that packagers have today. We can use gradients for grace to reach it, but if we continue to have all architectures operate in the main build system and publishing of builds is blocked on every architecture completing (regardless of buildsystem), then it must be accepted that all architectures must move within similar performance bands. Generational leaps must trigger investment in that world, and if they don't, the architectures need to be dropped.
@ngompa wrote in #3688 (comment):
I don't think its a reasonable expectation on capacity planning to expect all arches to get generational hardware updates in the same budget cycle. We can at best hope for some flat annual capacity to do staggered changes.
We can synthetically degrade the primary arch performance so that it doesn't leap ahead too far after generational upgrades in order to meet your expectations. I don't think that's a healthy approach, but that's what is likely to happen in order to practically meet the expectations your expressing.
My 2 cents: I think the Fedora community could learn a few lessons if it studied how Debian does "hardware qualifications", e.g.:
https://release.debian.org/testing/arch_qualify.html
It's a great way to:
@jspaleta wrote in #3688 (comment):
If you feel you have to do that, then it's a good point of discussion to split out those architectures from the main Koji instance. Ignoring the reality of human time being wasted because of inadequate investment in non-x86 architectures is not a good strategy either.
@tuliom wrote in #3688 (comment):
Debian lands builds asynchronously for each port, so most of the problems we're talking about here don't apply there. Fedora used to do the same until we merged all our ports into the main Koji instance ten years ago.
I'm personally strongly against splitting arches into seperate kojis. That would be a lot of pain for releng/quality/users/infra.
As to what amount of slowness is tolerable, this probibly should be a wider discussion on the list than just in a ticket here where only folks who pay attention to such things see it.
Very much agreed.
Also.
I don't think we can set a specific threshold of slowness that would cause us to drop an arch. Instead, we should consider the overall picture, taking into account how long the problem lasts and how painful it is.
I used an llm to generate a "table of pain": wait times for builds, i.e. the diff between the start of the earliest build and the finish for a given architecture, and then as "total" those times summed for each arch and divided by the times of the same builds for x86_64. The result:
(https://github.com/keszybz/koji-build-stats/blob/main/stats-10000.txt)
@zbyszek wrote in #3688 (comment):
Indeed if memory serves from previous employment experience, my understanding is reasonable practice in the industry is some statistical metrics. Personally, I like having both a median and variance(or skew) if I can justify them as meaniful, but it depends on the workload. Others may of course have different opinions, but I find the median-like statistical metric is great for long term trend for systemic degradation. The variance-like metric gives insight I think, into emergent dynamics in complicated interactions between systems.
But i'm not an expert in these particular workloads yet. So please give my opinions the consideration they rightfully deserve.. which is probably not much compared to any opinion from anyone with operational experience of these systems.
Just FYI in the last week we have had a dialog with ibm folks about shorter term solutions:
@kevin please keep us posted. Let's wait for the response from IBM before making decisions.
@tuliom wrote in #3688 (comment):
One thing Debian also does is decouple every architectures - testing on their ARM64 artifacts can begin before the s390x artifacts finish building, etc.
The final migration to testing is blocked on all primary architectures being complete, sure, but you get early signal from, say, "oh hey the arm64 build does not build reproducibly"
As for what @jspaleta says about SLA, I agree that upgrading everything in the same cycle is unreasonable. But once performance deterioriates past a given threshold, it should be reasonable to expect resolution within N months agreed in advance.
I agree with @zbyszek that end users eventually care only about how long something takes in total, but the point about builders being fast enough but there's not enough of them is that ... the solution might be different. If we have insufficient but fast builders, throwing more at the problem would work; if the builders are just very slow then we might not consider that arch ready in the first place.
I think it's reasonable to have different SLAs for each architecture, e.g. we know mainframes are expensive, so we can say let's have capacity planning happen triennially (aligning with RHEL / CentOS release cycles), but for x86_64 / aarch64 we can say we can add capacity on a yearly basis (these are just examples, don't get fixated on them)
This issue will be discussed at the next meeting on 2026-10-20
@kevin wrote in #3688 (comment):
Fine, then we'll split slow arches out with tags, so that they aren't blocking each other anymore. That would probably require some work to adapt ELNBuildSync to handle this kind of workload better. But if we expect that we can't have architectures keep up with generation-on-generation improvements, then we have to do something so that packagers aren't getting stuck because infrastructure investments aren't keeping up with the community needs.
Sure, but this has already come up in multiple threads over the years. This ticket is a distillation of all the complaints over the years.
@jspaleta wrote in #3688 (comment):
I disagree with this premise. Fundamentally we set ourselves up for this by making all arches blocking before a build can land in the buildroot. If we are seeing substandard architecture performance for a protracted period of time, we should seriously re-evaluate it. It isn't worth wasting human time on, especially if it makes people consider quitting out of frustration.
Pain thresholds are more common with infrastructure that has high user-interactivity, since action-response flows are expected to be tight. I defined my straw proposal relative to x86_64 because our userbase and infrastructure essentially forces the matter. Fedora is the only distribution that provides a guarantee that all architectures are in sync. This means that our architecture ports are high-quality, but when our infrastructure is not scaled to the needs of the community, it turns into a massive bottleneck.
As I mentioned in my original post:
I don't know if a median works well for this. I think the mean of the set that filters out extremely low and extremely high numbers is better, but we should also separately capture very high numbers and the ratio of builds that are "very high" to determine whether there is an emergent pattern of slowness.
In order to correctly analyze and characterize build performance, you need three things:
We need a pain threshold in which an architecture needs to be re-evaluated. I proposed 15% because if you look at large build chains and single packages of high complexity, that 15% stacks up. But let's say we go with 50% as a threshold:
For the sake of this exercise, every build takes 30 minutes on x86_64. Right now ARM is about 130% of that, so that's 39 minutes. PowerPC is about 290% that, so that's 87 minutes. IBM Z is nearly 390%, which is 117 minutes. Even with a 50% threshold, ARM passes, but PowerPC and IBM Z fail. And our setup effectively made every x86_64 build take almost 2 hours to land, because our builder architecture is such that build time is defined by the slowest architecture.
But this assumes that builders are allocated nearly immediately (which, to be fair, most of the time, that is the case). But IBM architectures sometimes struggle on builder allocation, which blows out the time budget even further.
We need an absolute cutoff because otherwise this gets really bad very quickly.
If you want to do that, you should start participating as a packager and see the pain for yourself. As you say, you are talking without experience, and you do not understand the human issue here. Find a SIG that maintains a collective of packages to work with and participate in their processes. You'll get a much better handle on why we need to deal with this then.
Stats today for the last 1k builds (2026-10-17 11:43 — 2026-10-20 17:28 UTC):
I've updated
koji-lagand used it to pull updated metricsThe (AI-guided) findings and the database dump are available here
https://github.com/slopfest/sandogasa/releases#release-koji-lag-store-2026-10-19
Direct link to the PDF: https://github.com/slopfest/sandogasa/releases/download/koji-lag-store-2026-10-19/FINDINGS.pdf
As I mentioned in the meeting yesterday, median (p50) is rather misleading - p90 shows that it's mostly the larger builds where s390x struggle
What the analysis is missing is we did not pull
hw_info.logyet - I'll revise in the next few weeks - and that actually explains why s390x lags on CPU-bound long builds - it now has 3 vCPUs as opposed to, on sampling, 8 for x86_64 (up from 2). The happy news is that does improve performance somewhat - CPU-dominated builds are, as expected, significantly faster, bringing down the average. But the long tail is still bad... and the scratch build situation even worse.Don't let this keep you from reading the report though. Or poking at the data yourselves.
This was discussed last week (https://meetbot.fedoraproject.org/meeting_matrix_fedoraproject-org/2026-10-20/fesco.2026-10-20-17.06.log.html). From the tail of the log:
salimma> I agree we should prioritize production builds, but that's also why I floated the "maybe we should decouple the architectures more, especially for scratch builds"
salimma> ok - let's carry on in the ticket then? looks like we have a few questions we need to figure out - a) what is the acceptance criteria, b) how often to reevaluate, and c) what does promotion/demotion look like and how we can make it less painful
zbyszek> the current stats seem totally OK. So we might need to wait until after the next mass rebuild or something else that puts pressure on koji to have a good picture.
I don't think it makes sense to put this on the meeting agenda for today, since there is nothing new.
For what it's worth, prioritizing "real" / non-scratch / "production" builds makes sense, but that already happens, in two ways:
So the two architectures that are most likely to be hit by arch-specific regressions (our only 32-bit arch and our only big-endian arch) are not covered by koschei CI.
I would argue that any new "primary" or "secondary in primary koji" architecture (yes I hate this nomenclature) that we add to Fedora needs to have enough capacity headroom so it can be enabled in koschei.