From: | bing1221 <bzhao(at)recognia(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | High CPU usage buy low I/O wait |
Date: | 2013-04-11 23:30:54 |
Message-ID: | 1365723054732-5751860.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Our server is running postgresql 8.4.15. During day time the cpu usage always
around 80%, but it's not IO bound. The swap space is looking OK also. Also
we setup pgbadger and enable all logs to monitor the slow query but they all
finished quick. Usually it has 60 incoming connections, and we have
pgbouncer to control the pool. Any suggestions I can look into it? Thank
you.
________________________________________________________________________
top - 19:21:28 up 33 days, 9:50, 1 user, load average: 23.07, 22.39,
18.68
Tasks: 221 total, 19 running, 202 sleeping, 0 stopped, 0 zombie
Cpu0 : 96.3%us, 1.3%sy, 0.0%ni, 1.0%id, 0.3%wa, 0.0%hi, 1.0%si,
0.0%st
Cpu1 : 98.0%us, 0.7%sy, 0.0%ni, 0.7%id, 0.3%wa, 0.0%hi, 0.3%si,
0.0%st
Cpu2 : 98.7%us, 0.7%sy, 0.0%ni, 0.3%id, 0.0%wa, 0.0%hi, 0.3%si,
0.0%st
Cpu3 : 97.7%us, 0.7%sy, 0.0%ni, 0.7%id, 0.7%wa, 0.0%hi, 0.3%si,
0.0%st
Cpu4 : 96.4%us, 1.3%sy, 0.0%ni, 0.7%id, 1.0%wa, 0.0%hi, 0.7%si,
0.0%st
Cpu5 : 98.3%us, 0.7%sy, 0.0%ni, 0.7%id, 0.3%wa, 0.0%hi, 0.0%si,
0.0%st
Cpu6 : 98.7%us, 0.7%sy, 0.0%ni, 0.7%id, 0.0%wa, 0.0%hi, 0.0%si,
0.0%st
Cpu7 : 97.7%us, 0.7%sy, 0.0%ni, 1.0%id, 0.3%wa, 0.0%hi, 0.3%si,
0.0%st
Mem: 32959796k total, 32802508k used, 157288k free, 145484k buffers
Swap: 67108856k total, 1596k used, 67107260k free, 29718168k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
32119 postgres 16 0 8005m 2.7g 2.7g R 48.8 8.7 9:11.03 postmaster
3688 postgres 15 0 8005m 2.4g 2.4g R 41.5 7.7 7:52.75 postmaster
23530 postgres 15 0 8003m 2.9g 2.8g S 39.2 9.1 11:02.56 postmaster
23528 postgres 16 0 8002m 2.8g 2.8g S 37.5 8.9 11:13.92 postmaster
23534 postgres 15 0 8007m 2.9g 2.9g S 36.5 9.3 11:21.66 postmaster
_______________________________________________________________________
procs -----------memory---------- ---swap-- -----io---- --system--
-----cpu------
r b swpd free buff cache si so bi bo in cs us sy id
wa st
18 5 1596 157668 145572 29696372 0 0 150 160 0 1 36 1 60
4 0
27 2 1596 163952 145476 29689472 0 0 1408 1472 2142 2190 97 1 0
1 0
21 1 1596 162824 145488 29691976 0 0 1548 3300 2269 2592 96 1 2
1 0
24 3 1596 161248 145488 29693124 0 0 1144 1612 3426 2149 98 1 1
0 0
11 2 1596 158900 145488 29696108 0 0 2368 1776 2189 2324 98 1 0
1 0
15 3 1596 162144 145324 29693576 0 0 4412 1592 2669 2852 97 1 1
1 0
____________________________________________________________________
checkpoint_completion_target = 0.9
max_connections = 160
shared_buffers = 7680MB
work_mem = 104MB
maintenance_work_mem = 1GB
effective_cache_size = 22GB
--
View this message in context: http://postgresql.1045698.n5.nabble.com/High-CPU-usage-buy-low-I-O-wait-tp5751860.html
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2013-04-12 06:14:10 | Re: [PERFORM] Postgres log(pg_logs) have lots of message |
Previous Message | Thiyagarajan, Palaniappan | 2013-04-11 21:09:33 | PsqL8.3 |