Luke Daley-2 wrote > > I wonder if something like ~/.gradle/daemon/daemon.properties might be a > better fit. >
Longer-term this seems like a better approach. I wonder if we additionally need per-project settings, as in "this project needs a daemon with at least 256m max heap". Per-project settings would be easier to share and version control and could help to avoid over-provisioning. On the other hand, they might cause more daemon churn. Luke Daley-2 wrote > > We have up until now run with default memory settings though. > So far we had to hard-code very high defaults because there was no way to adapt them to actual needs. Luke Daley-2 wrote > > What are the JVM defaults? From memory they aren't very generous for Sun > JVMs. > Max heap size seems to default to 1/4 of system memory (capped at 1G) on many of today's systems; only 64m on Windows 32-bit though. http://stackoverflow.com/questions/4667483/how-is-the-default-java-heap-size-determined Max perm size seems to default to 64m (+30% for 64bit): http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html Luke Daley-2 wrote > > I don't necessarily have a problem with defaults if they are documented > and explained to the user via a good error message if the daemon OOMs. > I'm more concerned about the opposite: Wasting memory by setting high defaults in an attempt to prevent OOMs for most users. Cheers, Peter -- View this message in context: http://gradle.1045684.n5.nabble.com/Setting-JVM-options-for-daemon-VM-tp5041975p5043161.html Sent from the gradle-dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
