Skip to content

[None][feat] support calling gc.freeze#13907

Closed
ixlmar wants to merge 1 commit intoNVIDIA:mainfrom
ixlmar:feat/gc-freeze
Closed

[None][feat] support calling gc.freeze#13907
ixlmar wants to merge 1 commit intoNVIDIA:mainfrom
ixlmar:feat/gc-freeze

Conversation

@ixlmar
Copy link
Copy Markdown
Collaborator

@ixlmar ixlmar commented May 8, 2026

Description

Adds LlmArgs.garbage_collection_freeze_after_init option (for LLM worker) and TRTLLM_SERVER_FREEZE_GC environment variable (for trtllm-serve process). These settings enable the invocation of gc.freeze upon startup, which avoids latency spikes caused by repeated attempts to garbage collect long-lived resources. The tradeoff here is that all objects alive at the time of the gc.freeze call will be excluded from garbage collection, such that the resources associated with any objects that are abandoned later on (e.g. buffers which are replaced by larger buffers) will effectively leak. However, such leakage remains bounded.

Test Coverage

n/a (beta)

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

To see a list of available CI bot commands, please comment /bot help.

@ixlmar ixlmar requested review from Funatiq and dcampora May 8, 2026 12:50
@ixlmar
Copy link
Copy Markdown
Collaborator Author

ixlmar commented May 8, 2026

/bot run

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #47400 [ run ] triggered by Bot. Commit: eab4b88 Link to invocation

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #47400 [ run ] completed with state SUCCESS. Commit: eab4b88
/LLM/main/L0_MergeRequest_PR pipeline #37330 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

Signed-off-by: ixlmar <206748156+ixlmar@users.noreply.github.com>
@ixlmar ixlmar force-pushed the feat/gc-freeze branch from eab4b88 to c2ea319 Compare May 8, 2026 14:46
@ixlmar
Copy link
Copy Markdown
Collaborator Author

ixlmar commented May 8, 2026

Change provides no performance advantage over #13910.

@ixlmar ixlmar closed this May 8, 2026
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