Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-1809

Slow response times to aggregate-event-counts endpoint queries

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PDB 3.0.0
    • Fix Version/s: PDB 3.0.2
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      3
    • Sprint:
      PuppetDB 2015-07-29

      Description

      We see slow response times to the aggregate-event-counts endpoint queries. Here is how they clocked on a performance testing system with 3214057 records in the PDB's resource_events table:

      [root@lei-puppetdb ~]# time curl -g -G http://localhost:8080/pdb/query/v4/aggregate-event-counts --data-urlencode 'distinct_resources=true' --data-urlencode 'distinct_start_time=2015-07-13T15:55:30Z' --data-urlencode 'distinct_end_time=2015-07-16T15:55:30Z' --data-urlencode 'query=["and",["<","report_receive_time","2015-07-16T15:55:30Z"],["not",["=","containing_class",null]]]' --data-urlencode 'summarize_by=containing_class'
      [ {
        "summarize_by" : "containing_class",
        "successes" : 74,
        "failures" : 2,
        "noops" : 0,
        "skips" : 1,
        "total" : 74
      } ]
      real 0m22.236s
      user 0m0.001s
      sys 0m0.010s
       
      [root@lei-puppetdb ~]# time curl -g -G http://localhost:8080/pdb/query/v4/aggregate-event-counts --data-urlencode 'distinct_resources=true' --data-urlencode 'distinct_start_time=2015-07-13T15:55:30Z' --data-urlencode 'distinct_end_time=2015-07-16T15:55:30Z' --data-urlencode 'query=["<","report_receive_time","2015-07-16T15:55:30Z"]' --data-urlencode 'summarize_by=certname'
      [ {
        "summarize_by" : "certname",
        "successes" : 5022,
        "failures" : 4,
        "noops" : 0,
        "skips" : 3,
        "total" : 5022
      } ]
      real 5m26.177s
      user 0m0.005s
      sys 0m0.013s
       
      [root@lei-puppetdb ~]# time curl -g -G http://localhost:8080/pdb/query/v4/aggregate-event-counts --data-urlencode 'distinct_resources=true' --data-urlencode 'distinct_start_time=2015-07-13T15:55:30Z' --data-urlencode 'distinct_end_time=2015-07-16T15:55:30Z' --data-urlencode 'query=["<","report_receive_time","2015-07-16T15:55:30Z"]' --data-urlencode 'summarize_by=resource'
      [ {
        "summarize_by" : "resource",
        "successes" : 73596,
        "failures" : 94,
        "noops" : 0,
        "skips" : 1,
        "total" : 73598
      } ]
      real 5m26.542s
      user 0m0.000s
      sys 0m0.017s
      

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                michal.ruzicka Michal Ruzicka
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: