Hide Forgot
Description of problem: If you have a large number of hosts registered (perhaps 40K or more), the following call can take minutes: /api/v2/hosts/<host> This only occurs if you are *not* using an admin account. Version-Release number of selected component (if applicable): 6.2.7 How reproducible: every time Steps to Reproduce: 1. create non-admin account with permissions to view hosts 2. register a large number of systems. They do not have to be checking in. 3. perform GET on url listed above Actual results: minutes for GET to return Expected results: seconds for GET to return
Upstream bug assigned to dlobatog@redhat.com
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/15527 has been resolved.
Please add verifications steps for this bug to help QE verify
To verify, simply try the calls described above on Chris Duryee's comment 4 - https://bugzilla.redhat.com/show_bug.cgi?id=1422304#c4 and measure the before/after times.
here's some time measurements of host listing with variable per_page argument for a satellite 6.2.9-4 having about 65k hosts registered. The Y axis represents the time taken to get the response: 00:40 +++--+-+-+--+-+-+--+-+-+--+-+-+--+-+--+-+-+--+-+-+--+-+-+--+-+-+--+** +++ + + + + + + + + + + + + + + + + + + + *****+************++ 00:35 +-+.............................................*.....*.foo.*******-+ ++: : : : : : : : : : : : : : : : :******* : : : : : : : :++ 00:30 +-+...............................*******.........................+-+ ++: : : : : : : : :************ : : : : : : : : : : : : : :++ ++: : : : : : : *** : : : : : : : : : : : : : : : : : : :++ 00:25 +++..............**...............................................+++ ++: : : : : :** : : : : : : : : : : : : : : : : : : : : :++ 00:20 +++..........**...................................................+++ ++: : : : * : : : : : : : : : : : : : : : : : : : : : : :++ 00:15 +-+.......**......................................................+-+ ++: : :** : : : : : : : : : : : : : : : : : : : : : : : :++ 00:10 +-+...**..........................................................+-+ ++: ** : : : : : : : : : : : : : : : : : : : : : : : : : :++ +*** : : : : : : : : : : : : : : : : : : : : : : : : : : :++ 00:05 *++...............................................................+++ +++ + + + + + + + + + + + + + + + + + + + + + + + + + + +++ 00:00 +-+--+-+-+--+-+-+--+-+-+--+-+-+--+-+--+-+-+--+-+-+--+-+-+--+-+-+--+-+ 2 40 6 10 1 1 16 1 2 22 2 2 28 3 32 3 3 38 4 4 44 4 4 50 5 5 56 5 600 per page 07:00 +-++---+--+---+--+--+---+--+---+--+--+---+--+---+--+--+---+--+---++-+ ++ + + + + + + + + + + + + + + + + + + + ** ++ : : : : : : : : : : : : : : : : foo *******++ 06:00 +++..........................................................**...+++ ++ : : : : : : : : : : : : : : : : :**: : ++ 05:00 +-+.....................................................***.......+-+ ++ : : : : : : : : : : : : : : : ** : : : ++ ++ : : : : : : : : : : : : : : :**: : : : ++ 04:00 +-+................................................*..............+-+ ++ : : : : : : : : : : : : : :**: : : : : ++ 03:00 +-+...........................................***.................+-+ ++ : : : : : : : : : : : : ** : : : : : : ++ ++ : : : : : : : : : : : :**: : : : : : : ++ 02:00 +-+....................................***........................+-+ ++ : : : : : : : : : ****** : : : : : : : : ++ 01:00 +-+.......................*******.................................+-+ ++ : : : ************** : : : : : : : : : : : : ++ ************ + + + + + + + + + + + + + + + + ++ 00:00 +-++---+--+---+--+--+---+--+---+--+--+---+--+---+--+--+---+--+---++-+ 10 200 30 400 50 60 700 80 900 10 11 120 13 140 15 16 170 18 190 20 2100 per page 27:00 +-+---+-----+------+-----+-----+-----+-----+-----+------+-----*---+-+ ++ + + + + + + + + + *+* ++ 24:00 +-+.....................................................foo.*******-+ ++ : : : : : : : : : * : * ++ 21:00 +-+.......................................................*......*+-+ ++ : : : : : : **** : :* : *++ 18:00 +-+.................................****....*...........*.........+*+ ++ : : : : : *** : : * : *: : *+ 15:00 +-+.........................*****............*........*...........+-* ++ : : : **** : : : * : * : : ++ 12:00 +-+..................***.......................*....*.............+-+ ++ : : ***** : : : : *: * : : ++ 09:00 +-+........*****................................*.*...............+-+ ++ : *** : : : : : : * : : ++ 06:00 +-+..***..........................................................+-+ ++ ** : : : : : : : : : : ++ 03:00 +**...............................................................+-+ *+ + + + + + + + + + + ++ 00:00 +-+---+-----+------+-----+-----+-----+-----+-----+------+-----+---+-+ 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 11000 12000 per page ^ note that the sudden drop in the above chart has been most probably caused by timeout.
Created attachment 1273649 [details] listing times per 20hpp
Created attachment 1273650 [details] listing times per 100hpp
Created attachment 1273651 [details] listing times per 1000hpp
the xlabel of the first 2 plots got scrumbled- the first chart contains the range (20,40,60,80,...,600) the second one contains (100,200,300,...,1200)
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-2017:1191