Github user jerrypeng commented on a diff in the pull request: https://github.com/apache/storm/pull/2400#discussion_r148923251 --- Diff: docs/Resource_Aware_Scheduler_overview.md --- @@ -303,28 +326,33 @@ To get an idea of how much memory/CPU your topology is actually using you can ad workerMetrics.put("CPU", "org.apache.storm.metrics.sigar.CPUMetric"); conf.put(Config.TOPOLOGY_WORKER_METRICS, workerMetrics); ``` + The CPU metrics will require you to add + ``` <dependency> <groupId>org.apache.storm</groupId> <artifactId>storm-metrics</artifactId> <version>1.0.0</version> </dependency> ``` + as a topology dependency (1.0.0 or higher). You can then go to your topology on the UI, turn on the system metrics, and find the log that the LoggingMetricsConsumer is writing to. It will output results in the log like. + ``` 1454526100 node1.nodes.com:6707 -1:__system CPU {user-ms=74480, sys-ms=10780} 1454526100 node1.nodes.com:6707 -1:__system memory/nonHeap {unusedBytes=2077536, virtualFreeBytes=-64621729, initBytes=2555904, committedBytes=66699264, maxBytes=-1, usedBytes=64621728} 1454526100 node1.nodes.com:6707 -1:__system memory/heap {unusedBytes=573861408, virtualFreeBytes=694644256, initBytes=805306368, committedBytes=657719296, maxBytes=778502144, usedBytes=83857888} ``` + The metrics with -1:__system are generally metrics for the entire worker. In the example above that worker is running on node1.nodes.com:6707. These metrics are collected every 60 seconds. For the CPU you can see that over the 60 seconds this worker used 74480 + 10780 = 85260 ms of CPU time. This is equivalent to 85260/60000 or about 1.5 cores. The Memory usage is similar but look at the usedBytes. offHeap is 64621728 or about 62MB, and onHeap is 83857888 or about 80MB, but you should know what you set your heap to in each of your workers already. How do you divide this up per bolt/spout? That is a bit harder and may require some trial and error from your end. <div id='Enhancements-on-original-DefaultResourceAwareStrategy'/> -## * Enhancements on original DefaultResourceAwareStrategy * +## *Enhancements on original DefaultResourceAwareStrategy* --- End diff -- The markdown does seem to be right for this header
---