Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1111574 - content host API - json returned by index takes too long to process
content host API - json returned by index takes too long to process
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: API (Show other bugs)
6.0.3
Unspecified Unspecified
unspecified Severity high (vote)
: Beta
: Unused
Assigned To: Justin Sherrill
Roman Plevka
http://projects.theforeman.org/issues...
: ReleaseNotes, Triaged
Depends On:
Blocks: sat61-release-notes
  Show dependency treegraph
 
Reported: 2014-06-20 08:08 EDT by Tom McKay
Modified: 2016-07-27 04:42 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 04:42:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
listing time scatter polot (16.07 KB, image/png)
2016-05-03 11:55 EDT, Roman Plevka
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 6307 None None None 2016-04-22 12:36 EDT
Red Hat Product Errata RHBA-2016:1500 normal SHIPPED_LIVE Red Hat Satellite 6.2 Base Libraries 2016-07-27 08:24:38 EDT

  None (edit)
Description Tom McKay 2014-06-20 08:08:05 EDT
On a modest data set (~350 hosts, a couple of those hypervisors with several dozen guests) hammer times out when calling index to fetch all 350.

Suggest rabl be split up as is done in the foreman code such that there are layers depending if index or show is being called.
Comment 1 Tom McKay 2014-06-20 08:08:07 EDT
Created from redmine issue http://projects.theforeman.org/issues/6307
Comment 7 Bryan Kearney 2015-08-25 13:24:29 EDT
Upstream bug component is API
Comment 8 Justin Sherrill 2016-03-16 10:05:01 EDT
Note that the /systems api is being removed in favor of the /hosts api.  The /hosts api does not return information from any backend service and should be much faster.

That said 300-350 is a very arbitrary number and the whole point of pagination is to be able to fetch in some amount of chunks.  This bz is arguing that 300 should be fast, but should 3000?  300000? What is the limit?

I'll move to ON_QA to test that 300 can be fetched fairly quickly.
Comment 10 Roman Plevka 2016-05-03 11:54:53 EDT
VERIFIED
I've run the following script to measure time of host listing as they were created (every 10th).
The time for ~300 hosts is fair enough - ~15 seconds but the time seems to exponentially grow (see attached screenshot).

Anyway, the hammer command does not time out even after 70 seconds. As Justin has pointed out, there's the pagination functionality which gives user control over how many records are being fetched by request.

  80 +-+----+------+------+------+------+------+------+------+------+----+-+
     +      +      +      +      +      +      +      +      +      +    AAA
  70 +-+                                     "times.log" using 1:2    AAA+-+
     |                                                              AA     |
  60 +-+                                                         AAA     +-+
     |                                                         AAA         |
     |                                                     AAAA            |
  50 +-+                                               A AA              +-+
     |                                              AAAAA                  |
  40 +-+                                         A A A                   +-+
     |                                      AAAAA A                        |
  30 +-+                                 AAAA                            +-+
     |                               AAAA                                  |
  20 +-+                        AAAAAA                                   +-+
     |                     AAAAAA                                          |
     |                AAAAAA                                               |
  10 +-+       AAAAAAA                                                   +-+
     +AAAAAAAAA    +      +      +      +      +      +      +      +      +
   0 +-+----+------+------+------+------+------+------+------+------+----+-+
     0     100    200    300    400    500    600    700    800    900    1000
                                     hosts #
Comment 11 Roman Plevka 2016-05-03 11:55 EDT
Created attachment 1153492 [details]
listing time scatter polot
Comment 12 Roman Plevka 2016-05-03 12:04:20 EDT
Verified with Sat 6.2.0 BETA
Comment 14 errata-xmlrpc 2016-07-27 04:42:02 EDT
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:1500

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