public inbox for [email protected]
help / color / mirror / Atom feedPostgres performance issue with High CPU usage
3+ messages / 3 participants
[nested] [flat]
* Postgres performance issue with High CPU usage
@ 2025-02-04 17:11 KK CHN <[email protected]>
2025-02-04 17:14 ` Re: Postgres performance issue with High CPU usage Adrian Klaver <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: KK CHN @ 2025-02-04 17:11 UTC (permalink / raw)
To: pgsql-general
List,
Could someone point out how can I trace what causes the edb-postgres
process with %CPU usage reaching 73 to 80.1 percentage in this box.
What's wrong with the server VM..
The clients connecting the databases experience slow responses ..
The top out put of the DB server is pasted below..
Any hints much appreciated to trouble shoot this unusual load on the
server instance.
Thank you,
Krishane.
I
top - 22:34:13 up 61 days, 7:43, 3 users, load average: 8.76, 9.92, 19.12
Tasks: 697 total, 9 running, 687 sleeping, 1 stopped, 0 zombie
%Cpu(s): 34.3 us, 18.7 sy, 0.0 ni, 46.2 id, 0.0 wa, 0.5 hi, 0.3 si,
0.0 st
MiB Mem : 31837.6 total, 1296.9 free, 11447.0 used, 27969.1 buff/cache
MiB Swap: 8060.0 total, 7400.0 free, 660.0 used. 20390.5 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+
COMMAND
4007576 enterpr+ 20 0 8944520 951764 941212 R 80.1 2.9 0:57.24
edb-postgres
4035945 enterpr+ 20 0 8943056 472108 463068 R 79.7 1.4 0:11.48
edb-postgres
4020721 enterpr+ 20 0 8925752 702836 689644 S 73.1 2.2 0:27.99
edb-postgres
4036409 enterpr+ 20 0 8916540 368084 363772 S 43.5 1.1 0:01.31
edb-postgres
4036410 enterpr+ 20 0 8928512 481808 469852 S 32.2 1.5 0:03.52
edb-postgres
442070 enterpr+ 20 0 8908184 181248 180096 S 13.0 0.6 1391:16
edb-postgres
4041239 enterpr+ 20 0 8921696 995.0m 986.1m S 9.0 3.1 0:00.75
edb-postgres
4041225 enterpr+ 20 0 8921856
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Postgres performance issue with High CPU usage
2025-02-04 17:11 Postgres performance issue with High CPU usage KK CHN <[email protected]>
@ 2025-02-04 17:14 ` Adrian Klaver <[email protected]>
2025-02-04 17:35 ` Re: Postgres performance issue with High CPU usage Rakesh Nashine <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Klaver @ 2025-02-04 17:14 UTC (permalink / raw)
To: KK CHN <[email protected]>; pgsql-general
On 2/4/25 09:11, KK CHN wrote:
> List,
>
> Could someone point out how can I trace what causes the edb-postgres
> process with %CPU usage reaching 73 to 80.1 percentage in this box.
> What's wrong with the server VM..
What version of EDB database are you using?
If it is not their install of the community version available here:
https://www.postgresql.org/download/windows/
then this is probably a question for their tech support.
>
> The clients connecting the databases experience slow responses ..
>
> The top out put of the DB server is pasted below..
>
>
> Any hints much appreciated to trouble shoot this unusual load on the
> server instance.
>
> Thank you,
> Krishane.
>
>
>
>
> I
>
> top - 22:34:13 up 61 days, 7:43, 3 users, load average: 8.76, 9.92, 19.12
> Tasks: 697 total, 9 running, 687 sleeping, 1 stopped, 0 zombie
> %Cpu(s): 34.3 us, 18.7 sy, 0.0 ni, 46.2 id, 0.0 wa, 0.5 hi, 0.3 si,
> 0.0 st
> MiB Mem : 31837.6 total, 1296.9 free, 11447.0 used, 27969.1 buff/cache
> MiB Swap: 8060.0 total, 7400.0 free, 660.0 used. 20390.5 avail Mem
>
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+
> COMMAND
> 4007576 enterpr+ 20 0 8944520 951764 941212 R 80.1 2.9 0:57.24
> edb-postgres
> 4035945 enterpr+ 20 0 8943056 472108 463068 R 79.7 1.4 0:11.48
> edb-postgres
> 4020721 enterpr+ 20 0 8925752 702836 689644 S 73.1 2.2 0:27.99
> edb-postgres
> 4036409 enterpr+ 20 0 8916540 368084 363772 S 43.5 1.1 0:01.31
> edb-postgres
> 4036410 enterpr+ 20 0 8928512 481808 469852 S 32.2 1.5 0:03.52
> edb-postgres
> 442070 enterpr+ 20 0 8908184 181248 180096 S 13.0 0.6 1391:16
> edb-postgres
> 4041239 enterpr+ 20 0 8921696 995.0m 986.1m S 9.0 3.1 0:00.75
> edb-postgres
> 4041225 enterpr+ 20 0 8921856
--
Adrian Klaver
[email protected]
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Postgres performance issue with High CPU usage
2025-02-04 17:11 Postgres performance issue with High CPU usage KK CHN <[email protected]>
2025-02-04 17:14 ` Re: Postgres performance issue with High CPU usage Adrian Klaver <[email protected]>
@ 2025-02-04 17:35 ` Rakesh Nashine <[email protected]>
0 siblings, 0 replies; 3+ messages in thread
From: Rakesh Nashine @ 2025-02-04 17:35 UTC (permalink / raw)
To: Adrian Klaver <[email protected]>; +Cc: KK CHN <[email protected]>; pgsql-general
Just validate your environment once via the below states ...
-top -p $(pgrep -d',' postgres)
-Review the PostgreSQL logs (typically located in /var/log/postgresql/ or
/var/lib/pgsql/data/pg_log/)
-- check if any long running active query running via below query
SELECT pid, query, state, start_time, age(now(), start_time) AS duration
FROM pg_stat_activity
WHERE state = 'active'
ORDER BY duration DESC;
-- check if any locks persist via below query
SELECT pid, relation::regclass, mode, granted, query
FROM pg_locks l
JOIN pg_stat_activity a ON l.pid = a.pid
WHERE l.granted = 'f';
-- Analyze index if require via below qeury
EXPLAIN ANALYZE <your_query_here>;
--check if any autovacuum is in progress, that is also causes high CPU
SELECT * FROM pg_stat_autovacuum;
--Any background programs
SELECT * FROM pg_stat_bgwriter;
Thanks
Rakesh
On Tue, Feb 4, 2025 at 10:44 PM Adrian Klaver <[email protected]>
wrote:
> On 2/4/25 09:11, KK CHN wrote:
> > List,
> >
> > Could someone point out how can I trace what causes the edb-postgres
> > process with %CPU usage reaching 73 to 80.1 percentage in this box.
> > What's wrong with the server VM..
> What version of EDB database are you using?
>
> If it is not their install of the community version available here:
>
> https://www.postgresql.org/download/windows/
>
> then this is probably a question for their tech support.
>
> >
> > The clients connecting the databases experience slow responses ..
> >
> > The top out put of the DB server is pasted below..
> >
> >
> > Any hints much appreciated to trouble shoot this unusual load on the
> > server instance.
> >
> > Thank you,
> > Krishane.
> >
> >
> >
> >
> > I
> >
> > top - 22:34:13 up 61 days, 7:43, 3 users, load average: 8.76, 9.92,
> 19.12
> > Tasks: 697 total, 9 running, 687 sleeping, 1 stopped, 0 zombie
> > %Cpu(s): 34.3 us, 18.7 sy, 0.0 ni, 46.2 id, 0.0 wa, 0.5 hi, 0.3 si,
> > 0.0 st
> > MiB Mem : 31837.6 total, 1296.9 free, 11447.0 used, 27969.1
> buff/cache
> > MiB Swap: 8060.0 total, 7400.0 free, 660.0 used. 20390.5 avail
> Mem
> >
> > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+
> > COMMAND
> > 4007576 enterpr+ 20 0 8944520 951764 941212 R 80.1 2.9 0:57.24
> > edb-postgres
> > 4035945 enterpr+ 20 0 8943056 472108 463068 R 79.7 1.4 0:11.48
> > edb-postgres
> > 4020721 enterpr+ 20 0 8925752 702836 689644 S 73.1 2.2 0:27.99
> > edb-postgres
> > 4036409 enterpr+ 20 0 8916540 368084 363772 S 43.5 1.1 0:01.31
> > edb-postgres
> > 4036410 enterpr+ 20 0 8928512 481808 469852 S 32.2 1.5 0:03.52
> > edb-postgres
> > 442070 enterpr+ 20 0 8908184 181248 180096 S 13.0 0.6 1391:16
> > edb-postgres
> > 4041239 enterpr+ 20 0 8921696 995.0m 986.1m S 9.0 3.1 0:00.75
> > edb-postgres
> > 4041225 enterpr+ 20 0 8921856
>
> --
> Adrian Klaver
> [email protected]
>
>
>
>
--
Thanks & Regards
Rakesh Nashine
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2025-02-04 17:35 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-02-04 17:11 Postgres performance issue with High CPU usage KK CHN <[email protected]>
2025-02-04 17:14 ` Adrian Klaver <[email protected]>
2025-02-04 17:35 ` Rakesh Nashine <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox