[ovirt-devel] limiting gwt compiler threads to 1

Vojtech Szocs vszocs at redhat.com
Thu May 15 10:52:58 UTC 2014



----- Original Message -----
> From: "Einav Cohen" <ecohen at redhat.com>
> To: "Greg Sheremeta" <gshereme at redhat.com>
> Cc: "Vojtech Szocs" <vszocs at redhat.com>, "Alexander Wels" <awels at redhat.com>, devel at 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 at redhat.com>
> > To: "Vojtech Szocs" <vszocs at redhat.com>, "Alexander Wels"
> > <awels at redhat.com>
> > Cc: devel at 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 at redhat.com
> > _______________________________________________
> > Devel mailing list
> > Devel at ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/devel
> > 
> 



More information about the Devel mailing list