Обсуждение: High CPU usage of stats collector

Поиск
Список
Период
Сортировка

High CPU usage of stats collector

От
komunca
Дата:
On my db server I have noticed a very high CPU usage of process:
*postgres: stats collector process*

It is not below 50% of CPU. (Info from htop).

What is best way to decrease CPU usage of this process?

Thanks



--
View this message in context: http://postgresql.1045698.n5.nabble.com/High-CPU-usage-of-stats-collector-tp5750271.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: High CPU usage of stats collector

От
Magnus Hagander
Дата:
On Sun, Mar 31, 2013 at 11:44 PM, komunca <komunca@gmail.com> wrote:
> On my db server I have noticed a very high CPU usage of process:
> *postgres: stats collector process*
>
> It is not below 50% of CPU. (Info from htop).
>
> What is best way to decrease CPU usage of this process?

Do you by any chance have a large number of databases, and/or a large
number of objects in your databases (tables or indexes)?

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


Re: High CPU usage of stats collector

От
Michael Paquier
Дата:



On Fri, Apr 5, 2013 at 7:44 PM, Magnus Hagander <magnus@hagander.net> wrote:
On Sun, Mar 31, 2013 at 11:44 PM, komunca <komunca@gmail.com> wrote:
> On my db server I have noticed a very high CPU usage of process:
> *postgres: stats collector process*
>
> It is not below 50% of CPU. (Info from htop).
>
> What is best way to decrease CPU usage of this process?

Do you by any chance have a large number of databases, and/or a large
number of objects in your databases (tables or indexes)?
Could you output the result of this query?
SELECT count(*) FROM pg_class;
--
Michael

Re: High CPU usage of stats collector

От
komunca
Дата:
*288*



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/High-CPU-usage-of-stats-collector-tp5750271p5750925.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: High CPU usage of stats collector

От
komunca
Дата:
yes. maybe ~200 databases



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/High-CPU-usage-of-stats-collector-tp5750271p5750918.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: High CPU usage of stats collector

От
Jeff Janes
Дата:
On Sun, Mar 31, 2013 at 2:44 PM, komunca <komunca@gmail.com> wrote:
On my db server I have noticed a very high CPU usage of process:
*postgres: stats collector process*

It is not below 50% of CPU. (Info from htop).

What is best way to decrease CPU usage of this process?

This is a known issue when you have a large number of databases with a large number of objects each.

It will be fixed in 9.3.  In the meantime you can perhaps increase autovacuum_naptime, but that has tradeoffs.

Cheers,

Jeff