Skip to main content

Media Services Stack

This document details our self-hosted media services stack, including configuration, resource allocation, and best practices.

Core Applications

Jellyfin

  • Purpose: Primary media streaming server
  • Version: Latest stable release
  • Features:
    • Hardware-accelerated transcoding (Intel QuickSync)
    • Direct play optimization
    • Multi-user support
    • HDR tone mapping

Management Suite (*arr Stack)

Sonarr

  • Purpose: TV series management and automation
  • Version: Latest v4 release
  • Key Features:
    • Series monitoring
    • Release quality profiles
    • Automated download management

Radarr

  • Purpose: Movie collection management
  • Version: Latest v4 release
  • Key Features:
    • Movie monitoring
    • Quality profiles
    • Custom formats support

Prowlarr

  • Purpose: Unified indexer management
  • Version: Latest stable release
  • Features:
    • Centralized indexer configuration
    • Integration with *arr applications
    • Stats and history tracking

Infrastructure Configuration

Storage Layout

Storage Classes:
media-storage: # For media files
type: Longhorn
replication: 1
size: 2Ti
metadata-storage: # For application data
type: Longhorn
replication: 2
size: 100Gi

Resource Allocation

ApplicationCPU RequestCPU LimitMemory RequestMemory LimitStorage
Jellyfin242Gi4Gi2Ti (media)
Sonarr500m1512Mi1Gi10Gi
Radarr500m1512Mi1Gi10Gi
Prowlarr250m500m256Mi512Mi5Gi

Network Configuration

  • Internal Access: Via Cilium ClusterIP services
  • External Access: Through Cilium Gateway API
  • Authentication: Integrated with Authentik SSO
  • Security: Zero-trust model with explicit policy

Performance Optimizations

Jellyfin Optimizations

  1. Hardware Acceleration

    devices:
    - /dev/dri/renderD128 # Intel QuickSync device
  2. Storage Performance

    • Direct volume mounts for media
    • SSD storage class for metadata
    • Optimized read patterns

*arr Stack Optimizations

  1. Database Performance

    • SQLite on SSD storage
    • Regular VACUUM scheduling
    • Proper journal modes
  2. Network Performance

    • Keep-alive connections
    • Efficient API polling
    • Scheduled tasks distribution

Monitoring & Maintenance

Key Metrics

  • Transcode queue length
  • Storage utilization
  • Network throughput
  • API response times

Alerts Configuration

alerts:
storage:
threshold: 85%
warning: 75%
transcoding:
queue_length: >10
duration: >30m

Known Issues & Solutions

  1. Library Scan Impact

    • Issue: High CPU usage during scans
    • Solution: Implemented scheduled scans during off-peak hours
    • Status: Managed via CronJob
  2. Database Performance

    • Issue: SQLite contention under load
    • Solution: Moved to SSD storage, optimized vacuum schedule
    • Status: Monitoring via Prometheus

Roadmap

  • Integration with Home Assistant for automation
  • Implementation of cross-node GPU sharing
  • Enhanced metadata caching layer
  • Backup strategy improvements

Troubleshooting Guide

  1. Transcoding Issues

    • Verify GPU access permissions
    • Check transcode temporary directory
    • Monitor GPU utilization
  2. Download Issues

    • Validate indexer connectivity
    • Check download client settings
    • Verify storage permissions
  3. Performance Issues

    • Review resource utilization
    • Check network connectivity
    • Validate storage performance