[ https://issues.apache.org/jira/browse/AMBARI-13035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Srimanth Gunturi updated AMBARI-13035: -------------------------------------- Attachment: AMBARI-13035.patch {{AlertSummaryPropertyProvider}} when populating 'alerts_summary' currently makes 1 sql query per host. So 1000 sql queries are made when populating this query on a 1000 node cluster, which grows linearly based on the number of hosts. One of the optimizations is to get alert_summaries for all hosts in 1 SQL call so that the SQL call count is constant. There are bigger changes that will be tracked in a different JIRA, but this JIRA will be used for optimizing the SQL call count. > BE / Hosts Page Performance: "alerts_summary" takes too long to load > -------------------------------------------------------------------- > > Key: AMBARI-13035 > URL: https://issues.apache.org/jira/browse/AMBARI-13035 > Project: Ambari > Issue Type: Bug > Components: ambari-server > Affects Versions: 2.1.1 > Reporter: Srimanth Gunturi > Assignee: Srimanth Gunturi > Fix For: 2.1.2 > > Attachments: AMBARI-13035.patch > > > http://c6401.ambari.apache.org:8080/api/v1/clusters/MuonBlue/hosts?fields=alerts_summary > is taking almost 10s every time to load. > Here is a typical request for hosts update > {code} > http://c6401.ambari.apache.org:8080/api/v1/clusters/MuonBlue/hosts?fields=Hosts/rack_info,Hosts/host_name, > Hosts/maintenance_state,Hosts/public_host_name,Hosts/cpu_count,Hosts/ph_cpu_count,alerts_summary,Hosts/host_status, > Hosts/last_heartbeat_time,Hosts/ip,host_components/HostRoles/state,host_components/HostRoles/maintenance_state, > host_components/HostRoles/stale_configs,host_components/HostRoles/service_name,host_components/HostRoles/desired_admin_state, > Hosts/total_mem,stack_versions/HostStackVersions,stack_versions/repository_versions/RepositoryVersions/repository_version, > stack_versions/repository_versions/RepositoryVersions/id, > stack_versions/repository_versions/RepositoryVersions/display_name&minimal_response=true&page_size=100&from=0&sortBy=Hosts/host_name.asc&_=1439416717498 > {code} > By removing "alert_summary", it will take only 1/10 of the time to load. -- This message was sent by Atlassian JIRA (v6.3.4#6332)