Jira (PDB-5219) Investigate query performance for "ESTATE - latest corrective change for specific system"

0 views
Skip to first unread message

Bogdan Irimie (Jira)

unread,
Jul 29, 2021, 9:41:04 AM7/29/21
to puppe...@googlegroups.com
Bogdan Irimie created an issue
 
PuppetDB / Task PDB-5219
Investigate query performance for "ESTATE - latest corrective change for specific system"
Issue Type: Task Task
Assignee: Unassigned
Created: 2021/07/29 6:40 AM
Priority: Normal Normal
Reporter: Bogdan Irimie

From the performance test we ran in https://docs.google.com/spreadsheets/d/1eaOZhSoTyZ3k_0905_3BSDZpViz3WbTTJGQzGdoTsnI/edit?usp=sharing

curl --location -g --request GET 'http://localhost:8080/pdb/query/v4/nodes?query=["extract", ["latest_report_corrective_change","latest_report_status","certname","report_timestamp"], ["and",["~", ["fact", "operatingsystem"], "Cent.*"]]]'

is an outlier and we should investigate if this query can be rewritten in a more efficient way or if we can make changes to the query engine in order to improve it's performance

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Bogdan Irimie (Jira)

unread,
Jul 29, 2021, 9:49:03 AM7/29/21
to puppe...@googlegroups.com

Andrei Filipovici (Jira)

unread,
Aug 23, 2021, 10:02:03 AM8/23/21
to puppe...@googlegroups.com
Andrei Filipovici commented on Task PDB-5219
 
Re: Investigate query performance for "ESTATE - latest corrective change for specific system"

This query is not hardcoded, it's based on user input. So the user may do a query based on other fact from the few hundreds available.
So improving just on query, out of potential hundreds, might not be such a good idea, because the indexes might take a long time to create and require additional space.
Plus the user might use custom facts that we are not aware of.

We did some testing on the 100k nodes sandbox with 20 users, but on the n1 server and the query took on average 17983 ms.
Then we added an index on the operatingsystem fact and on average, the request took 7272 ms. That's an improvement of approximately 60%.

Bogdan Irimie (Jira)

unread,
Sep 29, 2021, 3:58:03 AM9/29/21
to puppe...@googlegroups.com

Dave Woods (Jira)

unread,
Oct 18, 2021, 9:54:02 AM10/18/21
to puppe...@googlegroups.com

productboard (Jira)

unread,
Nov 1, 2021, 1:59:02 PM11/1/21
to puppe...@googlegroups.com

Eric Thompson (Jira)

unread,
Nov 2, 2021, 9:03:02 PM11/2/21
to puppe...@googlegroups.com
Eric Thompson commented on Task PDB-5219
 
Re: Investigate query performance for "ESTATE - latest corrective change for specific system"

Austin Blatt is this one on our list? 

with the TSR folks leaving, we probably need to re-prioritize this onto HAHA

Reply all
Reply to author
Forward
0 new messages