Re: PostgreSQL performance problem moving from 9.6.17 to 12.3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kenneth Marshall <ktm(at)rice(dot)edu>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: PostgreSQL performance problem moving from 9.6.17 to 12.3
Date: 2020-05-28 16:42:44
Message-ID: 7007.1590684164@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Kenneth Marshall <ktm(at)rice(dot)edu> writes:
> I have a system that was running version 9.6.17 running on a system with
> 48gb of memory and spinning disks front-ed by a HW RAID controller with
> NVRAM cache. We moved to a new box running version 12.3 on a system with
> 64gb of memory and NVME SSD drives. Here are the system config options:

> OLD:
> shared_buffers = 2048MB # min 128kB
> work_mem = 128MB # min 64kB
> maintenance_work_mem = 1024MB # min 1MB
> effective_io_concurrency = 8 # 1-1000; 0 disables prefetching
> max_parallel_workers_per_gather = 0 # taken from max_worker_processes
> effective_cache_size = 24GB
> default_statistics_target = 500 # range 1-10000
> from_collapse_limit = 30
> join_collapse_limit = 30 # 1 disables collapsing of explicit
> seq_page_cost = 1.0 # measured on an arbitrary scale
> random_page_cost = 4.0 # same scale as above

> NEW:
> shared_buffers = 12GB # min 128kB
> work_mem = 128MB # min 64kB
> maintenance_work_mem = 2GB # min 1MB
> effective_io_concurrency = 200 # 1-1000; 0 disables prefetching
> max_worker_processes = 24 # (change requires restart)
> max_parallel_workers_per_gather = 4 # taken from max_parallel_workers
> max_parallel_workers = 24 # maximum number of max_worker_processes that
> seq_page_cost = 1.0 # measured on an arbitrary scale
> random_page_cost = 1.1 # same scale as above for SSDs
> effective_cache_size = 36GB
> default_statistics_target = 500 # range 1-10000
> from_collapse_limit = 30
> join_collapse_limit = 30 # 1 disables collapsing of explicit

Maybe you should be changing fewer variables at one time ...

In particular, decreasing random_page_cost as you've done here is
going to encourage the planner to rely on nestloop-with-inner-indexscan
joins. Does undoing that change improve matters?

I personally think that v12 is way too enthusiastic about invoking
JIT compilation, too. You might want to play with the parameters
for that as well.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message sugnathi hai 2020-05-30 07:36:49 Performance tunning
Previous Message Kenneth Marshall 2020-05-28 15:56:59 PostgreSQL performance problem moving from 9.6.17 to 12.3