From: | wstrzalka <wstrzalka(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Stats collector eats my CPU |
Date: | 2008-10-08 11:07:40 |
Message-ID: | cc2c1eae-5d85-4816-8b34-5c4c0dcc5ec0@u29g2000pro.googlegroups.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
This is top of my 'top':
15483 postgres 15 0 147m 31m 284 R 17 0.8 29033:23 postgres
24599 postgres 15 0 1293m 274m 231m S 2 6.9 0:02.05 postgres
24598 postgres 15 0 1258m 99m 88m S 1 2.5 0:00.62 postgres
the 15483 process is stats collector. At the moment server is almost
idle but the stats collector is constantly taking 15-17% of CPU.
My statistics related settings looks like this:
track_activities on
track_counts on
default_statistics_target 100
I don't know if it matters at all, but maybe the reason is that the
cluster is very large in the term of relation number (many schemes
with identical table set).
------------------------------------------------------------------------------------
select count(*) from pg_class;
count
--------
257477
------------------------------------------------------------------------------------
I'm using PostgreSQL 8.3.1 on x86_64-redhat-linux-gnu, compiled by GCC
gcc (GCC) 4.1.2 20070626 (Red Hat 4.1.2-14)
The 15% isn't much and I can afford it but what's strange there is
really small trafic at the moment (in average about 5%), and the DML's
are about 5% of it. So what is the stat collector doing? I'm affraid
what will happend if the real query traffic will increase.
Maybe the PGSTAT_STAT_INTERVAL is the issue in my case (vary large
schema)? The PG is from yum.
Any suggestions? Should I worry? Can I do anything about it?
(adjusting schema will not be easy :D )
Wojtek Strzalka
From | Date | Subject | |
---|---|---|---|
Next Message | A B | 2008-10-08 11:20:47 | How to find not unique rows in a table? |
Previous Message | Scott Marlowe | 2008-10-08 07:33:32 | Re: localhost (windows) performance |