Github user srdo commented on a diff in the pull request: https://github.com/apache/storm/pull/2113#discussion_r120459423 --- Diff: storm-server/src/main/java/org/apache/storm/container/cgroup/CgroupManager.java --- @@ -151,22 +161,40 @@ public void reserveResourcesForWorker(String workerId, Map<String, Number> resou } } - if (totalMem != null) { - MemoryCore memCore = (MemoryCore) workerGroup.getCores().get(SubSystemType.memory); - try { - memCore.setPhysicalUsageLimit(Long.valueOf(totalMem.longValue() * 1024 * 1024)); - } catch (IOException e) { - throw new RuntimeException("Cannot set memory.limit_in_bytes! Exception: ", e); + if ((boolean) this.conf.get(DaemonConfig.STORM_CGROUP_MEMORY_ENFORCEMENT_ENABLE)) { + if (totalMem != null) { + int cgroupMem = + (int) + (Math.ceil( + ObjectReader.getDouble( + this.conf.get(DaemonConfig.STORM_CGROUP_MEMORY_LIMIT_TOLERANCE_MARGIN_MB), --- End diff -- I'm wondering if having defaults here is necessary? Isn't defaults.yaml always expected to be present?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---