-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Autotune memory #15564
base: main
Are you sure you want to change the base?
Autotune memory #15564
Conversation
ca40e37
to
e25316e
Compare
Public runners have ~10G of ram available. XL runners have >50G of ram available. It's nice to be able to run tests on public runners. Introduce an action that: * (Linux) frees some memory * (Linux) adds some swap * (Linux and macOS) calculates available memory * (Windows) suggests 10G of available memory
e25316e
to
b1c137c
Compare
- name: Stop services | ||
if: env.RUNNER_OS == 'Linux' | ||
shell: bash | ||
run: | | ||
sudo systemctl disable php8.1-fpm mono-xsp4 walinuxagent multipathd walinuxagent chrony cron getty@tty1 networkd-dispatcher rsyslog serial-getty@ttyS0 snapd multipathd.socket snapd.socket | ||
sudo systemctl stop php8.1-fpm mono-xsp4 walinuxagent multipathd walinuxagent chrony cron getty@tty1 networkd-dispatcher rsyslog serial-getty@ttyS0 snapd | ||
sudo killall mono | ||
|
||
- name: enable swap | ||
if: env.RUNNER_OS == 'Linux' | ||
shell: bash | ||
run: | | ||
sudo fallocate -l 10G /mnt/big-swapfile | ||
sudo chmod 600 /mnt/big-swapfile | ||
sudo mkswap /mnt/big-swapfile | ||
sudo swapon /mnt/big-swapfile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be dropped
- name: Report Available Memory (Windows) | ||
id: memory-windows | ||
if: runner.os == 'Windows' | ||
shell: bash | ||
run: | | ||
echo "available=10240" >> "$GITHUB_OUTPUT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As noted, there doesn't appear to be a consumer for this at this time, but having at least a stub implementation seemed better than nothing.
- .github/workflows/csharp-qltest.yml | ||
- .github/actions/fetch-codeql/action.yml | ||
- .github/actions/cache-query-compilation/action.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these two are used but weren't checked
@@ -16,6 +19,8 @@ on: | |||
- "shared/**" | |||
- .github/workflows/csharp-qltest.yml | |||
- .github/actions/fetch-codeql/action.yml | |||
- .github/actions/cache-query-compilation/action.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only one was missing here...
- .github/workflows/ruby-build.yml | ||
- .github/workflows/ruby-qltest.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bad copy paste?
- .github/actions/fetch-codeql/action.yml | ||
- .github/actions/cache-query-compilation/action.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used but not checked
- .github/actions/fetch-codeql/action.yml | ||
- .github/actions/cache-query-compilation/action.yml | ||
- .github/actions/reasonable-memory/action.yml | ||
- csharp/actions/create-extractor-pack/action.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is amusing -- it probably should be moved to .github/actions -- the idea that ruby is using a csharp action is pretty confusing.
- codeql-workspace.yml | ||
branches: | ||
- main | ||
- "rc/*" | ||
workflow_dispatch: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's really handy to be able to test these workflows (especially given that they have branch constraints that prevent normal testing)
@@ -32,6 +32,7 @@ on: | |||
- main | |||
- rc/* | |||
- codeql-cli-* | |||
workflow_dispatch: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's really handy to be able to test these workflows (especially given that they have branch constraints that prevent normal testing)
Public runners have ~10G of ram available.
XL runners have >50G of ram available.
It's nice to be able to run tests on public
runners.
Introduce an action that:
https://docs.github.com/en/code-security/codeql-cli/codeql-cli-manual/test-run#-m---rammb
This addresses #15471 (comment)
Note that the shooting services isn't strictly necessary and could easily be omitted.
Afaict, Windows isn't actually used, but it seemed to make sense to at least provide something.
The workflows also had some incorrect dependencies which I'm cleaning up here.