Skip to main content

Framework Comparison (PostgreSQL)

Reproducible throughput, latency, resource footprint, and correctness benchmarks comparing JobMaster (0.0.12-alpha), TickerQ (10.4.0), Hangfire (1.8.25), and Quartz.NET (4.8.1).

All runs were executed on dedicated AWS m6id instances with local NVMe SSD (/var/lib/docker), strict per-container CPU and memory limits, and full warmup. Every single run finished with 0 failed schedule requests, 0 lost jobs, and 0 duplicate executions.

tip

See Benchmark Methodology for how scheduling throughput, end-to-end throughput, latency, and CPU are measured. The benchmark harness and all raw run artifacts are open source in bg-scheduler-benchmark. For JobMaster's other storage providers and distributed NATS JetStream results, see JobMaster Storage Comparison.

note

SQL Server results are not included here because SQL Server's license terms require Microsoft's prior written approval before publishing benchmark numbers.

Test Setup​

Why PostgreSQL for the Framework Comparison?​

All four frameworks run against the exact same PostgreSQL 18 server (6 CPU / 16 GB RAM). PostgreSQL is the common production-grade relational database supported cleanly across JobMaster, TickerQ, Hangfire, and Quartz.NET, making it the fairest apples-to-apples baseline.

  • Workers: 2 CPU / 4 GB per worker container, --db-pool-size 25, --schedule-concurrency 32 (up to 32 jobs scheduled in parallel per worker).
  • Fair concurrency baseline: Every framework is capped at 10 concurrent jobs per worker (--job-concurrency 10).
  • Ingestion API parity: All four hosts share the same scheduling endpoint loop and invoke each framework's idiomatic single-job API per job (OnceNowAsync in JobMaster, AddAsync in TickerQ, Enqueue in Hangfire, ScheduleJob in Quartz.NET); no framework uses a custom bulk-insert shortcut in the harness.

1. Horizontal Scaling: Regular Background Jobs​

This test simulates regular background jobs taking 300–750 ms each (such as calling an external API, sending an email or webhook, or running a database write) arriving in sudden spikes:

  • Load pattern: 5 bursts fired at 5-second intervals of 5,000 jobs each (25,000 jobs total). Every burst is split into parallel HTTP requests across all worker containers (3 requests per worker, from ~334 jobs per HTTP request at 5w to ~42 jobs per request at 40w), and each worker schedules jobs concurrently (up to 32 in parallel).
  • What we measure: Both scheduling throughput (how many jobs per second the system ingests) and end-to-end completion throughput (how many jobs per second finish completely) as we scale from 5 to 40 workers against the same single PostgreSQL server.
  • The single-DB trade-off: Because all workers share one database, adding workers increases how many jobs execute and complete per second, but more workers also poll and write to that same database, which reduces scheduling throughput.
  • What's compared: JobMaster, TickerQ, Hangfire, and Quartz.NET all capped at 10 concurrent jobs per worker. At 40w, we also plot JobMaster (30 slots per worker)* as an extra reference bar: it runs on the exact same hardware resources (6 CPU / 16 GB PostgreSQL and 2 CPU / 4 GB workers), using a different JobMaster configuration (30 concurrent jobs per execution worker, 3× the 10-slot baseline, with 2 Coordinator+Drain + 38 Execution split roles). It is marked with * because the concurrency setup is not aligned with the 10-slot baseline, showing how JobMaster can raise execution throughput on the same hardware without sacrificing scheduling.
Horizontal Scaling on PostgreSQL — Regular Jobs (5x5,000 bursts)Horizontal Scaling on PostgreSQL — Regular Jobs (5x5,000 bursts)

Key takeaways​

  • JobMaster leads scheduling at every scale: 16,491/s at 5w (4.2× TickerQ, 7.3× Hangfire, 32× Quartz.NET) and still 6,987/s at 40w (2.7× TickerQ, 209× Hangfire, 304× Quartz.NET) with sub-second schedule request latency (646 ms p50).
  • JobMaster execution overhead at 10 slots (SavePending buffer & bucket pipeline): Because JobMaster routes immediate jobs through its decoupled SavePending buffer and bucket dispatch pipeline rather than claiming rows directly off a single table, its per-slot execution rate is slower on short 300–750 ms bursts (41.8/s at 5w up to 311.2/s at 40w at 10 slots per worker).
  • TickerQ leads 10-slot end-to-end throughput on short bursts: TickerQ dispatches directly from its Postgres table with minimal pipeline delay, reaching 632/s E2E at 40w (39.6 s total), while driving PostgreSQL to 372% CPU and workers to 25.5% CPU.
  • Hangfire and Quartz.NET collapse past 15 workers: Both scale smoothly from 5w to 15w, then hit severe PostgreSQL lock contention at 30w and 40w, dropping to 33/s and 23/s scheduling (768 s and 1,165 s total completion time).
  • Same hardware, 3× worker capacity (JobMaster (30 slots per worker)*): Because JobMaster's 10-slot run barely touches worker CPU (4.1%) and leaves DB headroom (236%), configuring 3× worker capacity (ParallelismFactor = 6, where 1 bucket × 5 base slots × 6 = 30 slots per worker, with 2 Coordinator+Drain + 38 Execution containers) on the exact same database and worker hardware scales JobMaster's end-to-end throughput from 311.2/s to 628/s (80.3 s down to 39.8 s) while still scheduling at 5,754/s and using only 9.4% worker CPU.

