Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Autotune memory#15564

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
jsoref wants to merge1 commit intogithub:main
base:main
Choose a base branch
Loading
fromjsoref:autotune-memory
Open

Autotune memory#15564

jsoref wants to merge1 commit intogithub:mainfromjsoref:autotune-memory

Conversation

jsoref
Copy link
Contributor

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

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 providesomething.

The workflows also had some incorrect dependencies which I'm cleaning up here.

@jsorefjsoref requested review froma team ascode ownersFebruary 9, 2024 05:58
@jsorefjsorefforce-pushed theautotune-memory branch 3 times, most recently fromca40e37 toe25316eCompareFebruary 9, 2024 06:03
Public runners have ~10G of ram available.XL runners have >50G of ram available.It's nice to be able to run tests on publicrunners.Introduce an action that:* (Linux) frees some memory* (Linux) adds some swap* (Linux and macOS) calculates available memory* (Windows) suggests 10G of available memory
Comment on lines +20 to +35
- 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
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

This could be dropped

Comment on lines +65 to +70
- name: Report Available Memory (Windows)
id: memory-windows
if: runner.os == 'Windows'
shell: bash
run: |
echo "available=10240" >> "$GITHUB_OUTPUT"
Copy link
ContributorAuthor

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.

Comment on lines +8 to +10
- .github/workflows/csharp-qltest.yml
- .github/actions/fetch-codeql/action.yml
- .github/actions/cache-query-compilation/action.yml
Copy link
ContributorAuthor

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
Copy link
ContributorAuthor

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
Copy link
ContributorAuthor

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
Copy link
ContributorAuthor

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
Copy link
ContributorAuthor

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:
Copy link
ContributorAuthor

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:
Copy link
ContributorAuthor

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)

@jsorefjsoref mentioned this pull requestFeb 9, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@jsoref

[8]ページ先頭

©2009-2025 Movatter.jp