guix: Update storage requirement for HOSTS and added warning for Guix overhead #34638

pull janb84 wants to merge 1 commits into bitcoin:master from janb84:guix-build-update changing 1 files +22 −3
  1. janb84 commented at 3:00 PM on February 20, 2026: contributor

    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:

    <details>

    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

    </details>

    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) :

    <details>

    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%

    </details>

    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.

    <details> <summary> New warning message:</summary>

    Found macOS SDK at '/root/SDK/Xcode-26.1.1-17B100-extracted-SDK-with-libcxx-head
    ers', using...
    
    WARN: Available disk space (42 GiB) may be insufficient for the
          estimated total of 51 GiB (build directories, output,
          and Guix environment overhead).
    
    The build will proceed, but may fail mid-way if disk space runs out.
    
    Checking that we can connect to the guix-daemon...
    

    </details>

    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.

  2. guix: update storage req. for hosts and added warning for Guix overhead b8e9786a58
  3. DrahtBot added the label Build system on Feb 20, 2026
  4. DrahtBot commented at 3:00 PM on February 20, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. janb84 commented at 3:02 PM on February 20, 2026: contributor

    Option how to test/see warnings:

    we need to patch contrib/guix/libexec/prelude.bash so that we can manually set VERSION_BASE

    sed -i 's/VERSION_BASE="${version_base_prefix}${VERSION}"  # TOP/VERSION_BASE="${VERSION_BASE:-${version_base_prefix}${VERSION}}"  # TOP/' contrib/guix/libexec/prelude.bash
    

    Than create a 1 GB testdisk

    truncate -s 1G /tmp/testdisk.img
    
    mkfs.ext4 /tmp/testdisk.img
    
    sudo mkdir -p /mnt/testdisk
    
    sudo mount -o loop /tmp/testdisk.img /mnt/testdisk
    
    sudo chown "$USER" /mnt/testdisk
    
    # Verify df sees it correctly first
    
    df -Pk /mnt/testdisk
    
    

    run guix build to see message of not enough space.

    VERSION_BASE=/mnt/testdisk FORCE_DIRTY_WORKTREE=1 ./contrib/guix/guix-build
    

    clean up

    sudo umount /mnt/testdisk
    rm /tmp/testdisk.img
    

    Than create a 46 GB (42GiB) testdisk

    truncate -s 46G /tmp/testdisk.img
    
    mkfs.ext4 /tmp/testdisk.img
    
    sudo mkdir -p /mnt/testdisk
    
    sudo mount -o loop /tmp/testdisk.img /mnt/testdisk
    
    sudo chown "$USER" /mnt/testdisk
    

    run guix build to see warning of not enough space (build will continue)

    VERSION_BASE=/mnt/testdisk FORCE_DIRTY_WORKTREE=1 ./contrib/guix/guix-build
    

    clean up

    sudo umount /mnt/testdisk
    rm /tmp/testdisk.img
    
  6. chriszeng1010 commented at 6:11 AM on February 21, 2026: none

    There's a Typo here. It should be +5,500,000

    <html> <body> <!--StartFragment--> output dir | 5,500,000 | 0 | +5,500,00 -- | -- | -- | --

    <!--EndFragment-->

    </body> </html>

  7. in contrib/guix/guix-build:181 in b8e9786a58
     179 | +if (( total_required_KiB > avail_KiB )); then
     180 | +    total_required_GiB=$((total_required_KiB / 1048576))
     181 | +    avail_GiB=$((avail_KiB / 1048576))
     182 | +cat << EOF
     183 | +
     184 | +WARN: Available disk space (${avail_GiB} GiB) may be insufficient for the
    


    trevarj commented at 8:33 AM on March 1, 2026:

    I think this is a kind warning, and it may also be worth suggesting somewhere that guix gc can free up a lot of the used space but cause longer builds in the future.


    janb84 commented at 1:27 PM on March 5, 2026:

    Do you have a suggested new text ? I do not want it to be to long, most of the Guix builders are experienced.


    trevarj commented at 1:43 PM on March 5, 2026:

    "Reminder: guix gc can help reclaim space but slow down future builds." "Use guix gc to reclaim space." "You may reclaim space after building with guix gc.

    Maybe one of those appended onto the end? I tried to keep it short.

    most of the Guix builders are experienced.

    True...we need to test them and see if they know how to pronounce "Guix"

  8. janb84 commented at 11:28 AM on April 2, 2026: contributor

    Closed because of lack of interest

  9. janb84 closed this on Apr 2, 2026


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me