You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Siddharth Wagle (JIRA)" <ji...@apache.org> on 2014/06/10 18:07:02 UTC

[jira] [Created] (AMBARI-6070) Call to fetch metrics takes over 20 seconds

Siddharth Wagle created AMBARI-6070:
---------------------------------------

             Summary: Call to fetch metrics takes over 20 seconds
                 Key: AMBARI-6070
                 URL: https://issues.apache.org/jira/browse/AMBARI-6070
             Project: Ambari
          Issue Type: Improvement
          Components: controller
    Affects Versions: 1.6.0
            Reporter: Siddharth Wagle
            Assignee: Dmytro Sen
             Fix For: 1.6.1


CPU is consumed by NagiosPropertyProvider and JMXPropertyProvider.
For JMXPropertyProvider execution of ConfigHelper.isStaleConfigs() takes 10-15% of the time now. isStale could be easily cached with Guava Cache. isStale may be changed in 4 cases:
1. Configuration change
2. ConfigGroup created/deleted
3. Start/restart report receiving
4. Host registeration

So we could invalidate appropriate recorrd in cache in these points

*API call*:
{code}
http://<server>:8080/api/v1/clusters/c1/components/?ServiceComponentInfo/category=MASTER&fields=ServiceComponentInfo/Version,ServiceComponentInfo/StartTime,ServiceComponentInfo/HeapMemoryUsed,ServiceComponentInfo/HeapMemoryMax,ServiceComponentInfo/service_name,host_components/HostRoles/host_name,host_components/HostRoles/state,host_components/HostRoles/maintenance_state,host_components/HostRoles/stale_configs,host_components/metrics/jvm/memHeapUsedM,host_components/metrics/jvm/HeapMemoryMax,host_components/metrics/jvm/HeapMemoryUsed,host_components/metrics/jvm/memHeapCommittedM,host_components/metrics/mapred/jobtracker/trackers_decommissioned,host_components/metrics/cpu/cpu_wio,host_components/metrics/rpc/RpcQueueTime_avg_time,host_components/metrics/dfs/FSNamesystem/*,host_components/metrics/dfs/namenode/Version,host_components/metrics/dfs/namenode/DecomNodes,host_components/metrics/dfs/namenode/TotalFiles,host_components/metrics/dfs/namenode/UpgradeFinalized,host_components/metrics/dfs/namenode/Safemode,host_components/metrics/runtime/StartTime,host_components/metrics/hbase/master/IsActiveMaster,ServiceComponentInfo/MasterStartTime,ServiceComponentInfo/MasterActiveTime,ServiceComponentInfo/AverageLoad,ServiceComponentInfo/Revision,ServiceComponentInfo/RegionsInTransition,metrics/api/cluster/summary,,host_components/metrics/yarn/Queue,ServiceComponentInfo/rm_metrics/cluster/activeNMcount,ServiceComponentInfo/rm_metrics/cluster/unhealthyNMcount,ServiceComponentInfo/rm_metrics/cluster/rebootedNMcount,ServiceComponentInfo/rm_metrics/cluster/decommissionedNMcount&minimal_response=true&_=1400808845240
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)