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
Application | CPU Request | CPU Limit | Memory Request | Memory Limit | Storage |
---|---|---|---|---|---|
Jellyfin | 2 | 4 | 2Gi | 4Gi | 2Ti (media) |
Sonarr | 500m | 1 | 512Mi | 1Gi | 10Gi |
Radarr | 500m | 1 | 512Mi | 1Gi | 10Gi |
Prowlarr | 250m | 500m | 256Mi | 512Mi | 5Gi |
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
-
Hardware Acceleration
devices:
- /dev/dri/renderD128 # Intel QuickSync device -
Storage Performance
- Direct volume mounts for media
- SSD storage class for metadata
- Optimized read patterns
*arr Stack Optimizations
-
Database Performance
- SQLite on SSD storage
- Regular VACUUM scheduling
- Proper journal modes
-
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
-
Library Scan Impact
- Issue: High CPU usage during scans
- Solution: Implemented scheduled scans during off-peak hours
- Status: Managed via CronJob
-
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
-
Transcoding Issues
- Verify GPU access permissions
- Check transcode temporary directory
- Monitor GPU utilization
-
Download Issues
- Validate indexer connectivity
- Check download client settings
- Verify storage permissions
-
Performance Issues
- Review resource utilization
- Check network connectivity
- Validate storage performance