Benchmarks
81,900 tasks/sec end to end at 49 µs median, and 46,593 tasks of 100 B in 8 MiB where 1.0.4 held 655. Measured on an Apple M4 Pro and a 2011 Intel i3 on Linux with the same scripts; anything not measured here is labelled with its provenance.
Reference run#
| Configuration | |
|---|---|
| machine | Apple M4 Pro (12 cores), 24 GB |
| os | macOS 26.5.1, arm64 |
| build | Apple clang 17, quicxd built -O2 |
| allocator | Default 8 MiB budget, apool v2 |
| transport | Loopback TCP, no network hop |
| load | 8 worker processes, 8 producer connections, C clients |
The second machine is a 2011 desktop: Intel Core i3-2100 (2011), 2 cores / 4 threads, 8 GB, Ubuntu 24.04, Linux 6.8, x86-64, gcc 13.3, quicxd built -O2. It runs the same suite, so an effect that shows on both is not a property of one CPU or one kernel.
Throughput#
81,900 tasks/sec end to end, single thread, median of 5 runs on the M4 Pro. Closed loop, 8 connections × 32 in flight, 8 workers, 10 s, 0 errors, 0 dropped connections. Five runs landed between 77.8k and 85.4k; v1.0.4 measured 82.4k the same way. The allocator did not change the speed: its share of a round trip is about 15 ns.
One Quicx task is a full lifecycle. The producer submits, the daemon acks and dispatches, the worker parses the payload and reports done, and the producer is notified. That is five protocol messages, so it should not be compared against a single enqueue.
Latency#
Open loop at 40,000 tasks/sec offered on the M4 Pro, median of 5 runs. Tasks are due on a fixed schedule and latency is measured from the scheduled time, so any stall is charged in full rather than hidden by a client that slows down along with the server.
| Percentile | submit to done |
|---|---|
| p50 | 49 µs |
| p90 | 64 µs |
| p99 | 98 µs |
| p99.9 | 143 µs |
Two machines#
Each machine is offered a rate it handles comfortably. The i3 tops out at 19.0k tasks/sec in the closed loop because eleven processes (the daemon, 8 workers and 2 producers) share its four hardware threads. On both machines v1.0.4 and v2.0.0 are inside each other’s run-to-run range.
| machine | offered | p50 | p99 | p99.9 | closed loop |
|---|---|---|---|---|---|
| Apple M4 Pro | 40k/s | 49 µs | 98 µs | 143 µs | 81.9k/s |
| Intel i3-2100 | 9k/s | 123 µs | 198 µs | 208 µs | 19.0k/s |
Capacity#
How many tasks the daemon accepts in the default 8 MiB before it answers ERROR 0x01. The sizes are sent one after another to the same daemon and the queue is drained in between, so v2 has to follow each change. The counts are identical on both machines.
| payload | v1.0.4 | v2.0.0 |
|---|---|---|
| 100 B | 655 | 46,593 |
| 900 B | 180 | 8,016 |
| 40 B | 1,310 | 73,146 |
| 300 B | 262 | 22,044 |
| nginx lines, avg 188 B | 1,433 | 30,947 |
Memory#
v2 maps the budget once and never grows it, but it only touches the pages it hands out, and pages that empty after a burst give their memory back to the OS (MADV_FREE_REUSABLE on macOS, MADV_DONTNEED on Linux). v1.0.4 wrote a header into every block at startup, so it held the whole pool from the first second.
| physical memory, KB | v1.0.4 Mac | v2.0.0 Mac | v1.0.4 Linux | v2.0.0 Linux |
|---|---|---|---|---|
| idle, just started | 9,200 | 1,056 | 9,928 | 1,796 |
| queue full | 9,200 | 9,088 | 9,928 | 9,816 |
| after the burst drains | 9,200 | 2,080 | 9,928 | 2,736 |
macOS measures phys_footprint and Linux the resident set size, so compare within one machine. Under the throughput load v2 used at most 2.8% of the pool (14 of 508 pages); quicx status shows the pages each size holds, live.
Footprint#
| Value | |
|---|---|
| binary | 54.9 KB (-O2, stripped of nothing) |
| runtime dependencies | none |
| source | ~3,200 lines (of C) |
| threads | 1 |
Next to Redis#
Redis is where most task queues live, so Quicx and Redis 7 ran side by side: each in a Docker container limited to 64 MB, both sent the same 100-byte tasks at 40,000 a second by one producer. Redis stored them in a list, the most compact way it can hold a queue. Memory is what each container actually used.
With each program’s defaults, Redis has no memory limit. It took 588,400 tasks and kept growing until Linux killed it at 14.7 s, and every task in the queue went with it. Quicx took 46,593, answered ERROR 0x01 to the next 583,007, never went past 11.7 MiB, and was back to 3.4 MiB once eight workers had emptied it.
Given the same limit, Redis holds more tasks:
| limit | Redis tasks | Quicx tasks | Redis peak memory | Quicx peak memory |
|---|---|---|---|---|
| 8 MiB | 70,617 | 46,593 | 13.9 MiB | 11.2 MiB |
| 56 MiB | 553,623 | 327,267 | 63.7 MiB | 59.3 MiB |
A Redis list keeps a 100-byte item in about 103 bytes. Quicx keeps each task in a 176-byte block: the payload plus a 64-byte record with the task’s id, its type and the connection its result goes back to. Both refuse new work once full and keep running; the difference is what the limit means. maxmemory counts Redis’s data, not the process: set to 56 MiB, Redis peaked at 63.7 MiB, 0.3 MiB short of being killed. Quicx’s budget is all of its task memory. The scripts and raw results are in docs/report/scripts/redis in the repository, and one command repeats the run.
When the budget is full#
With admission = value, producers give each task a value level (MSG_SUBMIT_VALUED) and the queue spends its budget on the most valuable work: higher levels go first, and a full budget evicts a waiting task of a lower level, but only one whose memory apool proves the new task can use. The real daemon ran over budget (256 KiB, one worker at 500 tasks a second). Steady: 2,000 tasks a second for 15 s, one in ten valuable at random. Burst: valuable tasks at 1,000 a second for 3 s, then ordinary ones at 2,000 a second for 9 s. Median of 3 runs.
| steady: valuable done | steady: valuable wait | steady: evicted | burst: valuable done | |
|---|---|---|---|---|
| no values, refuse | 31.6 % | 3,506 ms | 0 | 100 % |
| values, refuse | 31.2 % | 4.1 ms | 0 | 100 % |
| values, oldest | 100 % | 4.1 ms | 20,749 | 64.6 % |
| values, value | 100 % | 4.1 ms | 2,056 | 100 % |
Dropping the oldest task keeps the valuable ones in the steady run but evicts ten times as many tasks, and in the burst the ordinary flood pushes out 1,062 valuable tasks still waiting. Only value-aware admission keeps all of them in both. Throughput is the same in every configuration.
Producers set the level per task with the Java client’s submit(type, payload, level). To watch a full budget evict a less valuable task on your own machine, follow the quick start’s budget-full step.
Methodology#
The harness lives in bench/ and you can run it yourself. These are the choices behind every number on this page.
- C clients, not Python
- A Python client tops out around 50–100k socket ops/sec and contends on the GIL across threads, so it saturates before the daemon does and ends up measuring itself.
- Latency is timed to done
- Not to the ack. An ack only means the daemon received the frame; it never touches a worker. For a task queue, the number that matters is when the work is finished.
- Open loop for latency, closed loop for throughput
- Latency runs put tasks on a fixed schedule and charge stalls against the scheduled send time, the standard correction for coordinated omission. Closed-loop latency is not quoted, because a client that backs off when the server slows cannot measure the server slowing.
- Real payloads, parsed by the workers
- nginx combined-format access-log lines, 120–260 bytes. Workers parse the IP, method, path hash, status and bytes, and report per-status totals, so a run can be verified rather than trusted.
- Two machines, loopback TCP
- An Apple M4 Pro on macOS and a 2011 Intel Core i3 on Linux, same scripts, same -O2 build. Clients and daemon share each machine over loopback, so there is no network hop. Real deployments will be slower.
- The harness checks itself
- 256 outstanding requests ÷ 81.9k/s = 3.1 ms, and the measured closed-loop p50 was 3.3 ms (median of 5 runs). Little's Law agrees, so the instrument is measuring queueing and not itself.
Comparison with other queues#
| throughput | latency | provenance | |
|---|---|---|---|
| Quicx | 81.9k tasks/s (1 thread) | 49 µs p50 end-to-end | measured here |
| Redis (LPUSH) | ~161k commands/s | 0.30 ms p50, one command | reported |
| RabbitMQ | ~40k msg/s | n/a | reported |
| Kafka | >1M msg/s, batched | ~ms | reported |
| beanstalkd | n/a | n/a | no comparable figure found |
Part of Quicx’s latency advantage is work it is not doing. Before you take these numbers as a reason to switch, read Limitations, which lists that work.