# Is it a good idea to start a large number of tasks all at once?

**URL:** <https://discuss.ray.io/t/is-it-a-good-idea-to-start-a-large-number-of-tasks-all-at-once/11205>\
**Category:** Ray Core\
**Created:** [June 30, 2023, 5:43am UTC](https://discuss.ray.io/t/is-it-a-good-idea-to-start-a-large-number-of-tasks-all-at-once/11205 "2023-06-30T05:43:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chenzhekl](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/chenzhekl/32/4665_2.png) [@chenzhekl](https://discuss.ray.io/u/chenzhekl)\
**Post date:** [June 30, 2023, 5:43am UTC](https://discuss.ray.io/t/is-it-a-good-idea-to-start-a-large-number-of-tasks-all-at-once/11205/1 "2023-06-30T05:43:10Z")

</div>

**How severe does this issue affect your experience of using Ray?**

- Medium: It contributes to significant difficulty to complete my task, but I can work around it.

Hi,

I am new to ray and I have a problem where I need to launch a large number of independent tasks (e.g., 100,000-ish) on a limited number of GPUs (~8). I am wondering if it is a good practice to launch those tasks all at once via `foo.remote()` and have ray to handle the scheduling work. If it is not, what should be the proper implementation?

Thanks

---

<div class="post-metadata">

**Author:** ![sangcho](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/sangcho/32/425_2.png) [@sangcho](https://discuss.ray.io/u/sangcho)\
**Post date:** [July 5, 2023, 3:33pm UTC](https://discuss.ray.io/t/is-it-a-good-idea-to-start-a-large-number-of-tasks-all-at-once/11205/2 "2023-07-05T15:33:22Z")

</div>

According to [ray/release/benchmarks at master · ray-project/ray · GitHub](https://github.com/ray-project/ray/tree/master/release/benchmarks), it is not recommended to submit more than 1Million tasks at a time (# of tasks queued on a single node). If you submit 100,000 tasks, it will be just queued, so it must be okay. You can also control the # of concurrent tasks using num\_cpus or num\_gpus flag for each task.
