You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Swapnil Bawaskar (JIRA)" <ji...@apache.org> on 2018/02/01 22:52:31 UTC
[jira] [Closed] (GEODE-4275) Duplicate
CMSInitiatingOccupancyFraction Startup Parameter
[ https://issues.apache.org/jira/browse/GEODE-4275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Swapnil Bawaskar closed GEODE-4275.
-----------------------------------
> 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
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.4.0
>
>
> 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
(v7.6.3#76005)