Jira (PDB-4880) PSQL performance issue - Autovacuum unable to clean up "pe-puppetdb.public.catalog_inputs"

15 views
Skip to first unread message

Maheswaran Shanmugam (Jira)

unread,
Sep 7, 2020, 11:06:04 PM9/7/20
to puppe...@googlegroups.com
Maheswaran Shanmugam created an issue
 
PuppetDB / Bug PDB-4880
PSQL performance issue - Autovacuum unable to clean up "pe-puppetdb.public.catalog_inputs"
Issue Type: Bug Bug
Affects Versions: PDB 6.7.3
Assignee: Unassigned
Components: PuppetDB
Created: 2020/09/07 8:05 PM
Environment:

PE 2019.2.2
pe-puppetdb                   | 6.7.3-1
pe-puppetdb-termini           | 6.7.3-1

Priority: Major Major
Reporter: Maheswaran Shanmugam

This case is raised after seeing continuous performance issues for the customer.

Issues description:

All nodes appeared "not reporting" section in the console 

or

Console reporting compilers are not responding

or

Grafana unable to get the metrics from compilers

 

Log analysis:

  • In all the above cases, ` netstat -pan | grep -i 5432` shows `TIME_WAIT` status ( Attached ports.txt from support script)
  • Slowest query from support script:

    2020-09-06 23:28:14.185 GMT [db:pe-puppetdb,sess:5f55631a.52a9,pid:21161,vtid:76/42777,tid:108303837] STATEMENT:  with recursive live_paths(path, value) as   (select key as path, value      from (select (jsonb_each(stable||volatile)).* from factsets) as base_case      union        select path||'#~'||sub_level.key as path,               sub_level.value          from live_paths,          lateral (select *                     from (select (jsonb_each(value)).*                             where jsonb_typeof(value) = 'object') as sub_fields                     union (select generate_series(0, jsonb_array_length(value - 1))::text as key,                                   jsonb_array_elements(value) as value                              where jsonb_typeof(value) = 'array')) as sub_level)   select path into temp tmp_live_paths from live_paths

     

  • Autovacuum unable to clean up the table "pe-puppetdb.public.catalog_inputs".  It's active for a few days. 

2020-09-07 00:09:03.448 GMT [db:,sess:5f5570ae.3f9d,pid:16285,vtid:112/62735,tid:108349218] LOG:  automatic vacuum of table "pe-puppetdb.public.catalog_inputs": index scans: 1

pages: 4038 removed, 2787159 remain, 0 skipped due to pins, 2763439 skipped frozen

tuples: 190119 removed, 2424275 remain, 30905 are dead but not yet removable, oldest xmin: 108303837

buffer usage: 1076888 hits, 891738 misses, 31950 dirtied

avg read rate: 2.882 MB/s, avg write rate: 0.103 MB/s

system usage: CPU: user: 9.96 s, system: 12.37 s, elapsed: 2417.08 s

 

The size of the table "pe-puppetdb.public.catalog_inputs":

Master: 

pe-puppetdb | public.catalog_inputs | 23 GB

Replica: 

pe-puppetdb | public.catalog_inputs | 157 MB

 

Workaround:

  • All nodes appeared "not reporting" section in the console 

  => 

su - pe-postgres -s /bin/bash -c "/opt/puppetlabs/server/apps/postgresql/11/bin/pg_repack -d pe-puppetdb -t certnames -t factsets -t fact_paths"

 

- Console reporting compilers are not responding

- Grafana unable to get the metrics from compilers

 => Restarting the PSQL & puppetdb resolve it for a short period of time.

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Maheswaran Shanmugam (Jira)

unread,
Sep 7, 2020, 11:08:03 PM9/7/20
to puppe...@googlegroups.com
Maheswaran Shanmugam updated an issue
Change By: Maheswaran Shanmugam
Environment: PE 2019.2.2
pe-puppetdb
                  | 6.7.3 - 1
pe-puppetdb-termini           |
6.7.3-1

Maheswaran Shanmugam (Jira)

unread,
Sep 7, 2020, 11:14:03 PM9/7/20
to puppe...@googlegroups.com

Austin Boyd (Jira)

unread,
Sep 8, 2020, 1:39:03 AM9/8/20
to puppe...@googlegroups.com
Austin Boyd updated an issue
Change By: Austin Boyd
Zendesk Ticket Count: 1
Zendesk Ticket IDs: 40730

Austin Boyd (Jira)

unread,
Sep 8, 2020, 1:39:05 AM9/8/20
to puppe...@googlegroups.com
Austin Boyd updated an issue
Change By: Austin Boyd
Zendesk Ticket Count: 1 2
Zendesk Ticket IDs: 40730 ,40830

Austin Boyd (Jira)

unread,
Sep 8, 2020, 1:39:05 AM9/8/20
to puppe...@googlegroups.com

Austin Boyd (Jira)

unread,
Sep 8, 2020, 1:51:04 AM9/8/20
to puppe...@googlegroups.com
Austin Boyd updated an issue
Change By: Austin Boyd
Zendesk Ticket Count: 2 3
Zendesk Ticket IDs: 40612, 40730,40830

Austin Boyd (Jira)

unread,
Sep 10, 2020, 9:19:03 PM9/10/20
to puppe...@googlegroups.com
Austin Boyd updated an issue
Change By: Austin Boyd
Zendesk Ticket Count: 3 4
Zendesk Ticket IDs: 40612,40730,40830 ,40898

Maheswaran Shanmugam (Jira)

unread,
Sep 10, 2020, 11:46:03 PM9/10/20
to puppe...@googlegroups.com
Maheswaran Shanmugam commented on Bug PDB-4880
 
Re: PSQL performance issue - Autovacuum unable to clean up "pe-puppetdb.public.catalog_inputs"

Three P1 cases raised by SCB in two weeks for the performance issue. The resource tuning for the PE infra component already done and looks good. In recent times, They are doing a lot of code push thro' CD4PE applying Sec patches. So, it's important to work on the table `catalog_inputs` which is the highest size among all tables in `puppetdb` of the Master node. That table size is normal in replica node.

####
pe-puppetdb | public.catalog_inputs| 21 GB ( reduced from 23GB) - Master
pe-puppetdb | public.catalog_inputs| 125 MB - Replica

####

Austin Blatt (Jira)

unread,
Sep 15, 2020, 5:48:03 PM9/15/20
to puppe...@googlegroups.com
Austin Blatt assigned an issue to Austin Blatt
 

Closing this as a duplicate of PE-30055. Since the official support escalation (PE-30055) was made on Sept 10th the PuppetDB team has been working with Support on that ticket so that it gets to proper internal visibility.

Change By: Austin Blatt
Assignee: Austin Blatt
Resolution: Duplicate
Status: Open Closed
Reply all
Reply to author
Forward
0 new messages