Project

General

Profile

Actions

Bug #7972

closed

API call to get the list of node is REALLY slow with latest version

Bug #7972: API call to get the list of node is REALLY slow with latest version

Added by Nicolas CHARLES over 9 years ago. Updated over 3 years ago.

Status:
Released
Priority:
1 (highest)
Category:
API
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

Calling API https://rudder.example.com/rudder/api/latest/nodes is super slow : 15s with 350 nodes
Same call with https://rudder.example.com/rudder/api/4/nodes is only 0,2s

We probably broke something in the latest version

Targetting to 3.0, but I'm not sure of the actual version of latest that is slower


Subtasks 1 (0 open1 closed)

Bug #8333: Missing methods in inventory code to efficiently query softwareReleasedVincent MEMBRÉActions

Updated by Vincent MEMBRÉ over 9 years ago Actions #1

  • Target version changed from 3.0.14 to 3.0.15

Updated by Nicolas CHARLES over 9 years ago Actions #2

  • Translation missing: en.field_tag_list set to sponsored
  • Priority changed from N/A to 1 (highest)

Updated by Vincent MEMBRÉ over 9 years ago Actions #3

  • Target version changed from 3.0.15 to 3.0.16

Updated by Jonathan CLARKE over 9 years ago Actions #4

  • Assignee changed from Vincent MEMBRÉ to François ARMAND

François can you take this and figure out a solution please?

Updated by François ARMAND over 9 years ago Actions #5

I can't reproduce that one. I have a test machine with ~2000 nodes, and both are extremelly fast.

Have you more information about the environment where the problem happens?

Updated by François ARMAND over 9 years ago Actions #6

On an other (more realistic) rudder instance, we have a little difference.

- full lastest (api v6):
time curl -k -H "X-API-Token: ...." -X GET 'https://otherrudder/api/latest/nodes'
0,02s user 0,00s system 1% cpu 0,970 total

- only what was reported in previous api:
time curl -k -H "X-API-Token: ...." -X GET 'https://otherrudder/api/latest/nodes'?include=minimal
0,02s user 0,01s system 2% cpu 0,863 total

- api v5:
time curl -k -H "X-API-Token: ...." -X GET 'https://otherrudder/api/5/nodes'?include=minimal
0,01s user 0,01s system 9% cpu 0,255 total

This is of course higly non-scientific, because data with one try... But we can clearly see a 4x in total time, between API v5 and api v6 (between the two api v6 call, we can guess it's just because there is so much more data returned).

Updated by François ARMAND over 9 years ago Actions #7

  • Status changed from New to In progress

Updated by François ARMAND over 9 years ago Actions #8

  • Target version changed from 3.0.16 to 3.1.10

The slower one must be v6, since v5 didn't change anything on that.

Updated by François ARMAND over 9 years ago Actions #9

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/rudder/pull/1098

Updated by François ARMAND over 9 years ago Actions #10

  • Status changed from Pending technical review to Pending release

Updated by Vincent MEMBRÉ over 9 years ago Actions #11

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 3.1.10 and 3.2.3 which were released on 2016-06-01, but not announced.

Updated by Alexis Mousset over 3 years ago Actions #12

  • Priority set to 0
Actions

Also available in: PDF Atom