Re: Understanding pg_autovacuum CPU Usage - Mailing list pgsql-general

From Thomas F.O'Connell
Subject Re: Understanding pg_autovacuum CPU Usage
Date
Msg-id 6954A08F-FC6D-11D8-A557-000D93AE0944@sitening.com
Whole thread Raw
In response to Re: Understanding pg_autovacuum CPU Usage  ("Matthew T. O'Connor" <matthew@zeut.net>)
List pgsql-general
On Sep 1, 2004, at 5:09 PM, Matthew T. O'Connor wrote:

> This is the first report I have heard of pg_autovacuum causing cpu
> usage spikes.  When pg_autovacuum wakes up, it loops through all the
> databases checking for recent activity and decides if it is time to do
> something.  I would think that pg_autovacuum wouldn't use much CPU
> during this time since it would be waiting a lot on connection startup
> and query responses from the server.  I suppose that it could use a
> noticeable amount of CPU if you had a lot of databases for it to loop
> through and a very small connection time.

Well, I don't have a lot of databases, but I do have tens of thousands
of tables, many of which have hundreds of thousands of rows. I don't
know if that plays into things.

> Are you using pooled connections?

No.

> Also is this 7.4.x or 8.0 beta?

Oops. Sorry. It's 7.4.5, specifically.

> Can you hook up a debugger and see what it's doing during the CPU
> spikes?

That's going to be a little tricky because it's a production
environment. So far, the spikes haven't hurt too much because they
don't last very long. I'll see if I can get anything similar to occur
in our development environment.

-tfo


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Can't connect to Windows port + other
Next
From: Robby Russell
Date:
Subject: Re: Can't connect to Windows port + other