Skip to content

feat: Architect Ultimate Optimized Media Server Stack#141

Merged
Cylae merged 1 commit intoserver-setup-scriptfrom
optimize-architecture-2013321457317385928
Jan 27, 2026
Merged

feat: Architect Ultimate Optimized Media Server Stack#141
Cylae merged 1 commit intoserver-setup-scriptfrom
optimize-architecture-2013321457317385928

Conversation

@Cylae
Copy link
Owner

@Cylae Cylae commented Jan 27, 2026

This PR implements the "Ultimate Optimized Media Server Stack" architecture.
Key changes:

  1. Global Dynamic Hardware Detection:
    • apply_optimizations in system.rs now dynamically checks RAM to set vm.swappiness (1 for >16GB, 10 otherwise) and other performance sysctls (vm.dirty_ratio, net.core.somaxconn).
  2. Resource Management:
    • Added resources method to the Service trait.
    • Implemented specific memory limits for memory-hungry services (MariaDB, Arrs, Plex) tailored to the HardwareProfile (Low/Standard/High).
    • MariaDB now scales from 512MB (Low) to 4GB (High).
    • Redis and Arr apps have safety caps to prevent OOM.
  3. Logging Standardization:
    • Added logging method to Service trait with sensible defaults (json-file, 10m size, 3 files).
  4. Docker Compose Generation:
    • build_compose_structure now injects deploy.resources and logging configuration into the generated YAML.
  5. Testing:
    • Added integration tests to verify that resource limits are correctly generated in the compose file.

PR created automatically by Jules for task 2013321457317385928 started by @Cylae

- Enhanced `HardwareInfo` detection and utilized it for dynamic `sysctl` tuning (swappiness, dirty ratios).
- Updated `Service` trait to include `resources()` and `logging()` methods.
- Implemented `ResourceConfig` limits for `MariaDB`, `Redis`, `Sonarr`, `Radarr`, `Plex`, `Tautulli`, `Overseerr` based on `HardwareProfile`.
- Updated `build_compose_structure` to generate `deploy.resources` and `logging` blocks in `docker-compose.yml`.
- Verified with integration tests ensuring correct resource allocation (e.g. MariaDB gets 4G on High profile).

Co-authored-by: Cylae <13425054+Cylae@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@Cylae Cylae merged commit 85a6322 into server-setup-script Jan 27, 2026
1 check failed
@Cylae Cylae deleted the optimize-architecture-2013321457317385928 branch January 27, 2026 21:03
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