limiting gwt compiler threads to 1

Hi, On Fedora 20, I sometimes get GWT compiler crashes due to OutOfMemory. So I tried limiting to 1 thread like so: make clean install-dev PREFIX=$HOME/ovirt-engine DEV_EXTRA_BUILD_FLAGS_GWT_DEFAULTS="-Dgwt.userAgent=gecko1_8,safari" BUILD_UT=0 DEV_EXTRA_BUILD_FLAGS="-Dgwt.jjs.maxThreads=1 -Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory" When the two compiler threads spawn, they seem to fire at the same time. [INFO] Compiling 2 permutations [INFO] Compiling permutation 0... [INFO] Compiling permutation 1... I would expect there to be a delay while 1 waits for 0: [INFO] Compiling 2 permutations [INFO] Compiling permutation 0... <30 second pause...> <done> [INFO] Compiling permutation 1... <30 second pause...> <done> Do I have the options wrong? Greg Greg Sheremeta Red Hat, Inc. Sr. Software Engineer, RHEV Cell: 919-807-1086 gshereme@redhat.com

I could be wrong, but it seems that the default value for "gwt.jjs.maxThreads" is 4 [1] - maybe it is not override-able? in any case, I believe that using: DEV_EXTRA_BUILD_FLAGS="-Dgwt.compiler.localWorkers=2" (or "1", I guess) will help here - see README.developer [2] ---- Thanks, Einav [1] http://gerrit.ovirt.org/#/c/25163/2/frontend/webadmin/modules/pom.xml [2] from README.developer, around line 142: """ ... DEV_EXTRA_BUILD_FLAGS Any maven build flags requires for building. For example, if your machine is low on memory, use: DEV_EXTRA_BUILD_FLAGS="-Dgwt.compiler.localWorkers=2" ... """ ----- Original Message -----
From: "Greg Sheremeta" <gshereme@redhat.com> To: "Vojtech Szocs" <vszocs@redhat.com>, "Alexander Wels" <awels@redhat.com> Cc: devel@ovirt.org Sent: Wednesday, May 14, 2014 9:09:17 PM Subject: [ovirt-devel] limiting gwt compiler threads to 1
Hi,
On Fedora 20, I sometimes get GWT compiler crashes due to OutOfMemory. So I tried limiting to 1 thread like so:
make clean install-dev PREFIX=$HOME/ovirt-engine DEV_EXTRA_BUILD_FLAGS_GWT_DEFAULTS="-Dgwt.userAgent=gecko1_8,safari" BUILD_UT=0 DEV_EXTRA_BUILD_FLAGS="-Dgwt.jjs.maxThreads=1 -Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory"
When the two compiler threads spawn, they seem to fire at the same time.
[INFO] Compiling 2 permutations [INFO] Compiling permutation 0... [INFO] Compiling permutation 1...
I would expect there to be a delay while 1 waits for 0:
[INFO] Compiling 2 permutations [INFO] Compiling permutation 0... <30 second pause...> <done> [INFO] Compiling permutation 1... <30 second pause...> <done>
Do I have the options wrong?
Greg
Greg Sheremeta Red Hat, Inc. Sr. Software Engineer, RHEV Cell: 919-807-1086 gshereme@redhat.com _______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel

That did the trick. Thanks! Greg ----- Original Message -----
From: "Einav Cohen" <ecohen@redhat.com> To: "Greg Sheremeta" <gshereme@redhat.com> Cc: "Vojtech Szocs" <vszocs@redhat.com>, "Alexander Wels" <awels@redhat.com>, devel@ovirt.org Sent: Wednesday, May 14, 2014 9:22:53 PM Subject: Re: [ovirt-devel] limiting gwt compiler threads to 1
I could be wrong, but it seems that the default value for "gwt.jjs.maxThreads" is 4 [1] - maybe it is not override-able? in any case, I believe that using: DEV_EXTRA_BUILD_FLAGS="-Dgwt.compiler.localWorkers=2" (or "1", I guess) will help here - see README.developer [2]
---- Thanks, Einav
[1] http://gerrit.ovirt.org/#/c/25163/2/frontend/webadmin/modules/pom.xml
[2] from README.developer, around line 142: """ ... DEV_EXTRA_BUILD_FLAGS Any maven build flags requires for building.
For example, if your machine is low on memory, use: DEV_EXTRA_BUILD_FLAGS="-Dgwt.compiler.localWorkers=2" ... """
----- Original Message -----
From: "Greg Sheremeta" <gshereme@redhat.com> To: "Vojtech Szocs" <vszocs@redhat.com>, "Alexander Wels" <awels@redhat.com> Cc: devel@ovirt.org Sent: Wednesday, May 14, 2014 9:09:17 PM Subject: [ovirt-devel] limiting gwt compiler threads to 1
Hi,
On Fedora 20, I sometimes get GWT compiler crashes due to OutOfMemory. So I tried limiting to 1 thread like so:
make clean install-dev PREFIX=$HOME/ovirt-engine DEV_EXTRA_BUILD_FLAGS_GWT_DEFAULTS="-Dgwt.userAgent=gecko1_8,safari" BUILD_UT=0 DEV_EXTRA_BUILD_FLAGS="-Dgwt.jjs.maxThreads=1 -Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory"
When the two compiler threads spawn, they seem to fire at the same time.
[INFO] Compiling 2 permutations [INFO] Compiling permutation 0... [INFO] Compiling permutation 1...
I would expect there to be a delay while 1 waits for 0:
[INFO] Compiling 2 permutations [INFO] Compiling permutation 0... <30 second pause...> <done> [INFO] Compiling permutation 1... <30 second pause...> <done>
Do I have the options wrong?
Greg
Greg Sheremeta Red Hat, Inc. Sr. Software Engineer, RHEV Cell: 919-807-1086 gshereme@redhat.com _______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel

