Re: Same query taking less time in low configuration machine

From: Vishwa Kalyankar <vishwakalyankar8(at)gmail(dot)com>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Same query taking less time in low configuration machine
Date: 2020-07-16 16:51:35
Message-ID: CAFWaVn1YN00UHaga1yd5DR2i1MFCggHiSh1A3WQt4FGG5Ck6_g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi Justin,

I tried both the way, pg_dump and rsync of complete data_directory, but
the result is same.

Both the db's configurations are not same, I have tuned the db in both
machines according to https://pgtune.leopard.in.ua/#/

Below is the result of explain (analyze, buffer, settings) of both the db's.

High End Machine

IPDS_KSEB=# set track_io_timing TO on;
SET
IPDS_KSEB=# explain (analyze,buffers, settings) select * from
kseb_geometry_trace_with_barrier_partition(5,'kottarakara_version',437,'htline',2)
;

QUERY PLAN

-------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------
Function Scan on kseb_geometry_trace_with_barrier_partition
(cost=0.25..10.25 rows=1000 width=169) (actual time=24708.020..24708.048
rows=254 loops=1)
Buffers: shared hit=254235 read=1484
I/O Timings: read=827.509
Settings: effective_cache_size = '30GB', effective_io_concurrency = '2',
max_parallel_workers = '24', max_parallel_workers_per_gather = '4',
search_path = '
"$user", public, topology', work_mem = '10MB'
Planning Time: 0.064 ms
Execution Time: 24772.587 ms
(6 rows)

Low End Machine
IPDS_KSEB=# explain (analyze,buffers, settings) select * from
kseb_geometry_trace_with_barrier_partition(5,'kottarakara_version',437,'htline',2)
;

QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------------------------------------
Function Scan on kseb_geometry_trace_with_barrier_partition
(cost=0.25..10.25 rows=1000 width=169) (actual time=21870.311..21870.344
rows=389 loops=1)
Buffers: shared hit=774945
Settings: search_path = '"$user", public, topology'
Planning Time: 0.089 ms
Execution Time: 21870.406 ms
(5 rows)

On Thu, Jul 16, 2020 at 9:34 PM Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:

> On Thu, Jul 16, 2020 at 09:13:45PM +0530, Vishwa Kalyankar wrote:
> > Hi,
> >
> > I have two machines - one with 8GB RAM & 4core CPU and the other with
> 64GB
> > Ram & 24 core CPU. Both machines have the same DB (Postgres 12 + Postgis
> > 2.5.3). Same query is taking less time in low end machine whereas more
> > time in high end machine. Any thoughts on where to look? I have tuned
> the
>
> When you say "the same DB" what do you mean ?
> Is one a pg_dump and restore of the other ?
> Or a physical copy like rsync/tar of the data dir ?
>
> > Please find the attachment for query explain & analyze and bonnie
> result
> > of both the machines.
>
> Are the DB settings the ame or how do they differ ?
>
> Maybe you could send explain(analyze,buffers,timing,settings) ?
> https://wiki.postgresql.org/wiki/Slow_Query_Questions
>
> --
> Justin
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Justin Pryzby 2020-07-16 17:03:38 Re: Same query taking less time in low configuration machine
Previous Message Justin Pryzby 2020-07-16 16:04:23 Re: Same query taking less time in low configuration machine