Re: Debian Bug#506196: postgresql: consume too much power when idle (>10 wakeups/second) - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: Debian Bug#506196: postgresql: consume too much power when idle (>10 wakeups/second)
Date
Msg-id 20090104212219.GC26552@alvh.no-ip.org
Whole thread Raw
In response to Re: Debian Bug#506196: postgresql: consume too much power when idle (>10 wakeups/second)  (Martin Pitt <martin@piware.de>)
Responses Re: Debian Bug#506196: postgresql: consume too much power when idle (>10 wakeups/second)
List pgsql-bugs
Martin Pitt wrote:
> Hi Alvaro,
>
> Alvaro Herrera [2009-01-04 18:05 -0300]:
> > How many databases are there?
>
> It's a freshly created instance, thus just "template[01]" and
> "postgres". Standard 8.3 autovacuum is enabled.

I think we must blame bgwriter then.  I had a look at it some time ago
to how hard would it be to remove the useless wakeups and concluded that
it wasn't really worth the trouble.  Not that I looked that hard;
probably someone smarter (and/or with more time) can find ways to
optimize it.  See BgWriterNap in

http://git.postgresql.org/?p=postgresql.git;a=blob;f=src/backend/postmaster/bgwriter.c

(Note that with the current code, you can put it to rest for 10 seconds
at a time by setting bgwriter_lru_maxpages to 0 in postgresql.conf)

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-bugs by date:

Previous
From: Martin Pitt
Date:
Subject: Re: Debian Bug#506196: postgresql: consume too much power when idle (>10 wakeups/second)
Next
From: Tom Lane
Date:
Subject: Re: Debian Bug#506196: postgresql: consume too much power when idle (>10 wakeups/second)