[GRADLE-1240] Need a way to set JVM memory args for the Gradle Daemon Created: 01/Dec/10  Updated: 04/Jan/13  Resolved: 06/Feb/12

Status: Resolved
Project: Gradle
Affects Version/s: 0.9-rc-3
Fix Version/s: 1.0-milestone-8

Type: Improvement
Reporter: Chris Brookes Assignee: Unassigned
Resolution: Fixed Votes: 4


 Description   

As of 0.9-rc-3 the JVM args for the daemon are hardcoded in DaemonConnector.startDaemon(). This means we cannot tune the daemon (i.e. set the max heap, permgen). A mechanism to do this would be great, since (on my system at least) 1GB heap is quite a large footprint.



 Comments   
Comment by Szczepan Faber [ 11/Aug/11 ]

We could:

  • introduce GRADLE_DAEMON_OPTS
  • make the daemon process respect the GRADLE_OPTS (potentially risky, some of the advanced vm args may not be very happy if there are 1+ java processes with same set of options; some vm params can make daemon fail to start, etc.)
  • combine the above options
Comment by Adam Murdoch [ 14/Aug/11 ]

some other options:

  • GRADLE_OPTS is used to launch the daemon process, and ignored by the client process.
  • Add something to $projectDir/gradle.properties or ~/.gradle/gradle.properties.
  • Add something to wrapper properties.

in any case, we need to consider what happens when the settings have changed since the daemon was started. Restarting the daemon is an option. Starting a new daemon is another option. This way we won't toggle when multiple builds are running with different GRADLE_OPTS.

Generated at Wed Jun 30 11:50:31 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.