Skip to content

Quiet the per-task worker logging - #77

Merged
codingjoe merged 2 commits into
mainfrom
codingjoe-per-task-logging-throughput
Oct 1, 2026
Merged

codingjoe merged 2 commits into
mainfrom
codingjoe-per-task-logging-throughput

Conversation

@codingjoe

@codingjoe codingjoe commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

No description provided.

Every task emitted four JSON records: the executor's start and success
messages plus Django's task started and finished records. Formatting and
flushing them to stdout cost a large share of the worker's throughput.

configure_logging forced the root logger to INFO, so deployments could
not run a worker below that level. Stop setting the level and log on
whatever Django's LOGGING configuration provides; the executor's task
start and success records stay at INFO.

The test app now runs its workers at WARNING, like the celery and
dramatiq benchmark runs, while its own task logs stay at INFO.

A 20,000-task drain on this machine drops from 7.03s to 5.02s (352 us to
251 us per task).

Fixes #68
Regenerate docs/images/backend-comparison-*.svg from a fresh benchmark
run: threadmill 5,069 tasks/s, celery 2,128, django-tasks-db 1,997,
django-tasks-redis 1,313 with one worker process and one thread. The
README alt text carries the same numbers.
@codingjoe
codingjoe merged commit dc69c8f into main Oct 1, 2026
4 checks passed
@codingjoe
codingjoe deleted the codingjoe-per-task-logging-throughput branch October 1, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant