Skip to content

Conversation

@Hweinstock
Copy link
Contributor

@Hweinstock Hweinstock commented Apr 30, 2025

Problem

Some processes use significantly more cpu/memory than others, so we shouldn't hold them to the same static threshold.
As an example, the language servers are consistently using more memory than the 100 MB threshold.

Based on some experimentation with different sized workspaces, I've noticed that the process running agentic chat uses roughly 80MB-150MB of memory, and the workspace indexing uses 550 - 700 MB memory.

Solution

  • Allow each child process to set a warning threshold, with a default of 100MB of memory.
  • Set the Q LSP threshold to 200 MB, and workspace indexing to 800 MB.
  • This should help to allow these logs to point to real concerns, rather than be noise.

  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Hweinstock Hweinstock changed the base branch from master to feature/hybridChat April 30, 2025 01:57
@github-actions

This comment was marked as off-topic.

@jpinkney-aws jpinkney-aws deleted the branch aws:master May 1, 2025 03:02
@justinmk3 justinmk3 reopened this May 1, 2025
@justinmk3 justinmk3 changed the base branch from feature/hybridChat to master May 1, 2025 13:38
Copy link
Contributor

@jpinkney-aws jpinkney-aws left a comment

Choose a reason for hiding this comment

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

Now we get the benefit of the extension host not messing up our memory/cpu numbers in flare 🎉

executable: executable,
serverModule,
execArgv: argv,
warnThresholds: { memory: memoryWarnThreshold },
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the value here only 200MB because the workspace context part of the language-servers repo isn't doing the indexing? I guess once we fully enable inline through Flare we'd probably have to re-adjust these numbers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Followed up with local indexing team, and it looks like it was disabled in my testing since this requires pulling the indexing server. After enabling its using ~700-800MB so I'll bump this to 1GB to be safe.

@Hweinstock Hweinstock changed the title feat(amazonq): allow child processes to define custom thresholds (WIP) feat(amazonq): allow child processes to define custom thresholds May 2, 2025
@Hweinstock Hweinstock marked this pull request as ready for review May 2, 2025 15:07
@Hweinstock Hweinstock requested review from a team as code owners May 2, 2025 15:07
@Hweinstock Hweinstock merged commit 68a443f into aws:master May 2, 2025
58 of 61 checks passed
@Hweinstock Hweinstock deleted the customThresholds branch May 2, 2025 19:29
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.

3 participants