Repository navigation
Benchmark huey beside the other queues - #91
Merged
Merged
Conversation
- benchmarks/huey_app.py hands echo tasks to the huey Redis storage, which keeps results in the huey.results hash the cleanup already names. - The consumer runs as one process with one thread, like the celery and dramatiq workers, and is stopped after a sentinel task proves the drain. - The footnote lists huey with the queues that read one message at a time. - The generated chart is left untouched; regenerate it with benchmarks/chart.py from a run on an idle machine.
Measured on an idle machine: threadmill 9,960 tasks/s, dramatiq 7,177, huey 6,038, celery 2,280, django-tasks-db 2,065, django-tasks-rq 82. Four of the five earlier rows land within 6% of the previous chart; threadmill measured 9,960 against 11,977, which is the queue that coverage tracing and start-cost quantization hit hardest.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The comparison benchmarks cover Celery, dramatiq, django-tasks-db and django-tasks-rq, but not huey. Huey is a widely used lightweight queue, so the throughput chart should rank it beside the others.
benchmarks/huey_app.pywith aRedisHueyapp, an echo task and a sentinel task.--graceful-signal=TERMmakes SIGTERM stop it gracefully.huey.*queue, results, schedule and counter keys in the queue cleanup.One thing to review: the threadmill row measures 9,960 tasks/s against 11,977 in the previous chart. It is the row that coverage tracing and the one-second start cost hit hardest, because its worker runs in-process and its drain is only about 8 seconds. The other four earlier rows reproduce within 6%.