Project

General

Profile

Actions

Bug #7972

closed

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

Added by Nicolas CHARLES about 8 years ago. Updated almost 2 years ago.

Status:
Released
Priority:
1
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É2016-05-19Actions
Actions #1

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.0.14 to 3.0.15
Actions #2

Updated by Nicolas CHARLES about 8 years ago

  • Translation missing: en.field_tag_list set to sponsored
  • Priority changed from N/A to 1
Actions #3

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.0.15 to 3.0.16
Actions #4

Updated by Jonathan CLARKE almost 8 years ago

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

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

Actions #5

Updated by François ARMAND almost 8 years ago

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?

Actions #6

Updated by François ARMAND almost 8 years ago

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).

Actions #7

Updated by François ARMAND almost 8 years ago

  • Status changed from New to In progress
Actions #8

Updated by François ARMAND almost 8 years ago

  • 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.

Actions #9

Updated by François ARMAND almost 8 years ago

  • 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
Actions #10

Updated by François ARMAND almost 8 years ago

  • Status changed from Pending technical review to Pending release
Actions #11

Updated by Vincent MEMBRÉ almost 8 years ago

  • 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.

Actions #12

Updated by Alexis Mousset almost 2 years ago

  • Priority set to 0
Actions

Also available in: Atom PDF