[
https://issues.apache.org/jira/browse/STORM-1336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15149657#comment-15149657
]
ASF GitHub Bot commented on STORM-1336:
---------------------------------------
Github user d2r commented on a diff in the pull request:
https://github.com/apache/storm/pull/1053#discussion_r53109116
--- Diff: storm-core/src/jvm/org/apache/storm/Config.java ---
@@ -2194,6 +2195,73 @@
@isString
public static final Object CLIENT_JAR_TRANSFORMER =
"client.jartransformer.class";
+
+ /**
+ * The plugin to be used for resource isolation
+ */
+ @isImplementationOfClass(implementsClass =
ResourceIsolationInterface.class)
+ public static final Object STORM_RESOURCE_ISOLATION_PLUGIN =
"storm.resource.isolation.plugin";
+
+ /**
+ * CGroup Setting below
+ */
+
+ /**
+ * root directory of the storm cgroup hierarchy
+ */
+ @isString
+ public static final Object STORM_CGROUP_HIERARCHY_DIR =
"storm.cgroup.hierarchy.dir";
+
+ /**
+ * resources to to be controlled by cgroups
+ */
+ @isStringList
+ public static final Object STORM_CGROUP_RESOURCES =
"storm.cgroup.resources";
+
+ /**
+ * name for the cgroup hierarchy
+ */
+ @isString
+ public static final Object STORM_CGROUP_HIERARCHY_NAME =
"storm.cgroup.hierarchy.name";
+
+ /**
+ * flag to determine whether to use a resource isolation plugin
+ * Also determines whether the unit tests for cgroup runs.
+ * If storm.resource.isolation.plugin.enable is set to false the unit
tests for cgroups will not run
+ */
+ @isBoolean
+ public static final String STORM_RESOURCE_ISOLATION_PLUGIN_ENABLE =
"storm.resource.isolation.plugin.enable";
+
+ /**
+ * root directory for cgoups
+ */
+ @isString
+ public static String STORM_SUPERVISOR_CGROUP_ROOTDIR =
"storm.supervisor.cgroup.rootdir";
+
+ /**
+ * the manually set memory limit (in MB) for each CGroup on supervisor
node
+ */
+ @isPositiveNumber
+ public static String STORM_WORKER_CGROUP_MEMORY_MB_LIMIT =
"storm.worker.cgroup.memory.mb.limit";
+
+ /**
+ * the manually set cpu share for each CGroup on supervisor node
+ */
+ @isPositiveNumber
+ public static String STORM_WORKER_CGROUP_CPU_LIMIT =
"storm.worker.cgroup.cpu.limit";
+
+ /**
+ * full path to cgexec command
+ */
+ @isString
+ public static String STORM_CGROUP_CGEXEC_CMD =
"storm.cgroup.cgexec.cmd";
+
+ /**
+ * The amount of memory a worker can exceed its allocation before
cgroup will kill it
+ */
+ @isPositiveNumber
+ public static String STORM_CGROUP_MEMORY_MB_LIMIT_TOLERANCE_MARGIN =
"storm.cgroup.memory.mb.limit.tolerance.margin";
--- End diff --
This is not exactly what I had in mind from my review comment. Now the Java
name is consistent with the config name, but if we look at the other config
definitions, there is also a consistency in the units of the value being
appended to the name, like `topology.worker.max.heap.size.mb`. This PR does
something different with `storm.worker.cgroup.memory.mb.limit` and
`storm.cgroup.memory.mb.limit.tolerance.margin` where the unit is somewhere in
the middle of the config. I think it is better to be consistent with the other
existing configs.
> Evalute/Port JStorm cgroup support
> ----------------------------------
>
> Key: STORM-1336
> URL: https://issues.apache.org/jira/browse/STORM-1336
> Project: Apache Storm
> Issue Type: New Feature
> Components: storm-core
> Reporter: Robert Joseph Evans
> Assignee: Boyang Jerry Peng
> Labels: jstorm-merger
>
> Supports controlling the upper limit of CPU core usage for a worker using
> cgroups
> Sounds like a good start, will be nice to integrate it with RAS requests too.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)