Gradle
  1. Gradle
  2. GRADLE-1240

Need a way to set JVM memory args for the Gradle Daemon

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Resolution: Fixed
    • Affects Version/s: 0.9-rc-3
    • Fix Version/s: 1.0-milestone-8

      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.

        Activity

        Hide
        Szczepan Faber
        added a comment -

        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
        Show
        Szczepan Faber
        added a comment - 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
        Hide
        Adam Murdoch
        added a comment -

        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.

        Show
        Adam Murdoch
        added a comment - 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.

          People

          • Assignee:
            Unassigned
            Reporter:
            Chris Brookes
          • Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: