Re: High CPU usage

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: ertan(dot)kucukoglu(at)1nar(dot)com(dot)tr, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: High CPU usage
Date: 2022-10-22 15:56:18
Message-ID: 253189e9-764d-48ec-d911-4288a5f864fe@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/20/22 12:59, ertan(dot)kucukoglu(at)1nar(dot)com(dot)tr wrote:
> Hello,
>
> I am using PostgreSQL v14.5 on Linux Debian 11.5. I recently observe very
> high CPU usage on my Linux system as below
>
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+
> COMMAND
> 2357756 postgres 20 0 2441032 2,3g 4 S 298,7 67,9 2114:58
> Tspjzj2Z

The USER is the system user postgres which could be running any program
not necessarily the Postgres server. In this case that would seem to be
the program Tspjzj2Z.

Try running:

top -U postgres -c

to get the full command line under COMMAND.

>
> I could not find any file named Tspjzj2Z on the file system. I could not
> find PID number using below SQL

I doubt this has anything to do with the Postgres server itself.

Is this machine accessible to the Internet?

There is the possibility you have had an intrusion.

>
> SELECT * FROM pg_stat_activity
>
> I also see another suggestion like below to identify long running queries
>
> SELECT max(now() - xact_start) FROM pg_stat_activity
> WHERE state IN ('idle in transaction',
> 'active');
>
> I get no long running query at all.
>
> There is no replication of any kind. This is a single instance server which
> alows certification login only.
>
> I appreciate any help to figure this out.
>
> Thanks & Regards,
> Ertan
>
>
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2022-10-22 16:20:02 Re: pg_restore 12 "permission denied for schema" errors
Previous Message Joseph Kennedy 2022-10-22 15:28:37 synchronous streaming replication