From 83138efcba14c59a3cc3232e0fbfd9f455e14b4c Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Thu, 26 Mar 2026 18:14:25 -0700 Subject: [PATCH 1/2] adjust swap to 8gb --- .github/workflows/build.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 97ab2b2f0..2908a4a80 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -158,6 +158,19 @@ jobs: with: enable-cache: true + - name: Add extra swap for release build + if: inputs.build_mode == 'release' + run: | + set -euxo pipefail + sudo swapoff -a || true + sudo rm -f /swapfile + sudo fallocate -l 8G /swapfile || sudo dd if=/dev/zero of=/swapfile bs=1M count=8192 + sudo chmod 600 /swapfile + sudo mkswap /swapfile + sudo swapon /swapfile + free -h + swapon --show + - name: Build (release mode) uses: PyO3/maturin-action@v1 if: inputs.build_mode == 'release' @@ -232,7 +245,7 @@ jobs: set -euxo pipefail sudo swapoff -a || true sudo rm -f /swapfile - sudo fallocate -l 16G /swapfile || sudo dd if=/dev/zero of=/swapfile bs=1M count=16384 + sudo fallocate -l 8G /swapfile || sudo dd if=/dev/zero of=/swapfile bs=1M count=8192 sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile From 634e32d99bd61d49269d09f249f0b8681b80cd9e Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Thu, 26 Mar 2026 18:14:52 -0700 Subject: [PATCH 2/2] modify profile.release --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fd8b7c7c7..d69d5ffa7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -64,8 +64,8 @@ pyo3-build-config = "0.28" datafusion-python-util = { path = "crates/util" } [profile.release] -lto = true -codegen-units = 1 +lto = "thin" +codegen-units = 2 # We cannot publish to crates.io with any patches in the below section. Developers # must remove any entries in this section before creating a release candidate.