corrections for sizing suggestions #42

Merged
mi merged 7 commits from sizing-corrections into main 2026-09-09 15:58:09 +02:00
Owner
No description provided.
mi added 2 commits 2026-09-09 15:04:29 +02:00
Three ways the sizing advice asked for hardware nobody needs.

CPU was sized from the per-quarter-hour maxima, so the number it reported was
the highest one-minute run queue inside each quarter hour, and the 95th
percentile of those. A compiler that briefly queues four tasks on a two-thread
machine then read as a demand for five threads. It reads the averages now: the
same machine asks for three, and the waiting share that triggers the advice is
measured the same way.

RAM was advised in visible GiB and in steps of half a GiB, which names sizes
that cannot be ordered. Rounding the visible total up to whole GiB gives the
booked size and, as the difference, the slice the host keeps for itself; the
recommendation is the peak plus headroom plus that reserve, rounded up again.
The verdict still uses the visible total, because that is what can be allocated.

Disk growth was the difference between the first and the last point of the
window, so one step — a build environment unpacked once — became a daily rate
and, over a month, an order for 54 GiB more quota. A trend now needs a week of
history and has to be present in both halves of the window, by least squares;
a step shows a slope in one half only. The advice also names the budget it
means, so raising a group quota is not read as ordering hardware.

The headroom target moves from 70 % to 80 %: with recommendations rounded up
to a bookable size, 30 % headroom plus the rounding bought a whole extra step.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
It sat under the note as a text link, where CPU and RAM have nothing, while
their average sits in the row beside the big number and a disk card leaves
that slot empty. The button moves into that slot as a pale pie-chart glyph,
so all three cards have the same shape.

The build-environments slice also gets a colour of its own: it and 'other'
were both grey and, being the two largest slices on the production host, sat
next to each other in the donut indistinguishable.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
mi added 1 commit 2026-09-09 15:08:03 +02:00
Also redraws the breakdown glyph as a real pie slice: the first attempt was a
circle with two radii and read as the log icon's clock.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
mi added 1 commit 2026-09-09 15:20:56 +02:00
A budget at 81 % was reported as fits, in the same green as one at 20 %, and
said nothing until 90 % turned it red — although the gauges have had a watch
band at 80 % from the start. SizingVerdict.TIGHT fills that gap: the chip reads
'watch, raise to N' in the gauges' amber, and only appears when there is
something to raise.

Disks keep a third of their budget free instead of a fifth: memory pressure
passes, a full filesystem does not. CPU reaches the band by the 95th percentile
of its sustained utilisation, never by its busiest quarter hour — that was the
mistake this PR set out to remove.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
mi added 1 commit 2026-09-09 15:39:02 +02:00
Where the advice was correct, acting on it meant writing a mail to a service
desk and transcribing four numbers by hand.

An 'order…' button next to the sizing chips opens a dialog with one checkbox
per recommended change — raising ticked, shrinking not, because a customer told
they could book less rarely wants to act on it in the same breath — and writes
the ticked ones into a German mail to the service desk, naming the webspace and
the machine. The page composes text and hands it to the user's own mail client;
it sends nothing and talks to no hosting API.

The button appears only where the instance can tell it runs on a Hostsharing
Managed Webspace, which it reads from the shape of its home directory and the
machine's own name. Anywhere else HostingEnvironments.detect answers null and
the page offers nothing.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
mi added 1 commit 2026-09-09 15:48:25 +02:00
That is what availableProcessors reports and what a Managed Webspace is billed
by; the order mail already said CPU-Threads while every chip, gauge and verdict
reason next to it said cores. CapacitySizing.CPU_UNIT is now the one place the
word lives, and it reaches the API as the advice's unit.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
mi added 1 commit 2026-09-09 15:52:36 +02:00
vm4006 is a Container Server, a different product that grows differently and
must not be offered a webspace order. Its home directory does not have the
webspace shape today, but the path alone was the whole test, so a layout that
happened to match would have been enough.

The account name is now checked against the package found in that path: a
Managed Webspace account is always the package itself or the package with a
suffix, mih09 or mih09-werkator, while the container server's account is
tallyman — a name that pattern cannot produce.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
mi merged commit eeb5df8851 into main 2026-09-09 15:58:09 +02:00
mi deleted branch sizing-corrections 2026-09-09 15:58:09 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mi/werkator#42