Created attachment 1093974 [details] snippet_infra Description of problem: Performance issues in the UI, when going to Infrastructure/Virtual Machines tab seeing times upwards of 40+ seconds consistently. This is happening with admin and non-admin users. Also, there doesn't seem to be any caching issues since this can happen after logging back in. Snippet from production.log showing the loading of the Infra/Virtual Machines taking 53 seconds. Some of the renderings are taking 4+ seconds to such as calls as loading global_footer and/or adv_search. ============================================ [----] I, [2015-11-13T17:36:23.166686 #7085:cb5e94] INFO -- : Rendered layouts/exp_atom/_editor.html.haml (4336.8ms) [----] I, [2015-11-13T17:36:23.167033 #7085:cb5e94] INFO -- : Rendered layouts/_exp_editor.html.haml (4346.4ms) [----] I, [2015-11-13T17:36:23.167232 #7085:cb5e94] INFO -- : Rendered layouts/_adv_search_body.html.haml (4350.9ms) [----] I, [2015-11-13T17:36:23.170490 #7085:cb5e94] INFO -- : Rendered layouts/_adv_search_footer.html.haml (2.9ms) [----] I, [2015-11-13T17:36:23.170701 #7085:cb5e94] INFO -- : Rendered layouts/_adv_search.html.haml (4359.8ms) [----] I, [2015-11-13T17:36:23.170966 #7085:cb5e94] INFO -- : Rendered layouts/_global_footer.html.haml (4360.4ms) [----] I, [2015-11-13T17:36:23.181772 #7085:cb5e94] INFO -- : Completed 200 OK in 52750.7ms (Views: 5493.7ms | ActiveRecord: 2177.6ms) ============================================ Did some high level viewing of the DB and this seems to be running properly (not seeing any bloat, or fragmented indecies that would cause long running query times). It seems from the one snippet above that the query comes back after 2 seconds to which there is a lot of unaccounted time rendering. Version-Release number of selected component (if applicable): 5.4.2.0 How reproducible: Steps to Reproduce: 1. Navigate to Infrastructure-> Virtual Machines 2. Screen sits there loading for 50+ seconds Actual results: Expected results: Additional info:
Can we get a full evm.log and configuration from this appliance to review?
@paldeala Yes, I'm seeing significant time spent on the main content, the security filtering, and the (left hand) side component. I'm currently making modifications seeing how I can reduce the number of queries, which will reduce the database load, web server cpu and memory requirements. I'm currently targeting 5.6 of the product. After I get a solution, I will assess the risk for port to 5.5 and 5.4. Thank you for all your help, Keenan
https://github.com/ManageIQ/manageiq/pull/5725
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/aaaf2544e3862161f8972ee07d4068801ceeb2b2 commit aaaf2544e3862161f8972ee07d4068801ceeb2b2 Author: Keenan Brock <kbrock> AuthorDate: Thu Dec 3 23:18:44 2015 -0500 Commit: Keenan Brock <kbrock> CommitDate: Wed Dec 23 15:18:59 2015 -0500 Merge common use of MiqSearch and Rbac filtered - remove unused parameter targets from MiqSearch#search simplify the pattern of searching or using an existing filter https://bugzilla.redhat.com/show_bug.cgi?id=1281999 app/models/miq_provision_virt_workflow.rb | 16 ++---- app/models/miq_request_workflow.rb | 14 ++---- app/models/miq_search.rb | 20 +++++++- spec/models/miq_search_spec.rb | 83 +++++++++++++++++++++++++++++++ 4 files changed, 109 insertions(+), 24 deletions(-)
*** Bug 1302148 has been marked as a duplicate of this bug. ***
https://github.com/ManageIQ/manageiq/pull/6487
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/73e121ec1ddcce6028f9add171c956d234a3e2e4 commit 73e121ec1ddcce6028f9add171c956d234a3e2e4 Author: Jason Frey <jfrey> AuthorDate: Tue Feb 2 21:47:48 2016 -0500 Commit: Jason Frey <jfrey> CommitDate: Tue Feb 2 22:29:56 2016 -0500 Simplify archived? and orphaned? to not use associations In doing so, the TreeBuilderVmsAndTemplates no longer needs to preload the EMS. https://bugzilla.redhat.com/show_bug.cgi?id=1281999 app/models/vm_or_template.rb | 8 ++++---- app/presenters/tree_builder_vms_and_templates.rb | 9 --------- spec/models/miq_provision_workflow_spec.rb | 3 ++- 3 files changed, 6 insertions(+), 14 deletions(-)
https://github.com/ManageIQ/manageiq/pull/6495
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/edadc56e97c7e9406a7b9bfca3becab432ee48a5 commit edadc56e97c7e9406a7b9bfca3becab432ee48a5 Author: Keenan Brock <kbrock> AuthorDate: Thu Feb 4 10:46:57 2016 -0500 Commit: Keenan Brock <kbrock> CommitDate: Thu Feb 4 11:41:26 2016 -0500 Improve sort performance in Rbac#search https://bugzilla.redhat.com/show_bug.cgi?id=1281999 app/models/rbac.rb | 2 +- spec/controllers/provider_foreman_controller_spec.rb | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-)
New commit detected on cfme/5.4.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=1b4cd8dd998a0339bbce4f7e928b96b94be6e928 commit 1b4cd8dd998a0339bbce4f7e928b96b94be6e928 Author: Keenan Brock <kbrock> AuthorDate: Tue Feb 2 14:25:01 2016 -0500 Commit: Keenan Brock <kbrock> CommitDate: Thu Feb 4 13:04:35 2016 -0500 Improve sort performance in Rbac#search https://bugzilla.redhat.com/show_bug.cgi?id=1281999 vmdb/app/models/rbac.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commit detected on cfme/5.4.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=40a99c451e11c26df5e53b74ad619b9979e41abd commit 40a99c451e11c26df5e53b74ad619b9979e41abd Merge: 1b9d245 1b4cd8d Author: Joe Rafaniello <jrafanie> AuthorDate: Tue Feb 9 16:25:10 2016 -0500 Commit: Joe Rafaniello <jrafanie> CommitDate: Tue Feb 9 16:25:10 2016 -0500 Merge branch 'patched_sorting' into '5.4.z' Improve sort performance in Rbac#search Based upon [#6495](https://github.com/ManageIQ/manageiq/pull/6495) Manually applied changes This addresses https://bugzilla.redhat.com/show_bug.cgi?id=1281999 5.4.5 BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1289196 See merge request !769 vmdb/app/models/rbac.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
https://github.com/ManageIQ/manageiq/pull/6577
New commit detected on cfme/5.4.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=7b780a15f2fd4573b51d8835ab6f39b28a4f8d6c commit 7b780a15f2fd4573b51d8835ab6f39b28a4f8d6c Author: Jason Frey <jfrey> AuthorDate: Tue Feb 2 21:47:48 2016 -0500 Commit: Keenan Brock <kbrock> CommitDate: Fri Feb 12 14:52:54 2016 -0500 Simplify archived? and orphaned? to not use associations In doing so, the TreeBuilderVmsAndTemplates no longer needs to preload the EMS. https://bugzilla.redhat.com/show_bug.cgi?id=1281999 taken from #6487 vmdb/app/models/vm_or_template.rb | 8 ++++---- .../presenters/tree_builder_vms_and_templates.rb | 9 --------- vmdb/spec/models/miq_provision_workflow_spec.rb | 23 ++++++++++++++++++++++ 3 files changed, 27 insertions(+), 13 deletions(-)
New commit detected on cfme/5.4.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=26e38bcb5a3c52f81f31974defdf855746fad7c7 commit 26e38bcb5a3c52f81f31974defdf855746fad7c7 Merge: b01191e 7b780a1 Author: Oleg Barenboim <obarenbo> AuthorDate: Tue Feb 16 14:49:32 2016 -0500 Commit: Oleg Barenboim <obarenbo> CommitDate: Tue Feb 16 14:49:32 2016 -0500 Merge branch 'bz_1281999_mr_orphans_54z' into '5.4.z' Simplify archived? and orphaned? to not use associations In doing so, the TreeBuilderVmsAndTemplates no longer needs to preload the EMS. https://bugzilla.redhat.com/show_bug.cgi?id=1281999 5.4.5 BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1289196 taken from #6487 (semi clean cherry-pick) See merge request !770 vmdb/app/models/vm_or_template.rb | 8 ++++---- .../presenters/tree_builder_vms_and_templates.rb | 9 --------- vmdb/spec/models/miq_provision_workflow_spec.rb | 23 ++++++++++++++++++++++ 3 files changed, 27 insertions(+), 13 deletions(-)
Service patches were applied to 5.6 and patch provided for 5.4.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1348