Thread: High CPU usage of stats collector
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.
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/
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:Do you by any chance have a large number of databases, and/or a large
> 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?
number of objects in your databases (tables or indexes)?
Could you output the result of this query?
SELECT count(*) FROM pg_class;
Michael
*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.
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.
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