Skip to content
This repository was archived by the owner on Apr 11, 2026. It is now read-only.

Latest commit

 

History

History
166 lines (124 loc) · 4.66 KB

File metadata and controls

166 lines (124 loc) · 4.66 KB
title Video Processing
description Configure video processing workers, retries, and cleanup settings

Parameter Reference

Quick reference for all available video processing parameters:

Parameter Description
VIDEO_MAX_CONCURRENT Maximum concurrent video jobs
VIDEO_JOB_RETRY_MAX Maximum retry attempts
VIDEO_JOB_CLEANUP_HOURS Job cleanup time
VIDEO_WORKER_POLL_INTERVAL_MS Worker polling interval

Core Parameters

Maximum number of video jobs processed simultaneously.

Auto-detection:

  • Automatically detected based on available RAM (1 worker per 2GB)
  • Maximum: 16 workers

Examples:

  • 4 - 4 concurrent jobs (default for 8GB RAM)
  • 8 - 8 concurrent jobs (for 16GB RAM)
  • 2 - 2 concurrent jobs (for resource-constrained environments)
  • 16 - Maximum concurrent jobs
If not set, the system auto-detects based on available RAM. Manual configuration overrides auto-detection. Higher values increase CPU and memory usage. Monitor system resources when adjusting.

Maximum number of retry attempts for failed video jobs.

Examples:

  • 3 - Default (3 retry attempts)
  • 5 - More retries for unreliable networks
  • 1 - Single retry for faster failure detection
  • 0 - No retries (not recommended)
Each retry attempts to reprocess the failed video job. Failed jobs are cleaned up after the cleanup period.

Number of hours after which completed or failed jobs are cleaned up from the database.

Examples:

  • 24 - Clean up after 1 day (default)
  • 48 - Keep jobs for 2 days
  • 168 - Keep jobs for 1 week
  • 1 - Clean up after 1 hour (aggressive cleanup)
Adjust based on your monitoring needs. Longer retention helps with debugging but increases database size.

Interval in milliseconds at which the worker polls for new video jobs.

Examples:

  • 1000 - Poll every 1 second (default)
  • 500 - Poll every 500ms (faster job pickup)
  • 2000 - Poll every 2 seconds (reduces CPU usage)
  • 5000 - Poll every 5 seconds (lower resource usage)
Lower intervals provide faster job processing but increase CPU usage. Higher intervals reduce CPU but add latency.

Configuration Examples

VIDEO_MAX_CONCURRENT=2
VIDEO_JOB_RETRY_MAX=3
VIDEO_JOB_CLEANUP_HOURS=1
VIDEO_WORKER_POLL_INTERVAL_MS=1000

Development configuration with lower concurrency and faster cleanup.

VIDEO_MAX_CONCURRENT=8
VIDEO_JOB_RETRY_MAX=5
VIDEO_JOB_CLEANUP_HOURS=48
VIDEO_WORKER_POLL_INTERVAL_MS=500

High-performance production setup with more workers and faster polling.

VIDEO_MAX_CONCURRENT=1
VIDEO_JOB_RETRY_MAX=2
VIDEO_JOB_CLEANUP_HOURS=12
VIDEO_WORKER_POLL_INTERVAL_MS=2000

Configuration for environments with limited CPU or memory.

# VIDEO_MAX_CONCURRENT not set - auto-detected
VIDEO_JOB_RETRY_MAX=3
VIDEO_JOB_CLEANUP_HOURS=24
VIDEO_WORKER_POLL_INTERVAL_MS=1000

Let the system auto-detect optimal concurrency based on available RAM.

Performance Considerations

Balance `VIDEO_MAX_CONCURRENT` with available CPU cores and RAM. Each worker uses significant resources. Set `VIDEO_JOB_RETRY_MAX` based on network reliability and job criticality. Adjust `VIDEO_JOB_CLEANUP_HOURS` to balance database size and debugging needs. Lower `VIDEO_WORKER_POLL_INTERVAL_MS` for faster processing, higher for reduced CPU usage. Video processing is resource-intensive. Monitor CPU, memory, and disk I/O when adjusting these parameters. Start with default values and tune based on your specific workload.