This is an alternative to #33889
The lasttime the storage requirements were updated is 4 years ago in #22075 and do not match the current needs of a Guix build. This PR updates the storage requirements to align with recent builds.
The current code is quite off for certain hosts (the total equals out overall), but the check also ignores the output directory which takes up an additional 5 GiB of disk space:
Comparing real usage against the script’s estimates:
| Host | Real KiB | Estimate KiB | Delta |
|---|---|---|---|
aarch64-linux-gnu |
3,875,896 | 6,400,000 | -2,524,104 |
arm-linux-gnueabihf |
2,983,008 | 6,400,000 | -3,416,992 |
riscv64-linux-gnu |
5,712,668 | 6,400,000 | -687,332 |
x86_64-linux-gnu |
3,978,648 | 6,400,000 | -2,421,352 |
powerpc64-linux-gnu |
4,026,948 | 6,400,000 | -2,373,052 |
x86_64-w64-mingw32 |
8,022,644 | 7,600,000 | +422,644 |
x86_64-apple-darwin |
2,714,848 | 440,000 | +2,274,848 |
arm64-apple-darwin |
2,659,824 | 440,000 | +2,219,824 |
output dir |
5,500,000 | 0 | +5,500,000 |
This PR makes the following changes:
- Updates the required KiB per category to current needs + 10% margin
- it adds an extra category for
riscv64(was way off * category ) - adds output directory storage requirements
This all totals to 42 GiB (using all hosts) :
Output for #34550 on Guix 1.5.0
| Host | Real KiB | Estimate | Margin |
|---|---|---|---|
aarch64-linux-gnu |
~3,880,000 | 4,400,000 | +13% |
arm-linux-gnueabihf |
~3,041,000 | 4,400,000 | +45% |
powerpc64-linux-gnu |
~4,089,000 | 4,400,000 | +8% |
x86_64-linux-gnu |
~3,985,000 | 4,400,000 | +10% |
riscv64-linux-gnu |
~5,767,000 | 6,300,000 | +9% |
x86_64-w64-mingw32 |
~8,074,000 | 9,000,000 | +11% |
x86_64-apple-darwin |
~2,726,000 | 3,000,000 | +10% |
arm64-apple-darwin |
~2,726,000 | 3,000,000 | +10% |
| output | ~4,929,000 | 5,500,000 | +10% |
Output for #34627 on Guix 1.4.0
| Host | Real KiB | Estimate | Margin |
|---|---|---|---|
aarch64-linux-gnu |
~3,934,232 | 4,400,000 | +12% |
arm-linux-gnueabihf |
~3,040,552 | 4,400,000 | +45% |
powerpc64-linux-gnu |
~4,084,480 | 4,400,000 | +8% |
x86_64-linux-gnu |
~4,036,900 | 4,400,000 | +9% |
riscv64-linux-gnu |
~5,764,512 | 6,300,000 | +9% |
x86_64-w64-mingw32 |
~8,087,164 | 9,000,000 | +11% |
x86_64-apple-darwin |
~2,762,992 | 3,000,000 | +9% |
arm64-apple-darwin |
~2,707,800 | 3,000,000 | +11% |
| output | ~5,048,228 | 5,500,000 | +9% |
Additionally, maybe more controversial (happy to drop), I’ve added a second check to warm users if they do not have enough free space to store the guix overhead (/gnu store) which is an additional 8,7 GiB. This check only warns and does not stop the build.
0Found macOS SDK at '/root/SDK/Xcode-26.1.1-17B100-extracted-SDK-with-libcxx-head
1ers', using...
2
3WARN: Available disk space (42 GiB) may be insufficient for the
4 estimated total of 51 GiB (build directories, output,
5 and Guix environment overhead).
6
7The build will proceed, but may fail mid-way if disk space runs out.
8
9Checking that we can connect to the guix-daemon...
NB. Could not find a good reason for the change in disk usage, even older V29 build take up roughly the same size as recent builds.