Full tables (p50/p99 latency, request latency, completion milestones): Regular Background Jobs metrics

2. Resource Efficiency (Database & Worker CPU)​

Resource Footprint on PostgreSQL — Regular Jobs (5x5,000 bursts)Resource Footprint on PostgreSQL — Regular Jobs (5x5,000 bursts)

Key takeaways​

  • Lowest steady footprint at 10 slots per worker: Across all 4 worker counts, JobMaster uses the lowest PostgreSQL CPU of any non-stalled framework (20.3% → 236.3%) and remarkably low worker CPU (2.7% → 4.1% out of 200% per container).
  • Why Hangfire and Quartz CPU drop at 30–40w: Their lower CPU bars at 30w and 40w are not efficiency; workers spend most of the 5–19 minute run blocked waiting on PostgreSQL row/table locks.
  • Why JobMaster can host 30 slots per worker on the same hardware: With 9.4% worker CPU even at 30 concurrent slots per worker (1,140 active slots across 38 execution pods), JobMaster still uses less than 37% of TickerQ's per-worker CPU (25.5%).

3. Long-Running Jobs​

Simulates long-running background jobs taking 2–5 seconds each (e.g., report generation, media processing, slow third-party APIs): 5 bursts at 5-second intervals of 2,000 jobs (10,000 jobs total), split across 3 parallel HTTP requests per worker (~67 jobs/request at 10w, ~23 jobs/request at 30w) on the same 6 CPU / 16 GB PostgreSQL server. As in Section 1, JobMaster (30 slots per worker)* at 30w uses the exact same hardware with a higher-concurrency configuration (30 slots per worker, 2 Coord+Drain + 28 Exec).

Long-Running Jobs on PostgreSQL — 5x2,000 bursts (2-5 s per job)Long-Running Jobs on PostgreSQL — 5x2,000 bursts (2-5 s per job)

Key takeaways​

  • When real work takes several seconds per job, dispatch overhead shrinks as a share of runtime and scheduling throughput + concurrency headroom dominate.
  • At 10 workers: JobMaster schedules at 24,481/s (5.6× TickerQ, 15.2× Hangfire, 43× Quartz.NET) with 69 ms p50 request latency and just 16.2% DB CPU / 1.3% worker CPU.
  • At 30 workers: Hangfire (79/s) and Quartz.NET (70/s) stall again on lock contention, while JobMaster holds 11,640/s (3.7× TickerQ) at 57.9% DB CPU and 1.7% worker CPU.
  • With JobMaster (30 slots per worker)* on the exact same DB: Because slow I/O jobs spend most of their time awaiting external calls, raising JobMaster's concurrency to 30 slots per worker (2 Coord+Drain + 28 Exec) on the same database pushes end-to-end throughput from 58.9/s to 155.5/s (64.3 s total, vs. 81.3/s for the fastest 10-slot baseline) while still scheduling at 7,166/s and keeping PostgreSQL at 111.9% CPU (less than 2 of 6 cores).

Full tables: Long-Running Jobs metrics

4. Steady Paced Production Traffic​

Unlike the burst tests above, this test simulates continuous, steady production traffic with no massive spikes: 30 waves at 5-second intervals of 500 regular jobs (300–750 ms each) (15,000 jobs total over 145 s, ~100 jobs/s sustained arrival rate) across 10 workers (3 parallel HTTP requests per worker, ~17 jobs/request) on the same 6 CPU / 16 GB PostgreSQL server. JobMaster (30 slots per worker)* runs on the exact same hardware with 2 Coord+Drain + 8 Exec and 30 slots per worker.

Steady Paced Production Traffic on PostgreSQL — 30x500 jobs every 5 s (10w)Steady Paced Production Traffic on PostgreSQL — 30x500 jobs every 5 s (10w)

Key takeaways​

  • Fastest ingestion, calmest database: JobMaster ingests each 500-job wave at 29,088/s (15 ms p50 / 26 ms p99 HTTP schedule latency: 3.2× faster than TickerQ, 18.8× Hangfire, 48.6× Quartz.NET) while using half of TickerQ's DB CPU (46.8% vs 90.7%) and 5.5× less DB CPU than Hangfire (257.7%).
  • Pipeline latency trade-off: Because TickerQ, Hangfire, and Quartz.NET read directly from the jobs table with short poll intervals, they keep right up with the 100 jobs/s arrival pace (148 s total, 1.6–2.1 s job p50). By design, JobMaster's decoupled SavePending buffer and bucket pipeline trades dispatch latency (21.5 s p50 at 10 slots; 9.0 s p50 / 16.5 s p99 with split roles and larger buffers) for fast ingestion and low DB load, finishing in 184.7 s and 160.9 s total (48.9% DB CPU).

Full tables: Steady Paced Production Traffic metrics

Next: JobMaster Storage Backends​

See JobMaster Storage Comparison to compare JobMaster across PostgreSQL, RavenDB, MySQL, and distributed NATS JetStream.