Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/actions/tune-runner-vm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Tune Runner VM
description: |
Fine tunes the GitHub Runner VM operation system for Trino builds.
The tuning currently includes a workaround for
"Reverse name lookup is broken for current hostname in ubuntu-latest VMs",
reported as https://github.com/actions/virtual-environments/issues/3185

runs:
using: composite
steps:
- run: |
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
# Ensure that reverse lookups for current hostname are handled properly
# Add the current IP address, long hostname and short hostname record to /etc/hosts file
Comment thread
findepi marked this conversation as resolved.
eth0_ip_addr=$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)
hostname_fqdn=$(hostname -f)
hostname_short=$(hostname -s)
echo -e "${eth0_ip_addr}\t${hostname_fqdn} ${hostname_short}" | sudo tee -a /etc/hosts
fi
shell: bash
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
sudo apt-get clean
df -h
- uses: actions/checkout@v2
- uses: ./.github/actions/tune-runner-vm
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please apply this only for phoenix job.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does a "the phoenix job" mean? I think it makes sense to apply the configuration to all jobs since there's no harm in doing that.

The intention of "tune-runner-vm" action is to be able to add tuning for GitHub Actions Runner VMs. After the reverse name lookup problem has been fixed in GitHub, it might be able to leave the tune-runner-vm action in place, but just make it a no-op in case some other optimizations are added later.

Some useful tuning to do in tune-runner-vm is to adjust other Linux kernel settings such as vm.swappiness or THP settings, for example:

          echo 1 | sudo tee /proc/sys/vm/swappiness
          echo madvise | sudo tee /sys/kernel/mm/transparent_hugepage/enabled

Depending on the type of builds, these might be useful.

- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}
Expand All @@ -54,6 +55,7 @@ jobs:
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/tune-runner-vm
- uses: actions/setup-java@v1
with:
java-version: 11
Expand All @@ -75,6 +77,7 @@ jobs:
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/tune-runner-vm
- name: Web UI Checks
run: core/trino-main/bin/check_webui.sh

Expand All @@ -85,6 +88,7 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # checkout tags so version in Manifest is set properly
- uses: ./.github/actions/tune-runner-vm
- uses: actions/setup-java@v1
with:
java-version: 11
Expand All @@ -110,6 +114,7 @@ jobs:
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/tune-runner-vm
- uses: actions/setup-java@v1
with:
java-version: 11
Expand Down Expand Up @@ -198,6 +203,7 @@ jobs:
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/tune-runner-vm
- uses: actions/setup-java@v1
with:
java-version: 11
Expand Down Expand Up @@ -249,6 +255,7 @@ jobs:
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/tune-runner-vm
- uses: actions/setup-java@v1
with:
java-version: 11
Expand All @@ -264,6 +271,7 @@ jobs:
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/tune-runner-vm
- uses: actions/setup-java@v1
with:
java-version: 11
Expand All @@ -287,6 +295,7 @@ jobs:
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/tune-runner-vm
- uses: actions/setup-java@v1
with:
java-version: 11
Expand Down Expand Up @@ -382,6 +391,7 @@ jobs:
timeout-minutes: 140
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/tune-runner-vm
- uses: actions/setup-java@v1
with:
java-version: 11
Expand Down