Skip to content

fix: correct RAM overhead calculation and remove redundant assignment#444

Open
Devqo wants to merge 1 commit into
Haidra-Org:mainfrom
Devqo:fix/ram-overhead-miscalculation
Open

fix: correct RAM overhead calculation and remove redundant assignment#444
Devqo wants to merge 1 commit into
Haidra-Org:mainfrom
Devqo:fix/ram-overhead-miscalculation

Conversation

@Devqo
Copy link
Copy Markdown

@Devqo Devqo commented May 10, 2026

HordeWorkerProcessManager.__init__ contained two issues in the initialization of self.target_ram_overhead_bytes:

  1. A redundant assignment that was immediately overwritten on the next line
  2. A missing unit multiplier, the value was capped at 9 (bytes) instead of the intended target_ram_overhead_bytes (9 GB by default), introduced as a regression in 31d86e6a

This fix preserves the user-configured limit while ensuring it never exceeds 50% of total RAM.

Notes:

  • target_ram_bytes_used (the property consuming this value) currently has no callers, so this is a non-breaking cleanup. The fix prevents incorrect near-zero headroom if memory enforcement is wired up in future.
  • Pre-commit hooks passed. mypy skipped, project has pre-existing missing stubs for psutil unrelated to this change.

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.

1 participant