arizah
August 15, 2019, 12:27am
1
Hi Fellas,
Not sure how I can dig in even further but we notice that one of our DB servers is showing high Sys% CPU usage even though when I execute the following command :
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu
PID PPID CMD %MEM %CPU
496842 394979 postgres: port 40003, s4402 0.0 68.8
496825 394975 postgres: port 40000, s4402 0.0 68.7
496847 394980 postgres: port 40004, s4402 0.0 67.8
496836 394972 postgres: port 40002, s4402 0.0 67.2
496830 394969 postgres: port 40001, s4402 0.0 66.7
496852 394974 postgres: port 40005, s4402 0.0 64.9
496726 394974 postgres: port 40005, s4402 0.0 16.2
496720 394980 postgres: port 40004, s4402 0.0 15.6
496703 394969 postgres: port 40001, s4402 0.0 15.4
I can see that postgres is the only one using the CPU. So if anyone can advise me what would be the best way to trace down what type of System processes/tasks/activities could be running and possibly driving the high CPU usage would be great. thanks...
gull04
August 15, 2019, 4:56am
2
Hi,
Can you let us know some more about your system and it's OS please.
Regards
Gull04
1 Like
Neo
August 15, 2019, 5:38am
3
Maybe consider a book or online resource tutorial optimizing postgres, for example:
PostgreSQL 9.6 High Performance: Optimize your database with configuration tuning, routine maintenance, monitoring tools, query optimization and more
Note: I'm not recommending the book above, it is just an example of an "optimize your postgres db" book .....
I've not used Postgres in ages and am still using MySQL, generally speaking and only have experience tuning MySQL for the past ten years or so,
1 Like
arizah
August 15, 2019, 8:56am
4
Hi,
The version details are below:
Linux: Linux version 3.10.0-514.6.2.el7.x86_64 (mockbuild@x86-017.build.eng.bos.redhat.com) │
│ Build: (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) │
│ Release : 3.10.0-514.6.2.el7.x86_64 │
│ Version : #1 SMP Fri Feb 17 19:21:31 EST 2017 │
│ cpuinfo: model name : Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz │
│ cpuinfo: vendor_id : GenuineIntel │
│ cpuinfo: microcode : 0xb00001f │
│ cpuinfo: cpuid level : 20 │
│ # of CPUs: 48 │
│ Machine : x86_64 │
│ Nodename : gdm │
│ /etc/*ease[1]: NAME="Red Hat Enterprise Linux Server" │
│