Re: Hot Standby performance issue

From: Tomas Vondra <tv(at)fuzzy(dot)cz>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Hot Standby performance issue
Date: 2013-10-21 23:14:42
Message-ID: 5265B562.3040407@fuzzy.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 22.10.2013 00:59, sparikh wrote:
> Yes, Expalin without Analyze is taking long. It is weird. In the
> pg_stat_activity Explain was the only query running. So server was
> almost idle. Using New relic interface I checked CPU was almost idle
> - around 10-20%. There were some IO activity - around 40-50%.
>
> I forgot to mention before I could run perf on command line even with
> root permission. It says command not found. May be utility is not
> installed or not enabled.

Obviously you need to install it ... maybe ask your sysadmin to do that.

> I have attached the snapshot of vmstat while explain was running in
> background. vmstat.txt
> <http://postgresql.1045698.n5.nabble.com/file/n5775349/vmstat.txt>

The vmstat clearly shows that ~1 CPU is waiting on I/O. Hmm, I'm really
wondering what's going on here - I can't think of a case where this
would happen with a plain EXPLAIN ...

We really need the perf results. Or try to run strace, maybe it'll give
more info about which files it accesses.

> Do you suggest if I remove all the data files from /data/base folder
> of standby and again rebuild using rsync from primary ? do you see
> any issues there.? This is just to rule out any fragmentation on
> standby side.

The EXPLAIN really should not do much I/O. I doubt it has anything to do
with fragmentation, so I doubt this is going to help.

> Our sys admin is planning to run fsck sometime today or tomorrow.

OK. Which filesystem do you use, btw?

Tomas

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message sparikh 2013-10-22 00:00:45 Re: Hot Standby performance issue
Previous Message sparikh 2013-10-21 22:59:37 Re: Hot Standby performance issue