db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John H. Embretsen (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-1614) Test harness overrides heap size settings when starting Network Server
Date Fri, 04 Aug 2006 21:51:14 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1614?page=all ]

John H. Embretsen updated DERBY-1614:

    Attachment: DERBY-1614_v3.diff

Attatching 'DERBY-1614_v3.diff', which is a replacement for all previous patches, provided
that the changes are accepted by the community.

This patch implements option A) as described in previous comments. In short, this means that
the patch removes the test harness' inclination to override any heap size (initial or max)
flags for the Network Server JVM when started via the NetServer class of the test harness.

Prior to applying this patch, the Network server JVM will have a particular heap size (initial
size 16 MB and/or max size 32 MB) if the initial size has not been specified by both -ms AND
-Xms, or if the max size has not been specified by both -mx and -Xmx, in the jvmflags argument
to NetServer.java's constructor.

This patch only affects harness behavior when the NetServer class is used to start a server
instance in the DerbyNet and DerbyNetClient frameworks. Default behavior does not change for
most tests; the patch only affects tests or test runs where any type of jvm flags are specified
(usually by the jvmflags system property), either on the command line or in <test>_app.properties


I have run derbyall on Solaris 10 x86, Sun's HotSpot client VM 1.5.0_06. The only test failure
was XATest.java in the DerbyNetClient framework, which I assume is related to DERBY-1640.

I have also run the wisconsin test with no jvmflags, with "-Djvmflags=-server", and with "-Djvmflags=-server^-Dderby.drda.logConnections=true"
in the DerbyNet and DerbyNetClient frameworks. All test runs were successful (tests passed
and verbose output was as intended/expected). This verifies that:
   * the harness is able to parse both one and multiple jvm flags properly when specified
on the command line by the jvmflags property
   * the harness successfully merges jvm flags from an .._app.properties file with jvm flags
from the command line
   * the harness does no longer override heap size settings set in the ..._app.properties

I am currently running derbyall with the property -Djvmflags=-server, to see if this makes
any difference.

Please review this patch. I hope to get this in by the 10.2 "code freeze" date.

> Test harness overrides heap size settings when starting Network Server
> ----------------------------------------------------------------------
>                 Key: DERBY-1614
>                 URL: http://issues.apache.org/jira/browse/DERBY-1614
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions:
>         Environment: Test frameworks DerbyNet and DerbyNetClient
>            Reporter: John H. Embretsen
>         Assigned To: John H. Embretsen
>             Fix For:
>         Attachments: DERBY-1614_v1.diff, DERBY-1614_v2.diff, DERBY-1614_v3.diff
> Test specific heap size settings can be passed to the test harness using the jvmflags
system property, for example in a <testname>_app.properties file or at the command line
when starting a test, e.g "-Djvmflags=-Xms32m^-Xmx32m".
> The test harness almost always overrides such settings when starting a new Network Server
using the org.apache.derbyTesting.functionTests.harness.NetServer class of the test harness.
Currently, if _either_ -ms _or_ -Xms is missing from the jvmflags, NetServer.start() adds
-ms16777216. Also, if _either_ -mx _or_ -Xmx is missing from the jvmflags, NetServer.start()
adds -ms33554432. This has been the case since SVN revision 420048 (July 8, 2006).
> Earlier revisions did not override the heap settings unless the newer -Xms or -Xmx flags
were used instead of the -ms and -mx flags. A patch for DERBY-1091 attempted (among other
things) to make the harness recognize the newer flags as well as the older flags, but the
resulting behavior is (most likely) not as intended. 
> If a test is run in either the DerbyNet framework or the DerbyNetClient framework, the
test-specific JVM flags should (probably) be used for the Network Server JVM as well as the
test JVM. Currently, even if non-default heap size flags are passed to the harness, the server
JVM will ignore these settings since the harness adds -ms and/or -mx flags _after_ all other
heap flags. The exception is if both new and old versions of heap flags are passed to the
harness, e.g:
> jvmflags=-ms32m^-Xms32m^-mx128m^-Xmx128m
> Here is the code causing this behaviour:
> if (setJvmFlags && ((jvmflags.indexOf("-ms") == -1) || (jvmflags.indexOf("-Xms")
== -1)))
>      // only setMs if no starting memory was given
>      jvm.setMs(16*1024*1024); // -ms16m
> if (setJvmFlags && ((jvmflags.indexOf("-mx") == -1) || (jvmflags.indexOf("-Xmx")
== -1)))
>      // only setMx if no max memory was given
>      jvm.setMx(32*1024*1024); // -mx32m

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message