Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set GHA runner max heap size dynamically based upon runner hardware #1165

Merged
merged 2 commits into from
Feb 6, 2024

Conversation

RBusarow
Copy link
Collaborator

@RBusarow RBusarow commented Feb 2, 2024

Before this change, we set the max heap size based upon runner OS. That worked well enough, since we only used the free GitHub-hosted runners with well-known hardware.

Now that we have two different Ubuntu runner sizes, that old strategy is leaving free memory on the table.

@RBusarow RBusarow requested review from zach-klippenstein and a team as code owners February 2, 2024 19:25
;;
Windows)
jvmArgs="-Xmx3g -XX:MaxMetaspaceSize=756m $jvmArgs"
# Fetch and parse memory in MB, then convert to GB
Copy link
Contributor

Choose a reason for hiding this comment

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

Wow, are you actually set up to test this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ChatGPT was kind enough to show me how to do this. It does seem to work, but I do not take credit. :)

@RBusarow RBusarow enabled auto-merge February 6, 2024 20:13
@RBusarow RBusarow force-pushed the rick/dynamic-github-action-runner-memory branch from a837ccc to 09c9cda Compare February 6, 2024 20:13
RBusarow and others added 2 commits February 6, 2024 15:01
Before this change, we set the max heap size based upon runner OS.
That worked well enough, since we only used the free GitHub-hosted runners with well-known hardware.

Now that we have two different Ubuntu runner sizes, that older strategy is leaving free memory on the table.
@RBusarow RBusarow force-pushed the rick/dynamic-github-action-runner-memory branch from 09c9cda to ee46891 Compare February 6, 2024 21:01
@RBusarow RBusarow merged commit d31c843 into main Feb 6, 2024
32 checks passed
@RBusarow RBusarow deleted the rick/dynamic-github-action-runner-memory branch February 6, 2024 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants