GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Respect `scaling_reserved_ram` feature flag by nickrolfe · Pull Request #1760 · github/codeql-action

Conversation

@nickrolfe

@nickrolfe nickrolfe commented Jul 7, 2023

Copy link
Copy Markdown
Contributor

The amount of RAM given to the CodeQL evaluator is the machine's total memory size, minus a reserved amount.

Currently, the reserved amount is fixed at 1 GB (or 1.5 GB on Windows). When the scaling_reserved_ram feature flag is enabled, we also add 2% of the total memory size to the reserved amount. This allows for the fact that the kernel will consume more RAM (e.g. for page tables) on machines with more physical RAM, so we should see fewer analyses getting killed by the OOM killer.

N.B. This is my first time working on the Action, or even writing TypeScript. I hope my uses of async/await make sense.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nickrolfe nickrolfe assigned henrymercer Jul 7, 2023
@nickrolfe
nickrolfe requested a review from a team as a code owner July 7, 2023 13:54
henrymercer
henrymercer reviewed Jul 7, 2023
View reviewed changes

@henrymercer henrymercer left a comment

Copy link
Copy Markdown
Contributor

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.

Looks good. It's perhaps a little cautious, but we might want to add an integration test that runs the CodeQL Action with this feature enabled. To do so, we could make a copy of pr-checks/checks/multi-language-autodetect.yml, enable the feature flag via the environment variable, and remove the language autodetection checks.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/util.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer

henrymercer commented Jul 7, 2023

Copy link
Copy Markdown
Contributor

Oh, do add a changelog note too! The one from 24th May is a good example.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

nickrolfe added 2 commits July 7, 2023 16:46
@nickrolfe
Respect scaling_reserved_ram feature flag
f232722
The amount of RAM given to the CodeQL evaluator is the machine's total
memory size, minus a reserved amount. Currently, the reserved amount is
fixed at 1 GB (or 1.5 GB on Windows). When the scaling_reserved_ram
feature flag is enabled, we also add 2% of the total memory size to the
reserved amount. This allows for the fact that the kernel will consume
more RAM (e.g. for page tables) on machines with more physical RAM.
@nickrolfe
Add changenote for scaling_reserved_ram change
28e070c
@nickrolfe
nickrolfe force-pushed the nickrolfe/scaling-memory branch 2 times, most recently from e392b54 to 6b7e394 Compare July 7, 2023 15:57
@nickrolfe
Add integration test for scaling_reserved_ram feature flag
ab9aa50
@nickrolfe
nickrolfe force-pushed the nickrolfe/scaling-memory branch from 6b7e394 to ab9aa50 Compare July 7, 2023 16:01
@nickrolfe

nickrolfe commented Jul 7, 2023

Copy link
Copy Markdown
Contributor Author

I see the new integration test is running with --ram=5769, while the multi-language autodetection test runs with --ram=5769, so I think it's working.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

henrymercer
henrymercer approved these changes Jul 7, 2023
View reviewed changes

@henrymercer henrymercer left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

Excellent! (I think you meant the multi-language autodetection test runs with --ram=5907.)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

angelapwen reacted with laugh emoji
All reactions
  • 😄 1 reaction
@nickrolfe

nickrolfe commented Jul 10, 2023

Copy link
Copy Markdown
Contributor Author

Whoops, yes, that's what I meant.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nickrolfe
nickrolfe merged commit 6a07b2a into main Jul 10, 2023
@nickrolfe
nickrolfe deleted the nickrolfe/scaling-memory branch July 10, 2023 09:25
This was referenced Jul 10, 2023
Merge main into releases/v2 #1764
Closed
Merge main into releases/v2 #1777
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@henrymercer henrymercer henrymercer approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@henrymercer henrymercer

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@nickrolfe @henrymercer
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.