# Total concurrent schedule tasks is unexpected

**URL:** <https://discuss.ray.io/t/total-concurrent-schedule-tasks-is-unexpected/16014>\
**Category:** Uncategorized\
**Created:** [October 16, 2024, 9:04am UTC](https://discuss.ray.io/t/total-concurrent-schedule-tasks-is-unexpected/16014 "2024-10-16T09:04:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yanghello](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/yanghello/32/6640_2.png) [@Yanghello](https://discuss.ray.io/u/Yanghello)\
**Post date:** [October 16, 2024, 9:04am UTC](https://discuss.ray.io/t/total-concurrent-schedule-tasks-is-unexpected/16014/1 "2024-10-16T09:04:55Z")

</div>

I use a simple code such as:  
`dataset.map_group(my_func, num_cpus=1)`

tasks are running in a machine with 15cpu, expected to concurrently run 15 tasks at a time, but i found it’s only 5 nearly tasks running at a time. Is there something else i missing to config?

 ![20241016-170201](https://us1.discourse-cdn.com/flex020/uploads/ray/original/2X/e/e701167567e0af53b60c4cd522e39eaef238fe38.png)

---

<div class="post-metadata">

**Author:** ![Yanghello](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/yanghello/32/6640_2.png) [@Yanghello](https://discuss.ray.io/u/Yanghello)\
**Post date:** [October 16, 2024, 9:06am UTC](https://discuss.ray.io/t/total-concurrent-schedule-tasks-is-unexpected/16014/2 "2024-10-16T09:06:41Z")

</div>

more metrics about the task:

 ![20241016-170206](https://us1.discourse-cdn.com/flex020/uploads/ray/original/2X/a/a0ae33be3331b1f433aaa2bf00d67c1b61a9aab8.png)

---

<div class="post-metadata">

**Author:** ![Yanghello](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/yanghello/32/6640_2.png) [@Yanghello](https://discuss.ray.io/u/Yanghello)\
**Post date:** [October 16, 2024, 9:07am UTC](https://discuss.ray.io/t/total-concurrent-schedule-tasks-is-unexpected/16014/3 "2024-10-16T09:07:11Z")

</div>

![20241016-170210](https://us1.discourse-cdn.com/flex020/uploads/ray/original/2X/f/f1033b50a0d5a1e573ec41f5a5625f73a687ad08.png)

---

<div class="post-metadata">

**Author:** ![Yanghello](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/yanghello/32/6640_2.png) [@Yanghello](https://discuss.ray.io/u/Yanghello)\
**Post date:** [October 16, 2024, 9:07am UTC](https://discuss.ray.io/t/total-concurrent-schedule-tasks-is-unexpected/16014/4 "2024-10-16T09:07:41Z")

</div>

![20241016-170214](https://us1.discourse-cdn.com/flex020/uploads/ray/original/2X/3/3ef7807dbf226b0714495ee12ea8b07077d052db.png)

---

<div class="post-metadata">

**Author:** ![Sam\_Chan](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/sam_chan/32/5011_2.png) [@Sam\_Chan](https://discuss.ray.io/u/Sam_Chan)\
**Post date:** [October 16, 2024, 7:57pm UTC](https://discuss.ray.io/t/total-concurrent-schedule-tasks-is-unexpected/16014/5 "2024-10-16T19:57:12Z")

</div>

what is your task resource allocation/configuration looking like?

---

<div class="post-metadata">

**Author:** ![Yanghello](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/yanghello/32/6640_2.png) [@Yanghello](https://discuss.ray.io/u/Yanghello)\
**Post date:** [October 17, 2024, 3:00am UTC](https://discuss.ray.io/t/total-concurrent-schedule-tasks-is-unexpected/16014/6 "2024-10-17T03:00:13Z")

</div>

I only set num\_cpus=1 for `dataset.map_group` of ray.data, default value for others

---

<div class="post-metadata">

**Author:** ![Huaiwei\_Sun](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/huaiwei_sun/32/1316_2.png) [@Huaiwei\_Sun](https://discuss.ray.io/u/Huaiwei_Sun)\
**Post date:** [October 17, 2024, 3:59pm UTC](https://discuss.ray.io/t/total-concurrent-schedule-tasks-is-unexpected/16014/7 "2024-10-17T15:59:52Z")

</div>

What’s the ray and python version? Can you share a script for us to reproduce?
