pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
High CPU usage in postgres servers
4+ messages / 3 participants
[nested] [flat]

* High CPU usage in postgres servers
@ 2017-12-25 18:28  nikhil raj <nikhilraj474@gmail.com>
  0 siblings, 2 replies; 4+ messages in thread

From: nikhil raj @ 2017-12-25 18:28 UTC (permalink / raw)
  To: pgsql-general@postgresql.org; pgsql-sql; pgsql-admin@postgresql.org

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

Attachments:

  [image/png] postgres_qust.png (68.3K, ../../CAG1ps1wwTzJky2q=A7fYOKczBRXno2BkFYDEkYHbTgAAeGOxMA@mail.gmail.com/3-postgres_qust.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Fwd: High CPU usage in postgres servers
@ 2017-12-25 18:32  nikhil raj <nikhilraj474@gmail.com>
  parent: nikhil raj <nikhilraj474@gmail.com>
  1 sibling, 0 replies; 4+ messages in thread

From: nikhil raj @ 2017-12-25 18:32 UTC (permalink / raw)
  To: pgsql-sql

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

Attachments:

  [image/png] postgres_qust.png (68.3K, ../../CAG1ps1yM0_Fgj-Q8nPq5TRrkuETKH16SQZd_Do=z2_94vVm4Yg@mail.gmail.com/3-postgres_qust.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: High CPU usage in postgres servers
@ 2017-12-25 23:12  Melvin Davidson <melvin6925@gmail.com>
  parent: nikhil raj <nikhilraj474@gmail.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Melvin Davidson @ 2017-12-25 23:12 UTC (permalink / raw)
  To: nikhil raj <nikhilraj474@gmail.com>; +Cc: " <pgsql-general@postgresql.org>; pgsql-sql; pgsql-admin@postgresql.org

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.
-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

Attachments:

  [image/png] postgres_qust.png (68.3K, ../../CANu8Fixp25AuTpa_S30f=536HkUGjb-SgLz_sg5y8Mj9=NE9Vg@mail.gmail.com/3-postgres_qust.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: High CPU usage in postgres servers
@ 2017-12-26 00:19  Michael Paquier <michael.paquier@gmail.com>
  parent: Melvin Davidson <melvin6925@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Michael Paquier @ 2017-12-26 00:19 UTC (permalink / raw)
  To: Melvin Davidson <melvin6925@gmail.com>; +Cc: nikhil raj <nikhilraj474@gmail.com>; " <pgsql-general@postgresql.org>; pgsql-sql; pgsql-admin@postgresql.org

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

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2017-12-26 00:19 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-12-25 18:28 High CPU usage in postgres servers nikhil raj <nikhilraj474@gmail.com>
2017-12-25 18:32 ` nikhil raj <nikhilraj474@gmail.com>
2017-12-25 23:12 ` Melvin Davidson <melvin6925@gmail.com>
2017-12-26 00:19   ` Michael Paquier <michael.paquier@gmail.com>

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