pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Rambabu g <rambabu.g2564@gmail.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: HIGH IO and Less CPU utilization
Date: Tue, 29 Mar 2022 14:39:41 -0500
Message-ID: <20220329193941.GB28503@telsasoft.com> (raw)
In-Reply-To: <CADdgF6co=CgJBXmyNwE_GRg-Kayw5fe5WAeUQ8LDLs8s2Da_sQ@mail.gmail.com>
References: <CADdgF6ecxpubq-wm4bcDCyj3yt6uNjJgXKcdCS2Jn+NvE4abFw@mail.gmail.com>
	<20220329182453.GA28503@telsasoft.com>
	<CADdgF6co=CgJBXmyNwE_GRg-Kayw5fe5WAeUQ8LDLs8s2Da_sQ@mail.gmail.com>

On Wed, Mar 30, 2022 at 12:52:05AM +0530, Rambabu g wrote:
> > What indexes are defined on this table ?
> > How large are they ?
>
> There are three indexes defined on the table, each one is around 20 to 25GB
> and the indexes is create on

Did you mean to say something else after "on" ?

Show the definition of the indexes from psql \d

> postgres=# explain select distinct  empno  from emp where sname='test' and tp='EMP NAME 1'

Is this the only query that's performing poorly ?
You should send explain (analyze,buffers) for the prolematic queries.

> > > Hypervisor vendor:     KVM
> >
> > Are KSM or THP enabled on the hypervisor ?

> No, the Ec2 VM is delicate to postgres DB instances only.

Oh, so this is an EC2 and you cannot change the hypervisor itself.

> -bash-4.2$ tail /sys/kernel/mm/ksm/run /sys/kernel/mm/transparent_hugepage/khugepaged/defrag /sys/kernel/mm/transparent_hugepage/enabled /sys/kernel/mm/transparent_hugepage/defrag
...
> ==> /sys/kernel/mm/transparent_hugepage/defrag <==
> [always] madvise never

I doubt it will help, but you could try disabling these.
It's a quick experiment anyway.





view thread (8+ messages)  latest in thread

Message-ID: <20220329193941.GB28503@telsasoft.com>
Permalink:  ../20220329193941.GB28503@telsasoft.com/
Also on:    postgresql.org/message-id/20220329193941.GB28503@telsasoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: pryzby@telsasoft.com, rambabu.g2564@gmail.com, pgsql-performance@lists.postgresql.org
  Subject: Re: HIGH IO and Less CPU utilization
  In-Reply-To: <20220329193941.GB28503@telsasoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox