https://www.puppet.com/community logo
Join Slack
Powered by
# puppet-enterprise
  • n

    n3snah

    05/23/2023, 3:02 PM
    if Puppet Enterprise console is slow loading
    matching nodes
    inside a node group, where would I look to try identify the issue? I feel like its
    puppetdb
    given its got to figure out which nodes match the rules associated. Would this be a good start?
  • b

    bastelfreak

    05/23/2023, 3:03 PM
    probably the classifer or its database, not puppetdb
  • b

    bastelfreak

    05/23/2023, 3:04 PM
    how many node groups do you have? how many rules/pinned nodes in that specific group?
  • n

    n3snah

    05/23/2023, 3:04 PM
    I was looking at the classifier logs earlier but couldn't really identify anything obvious. I even had
    logback.xml
    set to debug mode.
  • n

    n3snah

    05/23/2023, 3:05 PM
    probably a couple hundred node groups in total. 2 rules in the node group but doing a regex match with 1 of the rules on a custom structured fact.
  • n

    n3snah

    05/23/2023, 3:07 PM
    where do I look for the classifier DB?
  • b

    bastelfreak

    05/23/2023, 3:08 PM
    its one of the databases in pe-postgresql
  • b

    bastelfreak

    05/23/2023, 3:08 PM
    and you can enable slow query log in the postgresql config
  • b

    bastelfreak

    05/23/2023, 3:09 PM
    a couple hundred sounds like too much :D
  • n

    n3snah

    05/23/2023, 3:11 PM
    lol.. yeah maybe.
  • s

    spp

    05/23/2023, 3:11 PM
    What version of PE as well?
  • n

    n3snah

    05/23/2023, 3:12 PM
    so I found the query in the
    postgresql-Tue.log
    here is the execution time
    36448.118ms
  • n

    n3snah

    05/23/2023, 3:12 PM
    PE 2021.7.2
  • b

    bastelfreak

    05/23/2023, 3:13 PM
    well thats slow
  • b

    bastelfreak

    05/23/2023, 3:13 PM
    now time to tune postgres :)
  • n

    n3snah

    05/23/2023, 3:13 PM
    I have 201 nodes in this particular node group. just FYI
  • b

    bastelfreak

    05/23/2023, 3:14 PM
    setting up thr operational dashboard is a good step. you can also get the query from the log and run it again with explain
  • n

    n3snah

    05/23/2023, 3:14 PM
    sorry, I am not a DBA. How would I run the query with explain?
  • b

    bastelfreak

    05/23/2023, 3:15 PM
    you can start the psql shell and paste the query there
  • b

    bastelfreak

    05/23/2023, 3:15 PM
    the pdql binary is somewhere in /opt/puppetlabs
  • n

    n3snah

    05/23/2023, 3:15 PM
    I can do that unauthenticated?
  • b

    bastelfreak

    05/23/2023, 3:15 PM
    and the outlut of the explain can be added to https://explain.depesz.com/
  • b

    bastelfreak

    05/23/2023, 3:15 PM
    you need to switch to the pe-postgresql user
  • n

    n3snah

    05/23/2023, 3:16 PM
    ah ok
  • b

    bastelfreak

    05/23/2023, 3:16 PM
    or pe-postgres
  • b

    bastelfreak

    05/23/2023, 3:18 PM
    a few options: your hardware is too old/small. you dont give postgres enough resources. you have too much old data in the db which slows it down
  • b

    bastelfreak

    05/23/2023, 3:18 PM
    or a combination of those :D
  • b

    bastelfreak

    05/23/2023, 3:18 PM
    and running pgbadger and explain on queries is always a good start
  • n

    n3snah

    05/23/2023, 3:19 PM
    for the most part, we have left it with vendor defaults 🙂
  • b

    bastelfreak

    05/23/2023, 3:20 PM
    welp :D
1...535455...73Latest