pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedFrom: Michael Paquier <michael.paquier@gmail.com>
To: Melvin Davidson <melvin6925@gmail.com>
Cc: nikhil raj <nikhilraj474@gmail.com>
Cc: " <pgsql-general@postgresql.org>
Cc: pgsql-sql@postgresql.org
Cc: pgsql-admin@postgresql.org
Subject: Re: High CPU usage in postgres servers
Date: Tue, 26 Dec 2017 09:19:01 +0900
Message-ID: <20171226001901.GB8114@paquier.xyz> (raw)
In-Reply-To: <CANu8Fixp25AuTpa_S30f=536HkUGjb-SgLz_sg5y8Mj9=NE9Vg@mail.gmail.com>
References: <CAG1ps1wwTzJky2q=A7fYOKczBRXno2BkFYDEkYHbTgAAeGOxMA@mail.gmail.com>
<CANu8Fixp25AuTpa_S30f=536HkUGjb-SgLz_sg5y8Mj9=NE9Vg@mail.gmail.com>
On Mon, Dec 25, 2017 at 06:12:05PM -0500, Melvin Davidson wrote:
> On Mon, Dec 25, 2017 at 1:28 PM, nikhil raj <nikhilraj474@gmail.com> wrote:
>> Hi guys ,
>> when check the task manager I see these many postgres.exe are running. How
>> to identify which pid is running for which process please any one can help
>> me out.
>> or Why these many postgres.exe are running on the server
>>
>> [image: Inline image 1]
>>
>> Thanks ,
>> Nikhil
>>
>
> It appears your O/S is Windows, but you have not included which version of
> PostgreSQL.
> Since the structure of pg_stat_activity has changed between 9.4 and 9.5
> the best I can advise is to
> SELECT * FROM pg_stat_activity;
>
> Otherwise, I would give you a query tailored to your version of PostgreSQL.
Looking at queries that take a long time and look at their plans can help in
measuring the impact on CPU. For example, a sequential scan with a large ORDER
BY would be bad. Windows is also paked with perfmon (Performance Monitor) that
you could use. Combined with PostgreSQL logs with PID information, you could
always extract some information.
In the context of Windows which has no POSIX fork() implementation, note that
the build runs under the context of EXEC_BACKEND, where each process is directly
called via automaticly-built command lines.
Still you are giving close to no information regarding your system, so general
pieces of advices are the best you can get.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (832B, ../20171226001901.GB8114@paquier.xyz/2-signature.asc)
download
view thread (4+ messages)
Message-ID: <20171226001901.GB8114@paquier.xyz>
Permalink: ../20171226001901.GB8114@paquier.xyz/
Also on: postgresql.org/message-id/20171226001901.GB8114@paquier.xyz
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-sql@postgresql.org
Cc: michael.paquier@gmail.com, melvin6925@gmail.com, nikhilraj474@gmail.com, pgsql-general@postgresql.org, pgsql-admin@postgresql.org
Subject: Re: High CPU usage in postgres servers
In-Reply-To: <20171226001901.GB8114@paquier.xyz>
* 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