[ 
https://issues.apache.org/jira/browse/GEODE-4275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16321998#comment-16321998
 ] 

ASF GitHub Bot commented on GEODE-4275:
---------------------------------------

jujoramos opened a new pull request #1270: GEODE-4275: Improved 
StartMemberUtils.addMaxHeap
URL: https://github.com/apache/geode/pull/1270
 
 
   GEODE-4275: Improved StartMemberUtils.addMaxHeap
   
   - Added test methods.
   - Modified the method to avoid adding `"-XX:+UseConcMarkSweepGC"` if
     the user already specified parameter as a jvm argument.
   - Modified the logic to avoid setting the default value for
     `"-XX:CMSInitiatingOccupancyFraction="` if the user already specified
     one as a jvm argument.
   
   Thank you for submitting a contribution to Apache Geode.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [X] Is there a JIRA ticket associated with this PR? Is it referenced in 
the commit message?
   
   - [X] Has your PR been rebased against the latest commit within the target 
branch (typically `develop`)?
   
   - [X] Is your initial contribution a single, squashed commit?
   
   - [X] Does `gradlew build` run cleanly?
   
   - [X] Have you written or updated unit tests to verify your changes?
   
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   
   ### Note:
   Please ensure that once the PR is submitted, you check travis-ci for build 
issues and
   submit an update to your PR as soon as possible. If you need help, please 
send an
   email to [email protected].
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Duplicate CMSInitiatingOccupancyFraction Startup Parameter
> ----------------------------------------------------------
>
>                 Key: GEODE-4275
>                 URL: https://issues.apache.org/jira/browse/GEODE-4275
>             Project: Geode
>          Issue Type: Bug
>          Components: gfsh
>            Reporter: Juan José Ramos Cassella
>            Assignee: Juan José Ramos Cassella
>
> If you start a server/locator by specifying both {{max-heap}} and 
> {{-XX:CMSInitiatingOccupancyFraction}}, logs show that a default 
> {{CMSInitiatingOccupancyFraction`}} is also added in addition to the user 
> specified value.
> As an example, the command {{start server --name=server1 --max-heap=1g 
> --J=-XX:CMSInitiatingOccupancyFraction=50 --server-port=0}} produces the 
> following output:
> {noformat}
>   Command Line Parameters:
>     -Dgemfire.start-dev-rest-api=false
>     -Dgemfire.use-cluster-configuration=true
>     -XX:CMSInitiatingOccupancyFraction=50
>     -XX:OnOutOfMemoryError=kill -KILL %p
>     -Xmx1g
>     -XX:+UseConcMarkSweepGC
>     -XX:CMSInitiatingOccupancyFraction=60
>     -Dgemfire.launcher.registerSignalHandlers=true
>     -Djava.awt.headless=true
>     -Dsun.rmi.dgc.server.gcInterval=9223372036854775806
> {noformat}
> There are 2 entries for {{XX:CMSInitiatingOccupancyFraction}}.
> The problem resides within the {{addMaxHeap}} method of the 
> {{StartMemberUtils}} class:
> {code:title=StartMemberUtils.java|borderStyle=solid}
>   static void addMaxHeap(final List<String> commandLine, final String 
> maxHeap) {
>     if (StringUtils.isNotBlank(maxHeap)) {
>       commandLine.add("-Xmx" + maxHeap);
>       commandLine.add("-XX:+UseConcMarkSweepGC");
>       commandLine.add("-XX:CMSInitiatingOccupancyFraction=" + 
> CMS_INITIAL_OCCUPANCY_FRACTION);
>     }
>   }
> {code}
> The method is called by both the {{StartLocatorCommand}} and 
> {{StartServerCommand}} after the jvmArgs have been already added to the 
> parsed {{commandLine}}. The solution would be to simply check the collection 
> before adding the {{-XX:CMSInitiatingOccupancyFraction}} option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to