Bug 542830 - system.listSystems and system.listUserSystems takes too long when there are many systems
Summary: system.listSystems and system.listUserSystems takes too long when there are m...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 530
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Justin Sherrill
QA Contact: Garik Khachikyan
URL:
Whiteboard:
Depends On:
Blocks: sat531-blockers
TreeView+ depends on / blocked
 
Reported: 2009-11-30 21:42 UTC by Justin Sherrill
Modified: 2018-10-27 15:09 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-01-08 10:02:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0021 0 normal SHIPPED_LIVE Red Hat Network Satellite bug fix update 2010-01-08 10:02:22 UTC

Description Justin Sherrill 2009-11-30 21:42:01 UTC
system.listSystems & system.listUserSystems use backing queries that are very very complex for what is being returned.  We should have them use a simplier query so that it doesn't take as long.

When run on a satellite with ~3700 systems to return, it would take about a minute.

Comment 1 Justin Sherrill 2009-11-30 22:04:14 UTC
fixed in spacewalk master: 83f534f7dac8430e19c846cbaa698a49b379e848

In 5.2 we used a very efficient query for these calls but during the 5.3 development cycle they were switched to a much less efficient query.  (The reason they were switched had to do with underlying code that was used for other things which needed more information about the systems).

This patch changes these calls to use the previously used queries.  The user should notice no difference in return structure or behaviour, just faster performance.

Comment 8 Garik Khachikyan 2010-01-05 10:22:58 UTC
# VERIFIED

Following are the packages fixing the issue:
spacewalk-java-0.5.44-62.el5sat
spacewalk-java-lib-0.5.44-62.el5sat
spacewalk-java-config-0.5.44-62.el5sat
spacewalk-taskomatic-0.5.44-62.el5sat

The following benchmark test was applied on two similar Satellites (one with old, and another with a new impl.): 100 calls of system.listSystems and system.listUserSystems on DB with 4,000 systems registered there.

Results:
method name, old satellite, new satellite, improvement
system.listSystems, 63.28 sec, 4.72 sec, ~13 times
system.listUserSystems, 61.75 sec, 4.42 sec, ~13 times

Considering the results the issue is fixed.

Comment 10 errata-xmlrpc 2010-01-08 10:02:49 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0021.html


Note You need to log in before you can comment on or make changes to this bug.