Re: Understanding pg_autovacuum CPU Usage

From: Thomas F(dot)O'Connell <tfo(at)sitening(dot)com>
To: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Understanding pg_autovacuum CPU Usage
Date: 2004-09-01 23:19:45
Message-ID: 6954A08F-FC6D-11D8-A557-000D93AE0944@sitening.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Robby Russell 2004-09-01 23:23:21 Re: Can't connect to Windows port + other
Previous Message Tom Lane 2004-09-01 23:19:20 Re: Can't connect to Windows port + other