Performance: one service worker can only process one task per second?
See original GitHub issueI have a ServiceContainer with only one worker, as below:
config = {
AMQP_URI_CONFIG_KEY:AMQP_URL,
MAX_WORKERS_CONFIG_KEY: 1,
}
ServiceContainer(service_class, config)
After sending async calls, I started the service as the consumer. But it turns out that the only one worker can do exactly one task per second, is there something wrong with my configuration?
The service simply returns a number:
class Consumer(object):
name = 'test'
@rpc
def work(self):
logging.info('hello')
return 42
logs:
[I 170314 20:39:25 main:26] hello
[I 170314 20:39:26 main:26] hello
[I 170314 20:39:27 main:26] hello
[I 170314 20:39:28 main:26] hello
[I 170314 20:39:29 main:26] hello
[I 170314 20:39:30 main:26] hello
[I 170314 20:39:31 main:26] hello
[I 170314 20:39:32 main:26] hello
[I 170314 20:39:33 main:26] hello
[I 170314 20:39:34 main:26] hello
[I 170314 20:39:35 main:26] hello
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (10 by maintainers)
Top Results From Across the Web
Measuring the Real-world Performance Impact of Service ...
One of the most significant benefits of service workers (from a performance perspective, at least) is their ability to proactively control ...
Read more >Prevent Service Worker from automatically stopping
If you try to use it for processing, it's likely to block fetch events which is terrible for performance.
Read more >Scaling Airflow to optimize performance - Astronomer Docs
See which parameters to modify when scaling up data pipelines to make the most of Airflow. Learn about the environment, DAG, and task-level...
Read more >Elastic Beanstalk worker environments - AWS Documentation
These operations can take only a second or two to complete, but a delay of a few seconds is a lot for a...
Read more >Workers Guide — Celery 5.2.7 documentation
A single task can potentially run forever, if you have lots of tasks waiting for some event that'll never happen you'll block the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
agreed. @mikegreen7892003 would you like to make a pr bumping it to
max_workers + 1
? (if not, i’m happy to but it was your idea)hi. in case you’ve not been following the recent discussions you may be interested in https://github.com/nameko/nameko/pull/429#issuecomment-294789346 and the subsequent release of
2.5.4