# Set heap size for gradle worker processes

**URL:** <https://discuss.gradle.org/t/set-heap-size-for-gradle-worker-processes/23650>\
**Category:** Help/Discuss\
**Created:** [August 8, 2017, 11:39pm UTC](https://discuss.gradle.org/t/set-heap-size-for-gradle-worker-processes/23650 "2017-08-08T23:39:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sid](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Sid](https://discuss.gradle.org/u/Sid)\
**Post date:** [August 8, 2017, 11:39pm UTC](https://discuss.gradle.org/t/set-heap-size-for-gradle-worker-processes/23650/1 "2017-08-08T23:39:15Z")

</div>

Hi,

For parallel builds we set the number of workers to 4.  
The worker processes are created with max heap size = 2g  
I observed that they hardly ever use 1g each.  
Is it possible to set heap sizes on those workers?

I found an old post regarding this but that approach doesn’t seem suitable.

> <https://stackoverflow.com/questions/21906736/how-do-i-set-jvm-options-for-gradleworkermain>

Thanks.

---

<div class="post-metadata">

**Author:** ![alphacr](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@alphacr](https://discuss.gradle.org/u/alphacr)\
**Post date:** [January 17, 2020, 12:26pm UTC](https://discuss.gradle.org/t/set-heap-size-for-gradle-worker-processes/23650/2 "2020-01-17T12:26:50Z")

</div>

hey, were you able to find a solution on how to increase the heap size of gradle worker?
