Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Worker concurrency #64

Open
dawncold opened this issue May 9, 2017 · 5 comments
Open

Worker concurrency #64

dawncold opened this issue May 9, 2017 · 5 comments

Comments

@dawncold
Copy link
Contributor

dawncold commented May 9, 2017

Currently, a TaskTiger worker can process only one task concurrently. Is it possible to have one worker prefork multiple pool subprocesses so that it could process multiple tasks at same time?

In our case, we need preload some big modules(long time to load and a significant amount of memory usage) in parent process for performance. Starting multiple workers consumes too much memory, and this problem could be fixed if TaskTiger support worker concurrency.

@thomasst
Copy link
Member

Thanks! This is a good suggestion but not currently planned. PRs are welcome though!

Have you considered using batch queues and optimizing your task processing function so a single worker can process tasks quicker?

@dawncold
Copy link
Contributor Author

dawncold commented Oct 9, 2017

Thanks, batch queues should mitigate our case

@kgritesh
Copy link

@thomasst would like to work on this, any suggestion on api design you might want for this - i mean how do we mention concurrency on workers. Also i was wondering for workers might also make sense to allow thread level concurrency ie instead of preforking processes, it should be possible to use greenlets/threads/sub process right?

@thomasst
Copy link
Member

You'd probably want an option that denotes how many workers you'd want to have and then just fork when starting the main process. I'm not convinced yet we should have an option to provide greenlets/threads.

@piercefreeman
Copy link

@kgritesh Also looking for the same worker process concurrency. Did you get started on a fork with the changed logic?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants