Re: High CPU load on Postgres Server during Peak times!!!!
От | Andy Colson |
---|---|
Тема | Re: High CPU load on Postgres Server during Peak times!!!! |
Дата | |
Msg-id | 4AB8E0AE.30508@squeakycode.net обсуждение исходный текст |
Ответ на | Re: High CPU load on Postgres Server during Peak times!!!! (Andy Colson <andy@squeakycode.net>) |
Ответы |
Re: High CPU load on Postgres Server during Peak times!!!!
|
Список | pgsql-performance |
Andy Colson wrote: > Shiva Raman wrote: >> Dear all >> >> I am having a problem of high cpu loads in my postgres server during >> peak time. Following are the >> details of my setup (details as per the postgres wiki) . >> >> >> *Following is the output of TOP command during offpeak time.* >> >> >> top - 18:36:56 up 77 days, 20:33, 1 user, load average: 12.99, 9.22, >> 10.37 >> Tasks: 142 total, 12 running, 130 sleeping, 0 stopped, 0 zombie >> Cpu(s): 46.1%us, 1.9%sy, 0.0%ni, 6.1%id, 3.0%wa, 0.0%hi, 0.1%si, >> 42.9%st >> Mem: 16133676k total, 13657396k used, 2476280k free, 450908k buffers >> Swap: 14466492k total, 124k used, 14466368k free, 11590056k cached >> > > > First off, nice report. > > I see you are on a pretty old version of pg. Are you vacuuming regularly? > > If you run a 'ps ax|grep post' do you see anything that says 'idle in > transaction'? (I hope that old of version will show it. my processes > show up as postgres not postmaster) > > The top looks like you are cpu bound. Have you tried enabling logging > slow queries? (again, I hope your version supports that) It could be > you have a query or two that are not using indexes, and slowing > everything down. > > Also on the top, it has this: 42.9%st. Are you in a vm? or running > vm's on the box? > > Its weird, you have 6.1% idle and 3.0% waiting for disk and yet you have > a load of 13. Load usually means somebody is waiting for something. But > you have a little cpu idle time... and you have very low disk waits... > you are using very little swap. hum... odd... > > -Andy > Looks like I missed an important point. You said this was top during off peak time. So ignore my high load ramblings. But... if this is off peak, and you only have 6% idle cpu... I'd say your cpu bound. (I'm still not sure what the 42.9%st is, so maybe I'm off base with the 6% idle too) -Andy
В списке pgsql-performance по дате отправления: