From b9e8267cecf353affe45b659973817dec7c2fdbf Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Sun, 16 Jun 2024 01:08:25 +1000 Subject: [PATCH] Speedup Linux CI (#1775) * Speedup Linux CI Use transparent huge page, according to https://kobzol.github.io/rust/rustc/2023/10/21/make-rust-compiler-5percent-faster.html it gives a nice 5% speedup Signed-off-by: Jiahao XU * Fix action.yml Signed-off-by: Jiahao XU --------- Signed-off-by: Jiahao XU --- .github/actions/just-setup/action.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/actions/just-setup/action.yml b/.github/actions/just-setup/action.yml index 6d279257..6ab5176f 100644 --- a/.github/actions/just-setup/action.yml +++ b/.github/actions/just-setup/action.yml @@ -123,3 +123,13 @@ runs: - run: make -v shell: bash + + - name: Enable transparent huge page + if: runner.os == 'Linux' + run: echo madvise | sudo tee /sys/kernel/mm/transparent_hugepage/enabled + shell: bash + + - name: Configure jemalloc (used by rustc) to use transparent huge page + if: runner.os == 'Linux' + run: echo "MALLOC_CONF=thp:always,metadata_thp:always" >> "$GITHUB_ENV" + shell: bash