Re: Re[2]: [PERFORM] SMP on a heavy loaded database

From: Claudio Freire <klaussfreire(at)gmail(dot)com>
To: nobody nowhere <devnull(at)mail(dot)ua>
Cc: postgres performance list <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Re[2]: [PERFORM] SMP on a heavy loaded database
Date: 2013-01-04 19:04:00
Message-ID: CAGTBQpZvD1jm5PCoRcBJraRFWNsn1urRH2=SJ-byAiYr1ycjfg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, Jan 4, 2013 at 3:38 PM, nobody nowhere <devnull(at)mail(dot)ua> wrote:
>
> An unfiltered top or ps might give you a clue. You could also try
>
> Look at letter on the topic start.

It's filtered by -u postgres, so you can't see apache there.

> iotop, php does hit the filesystem (sessions stored in disk), and if
> it's on the same partition as postgres, postgres' fsyncs might cause
> it to flush to disk quite heavily.
>
> The question was "which PID is using that core?"
> Can you using top or iotop certanly answer on this question? I can't.

If you see some process hogging CPU/IO in a way that's consistent with
CPU14, then you have a candidate. I don't see much in that iotop,
except the 640k/s writes in pg's writer, which isn't much at all
unless you have a seriously underpowered/broken system. If all fails,
you can look for processes with high accumulated cputime, like the
"monitor" ones there on the first top (though it doesn't say much,
since that top is incomplete), or the walsender. Without the ability
to compare against all other processes, none of that means much - but
once you do, you can inspect those processes more closely.

Oh... and you can also tell top to show the "last used processor". I
guess I should have said this first ;-)

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2013-01-04 20:40:51 Re: FW: performance issue with a 2.5gb joinded table
Previous Message Vitalii Tymchyshyn 2013-01-04 18:05:28 Re: Postgres delete performance problem