----- Original Message -----
From: "Einav Cohen" <ecohen@redhat.com> To: "Greg Sheremeta" <gshereme@redhat.com> Cc: "Vojtech Szocs" <vszocs@redhat.com>, "Alexander Wels" <awels@redhat.com>, devel@ovirt.org Sent: Thursday, May 15, 2014 3:22:53 AM Subject: Re: [ovirt-devel] limiting gwt compiler threads to 1
I could be wrong, but it seems that the default value for "gwt.jjs.maxThreads" is 4 [1] - maybe it is not override-able?
Indeed, following properties are set by default: gwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory gwt.jjs.maxThreads=4 ThreadedPermutationWorkerFactory computes the number of workers (threads in this case) like so: numWorkers = Math.min(numWorkers, Integer.getInteger(MAX_THREADS_PROPERTY, 1)); numWorkers -> corresponds to localWorkers GWT option (gwt.compiler.localWorkers) MAX_THREADS_PROPERTY -> corresponds to gwt.jjs.maxThreads GWT option In short, all you should do is specify -Dgwt.compiler.localWorkers=1 which will cause numWorkers to become 1.
in any case, I believe that using: DEV_EXTRA_BUILD_FLAGS="-Dgwt.compiler.localWorkers=2" (or "1", I guess) will help here - see README.developer [2]
Indeed :)
---- Thanks, Einav
[1] http://gerrit.ovirt.org/#/c/25163/2/frontend/webadmin/modules/pom.xml
[2] from README.developer, around line 142: """ ... DEV_EXTRA_BUILD_FLAGS Any maven build flags requires for building.
For example, if your machine is low on memory, use: DEV_EXTRA_BUILD_FLAGS="-Dgwt.compiler.localWorkers=2" ... """
----- Original Message -----
From: "Greg Sheremeta" <gshereme@redhat.com> To: "Vojtech Szocs" <vszocs@redhat.com>, "Alexander Wels" <awels@redhat.com> Cc: devel@ovirt.org Sent: Wednesday, May 14, 2014 9:09:17 PM Subject: [ovirt-devel] limiting gwt compiler threads to 1
Hi,
On Fedora 20, I sometimes get GWT compiler crashes due to OutOfMemory. So I tried limiting to 1 thread like so:
make clean install-dev PREFIX=$HOME/ovirt-engine DEV_EXTRA_BUILD_FLAGS_GWT_DEFAULTS="-Dgwt.userAgent=gecko1_8,safari" BUILD_UT=0 DEV_EXTRA_BUILD_FLAGS="-Dgwt.jjs.maxThreads=1 -Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory"
When the two compiler threads spawn, they seem to fire at the same time.
[INFO] Compiling 2 permutations [INFO] Compiling permutation 0... [INFO] Compiling permutation 1...
I would expect there to be a delay while 1 waits for 0:
[INFO] Compiling 2 permutations [INFO] Compiling permutation 0... <30 second pause...> <done> [INFO] Compiling permutation 1... <30 second pause...> <done>
Do I have the options wrong?
Greg
Greg Sheremeta Red Hat, Inc. Sr. Software Engineer, RHEV Cell: 919-807-1086 gshereme@redhat.com _______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel

Hi Greg, I assume you're developing against the master branch. Your "make" command looks good, note that ThreadedPermutationWorkerFactory is already applied [1] so there's no need to specify that in build command. To use max. 1 thread for GWT compilation, try this: $ make ... DEV_EXTRA_BUILD_FLAGS="-Dgwt.compiler.localWorkers=1" I've just tested above command for compiling GWT UI for 2 browsers: [INFO] Compiling 2 permutations [INFO] Compiling permutation 0... ... delay ... [INFO] Compiling permutation 1... ... delay ... [1] property "gwt-plugin.extraJvmArgs" in frontend/webadmin/modules/pom.xml Regards, Vojtech ----- Original Message -----
From: "Greg Sheremeta" <gshereme@redhat.com> To: "Vojtech Szocs" <vszocs@redhat.com>, "Alexander Wels" <awels@redhat.com> Cc: devel@ovirt.org Sent: Thursday, May 15, 2014 3:09:17 AM Subject: limiting gwt compiler threads to 1
Hi,
On Fedora 20, I sometimes get GWT compiler crashes due to OutOfMemory. So I tried limiting to 1 thread like so:
make clean install-dev PREFIX=$HOME/ovirt-engine DEV_EXTRA_BUILD_FLAGS_GWT_DEFAULTS="-Dgwt.userAgent=gecko1_8,safari" BUILD_UT=0 DEV_EXTRA_BUILD_FLAGS="-Dgwt.jjs.maxThreads=1 -Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory"
When the two compiler threads spawn, they seem to fire at the same time.
[INFO] Compiling 2 permutations [INFO] Compiling permutation 0... [INFO] Compiling permutation 1...
I would expect there to be a delay while 1 waits for 0:
[INFO] Compiling 2 permutations [INFO] Compiling permutation 0... <30 second pause...> <done> [INFO] Compiling permutation 1... <30 second pause...> <done>
Do I have the options wrong?
Greg
Greg Sheremeta Red Hat, Inc. Sr. Software Engineer, RHEV Cell: 919-807-1086 gshereme@redhat.com
participants (3)
-
Einav Cohen
-
Greg Sheremeta
-
Vojtech Szocs