Vojtech Szocs has posted comments on this change.

Change subject: webadmin,userportal: Remove general JVM settings from 
gwt-plugin.extraJvmArgs
......................................................................


Patch Set 2:

> you might want to update the README.developer with guidelines on settings new 
> default /tmp settings? or they remind the same, just able to be overwritten?

Right, I'll need to update README.developer file, too.

For java.io.tmpdir, default value is defined by JVM implementation [1]. On 
Linux, default value is /tmp.

[1] http://stackoverflow.com/a/1924576

For Java Preference subsystem (similar to Windows Registry in its purpose), 
default value is defined in JDK code [2]. On Linux, java.util.prefs.systemRoot 
is /etc/.java and java.util.prefs.userRoot is ~/.userPrefs. Java Preference 
subsystem is rather useless, but since it's part of JVM bootstrap, and since it 
*cannot* be easily disabled via some config option [2], the easiest way is to 
customize these two java.util.prefs.* options.

[2] http://allaboutbalance.com/articles/disableprefs/

When doing parallel (Maven/JVM) builds, user must ensure that java.io.tmpdir + 
java.util.prefs.systemRoot + java.util.prefs.userRoot point to some 
build-specific directory.

> The -Djava.io.tmpdir -Djava.util.prefs.systemRoot -Djava.util.prefs.userRoot 
> should not be removed as these are workaround of gwt plugin bugs that should 
> be resolved within the plugin one day.

Not sure I follow here. As I mentioned above, these 3 options need 
customization *only* when doing parallel builds, otherwise their default values 
are sensible.

The fact that GWT compiler generates *tons* of temp files does not imply the 
need to customize java.io.tmpdir. It just implies the need to check "ulimit -n" 
as done in Makefile when BUILD_LOCALES=1.

> The jvm options should also remain, as you cannot expect the entire maven to 
> have by default the memory requirements of the forked process.

Users should use MAVEN_OPTS env. variable which defines global JVM arguments 
when running Maven. For example:

 export MAVEN_OPTS="-Xms1024M -Xmx8192M -XX:PermSize=512M -XX:MaxPermSize=1024M"

Maven JVM will use settings in MAVEN_OPTS, GWT compiler JVM (child of Maven JVM 
spawned via gwt-maven-plugin) will inherit these settings too.

> You can enable override... but by default the maven should take less 
> resources.

If the user is concerned about memory consumption, we can introduce extra 
override in "gwt-plugin.extraJvmArgs", for example:

 <gwt-plugin.extraJvmArgs>
   
-Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory
 \
   -Dgwt.jjs.maxThreads=4 \
   ${gwt.extraJvmArgs}
 </gwt-plugin.extraJvmArgs>

With above, users can use MAVEN_OPTS for global settings + use 
-Dgwt.extraJvmArgs=xxx to tune GWT compiler JVM specifically.

In general, the cost of introducing extra properties is higher than the cost of 
simply using MAVEN_OPTS env. variable.

-- 
To view, visit http://gerrit.ovirt.org/36739
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iaeb92d69f2ba38746559df3e44f34a61fd880908
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vojtech Szocs <vsz...@redhat.com>
Gerrit-Reviewer: Alexander Wels <aw...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Barak Korren <bkor...@redhat.com>
Gerrit-Reviewer: David Caro <dcaro...@redhat.com>
Gerrit-Reviewer: Einav Cohen <eco...@redhat.com>
Gerrit-Reviewer: Eyal Edri <ee...@redhat.com>
Gerrit-Reviewer: Lior Vernia <lver...@redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to