Relax 'Maximum' buffer tier to 7GB RAM#4268
Merged
Merged
Conversation
The Maximum buffer preset (and its auto-default) required exactly 8GB of RAM, so machines marketed as 8GB that report slightly less - integrated GPUs carve out shared memory, container runtimes report their cgroup limit - silently dropped to the Balanced tier. Lower the threshold to 7GB while keeping the 4GB Balanced minimum intact.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the Streams controller’s RAM-gated buffer preset thresholds so that hosts reporting slightly under “8GB” (e.g., due to shared GPU memory or cgroup limits) still qualify for the Maximum buffer tier, and it updates the related tests and inline documentation accordingly.
Changes:
- Lower the Minimum RAM threshold for Maximum buffer preset from 8GB to 7GB.
- Introduce named constants (
BALANCED_MIN_RAM_GB,MAXIMUM_MIN_RAM_GB) to replace repeated magic numbers. - Extend the buffer-size gating tests with boundary cases around the new 7GB cutoff.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
music_assistant/controllers/streams/constants.py |
Adds RAM threshold constants and applies the new 7GB cutoff to available presets and default selection logic. |
music_assistant/controllers/streams/controller.py |
Updates the config-entry comment to reflect the new Maximum RAM threshold. |
tests/controllers/streams/test_buffer_size.py |
Adds new boundary test cases validating the updated RAM gating behavior for available buffer presets. |
marcelveldt
added a commit
that referenced
this pull request
Jun 17, 2026
(cherry picked from commit 139c4b7)
marcelveldt
added a commit
that referenced
this pull request
Jun 17, 2026
(cherry picked from commit 139c4b7)
15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this implement/fix?
Follow-up to #4249. The Maximum buffer preset (and the auto-selected default) required exactly 8GB of RAM. Machines marketed as "8GB" frequently report a little less — integrated GPUs carve out shared system memory (e.g. a real 7.7GB), and container runtimes report their cgroup limit — so they silently dropped to the Balanced tier and never got the largest buffer.
BALANCED_MIN_RAM_GB/MAXIMUM_MIN_RAM_GBconstants and extend the buffer-tier test with the boundary cases (6.9 → Balanced, 7.0 / 7.7 → Maximum).Related issue (if applicable):
Types of changes
bugfixnew-featureenhancementnew-providerbreaking-changerefactordocumentationmaintenancecidependenciesChecklist
pre-commit run --all-filespasses.pytestpasses, and tests have been added/updated undertests/where applicable.music-assistant/modelsis linked.music-assistant/frontendis linked.