Limit of bgwriter_lru_maxpages of max. 1000?

From: Gerhard Wiesinger <lists(at)wiesinger(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Limit of bgwriter_lru_maxpages of max. 1000?
Date: 2009-09-27 06:06:13
Message-ID: alpine.LFD.2.00.0909270731120.21738@bbs.intern
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I think the limit of bgwriter_lru_maxpages of max. 1000 doesn't make any
sense because in fact it limits performance of the database (version 8.3).

On heavy write operations buffer cached must be freed. With the default
config this is practically limited to:
bgwriter_delay=200ms
bgwriter_lru_maxpages=100
8k*bgwriter_lru_maxpages*1000/bgwriter_delay=
=8k*100*1000/200=4000k=4MB/s
Isn't that a major performancd bottleneck in default config?

bgwriter_delay=200ms
bgwriter_lru_maxpages=1000
8k*bgwriter_lru_maxpages*1000/bgwriter_delay=
=8k*1000*1000/200=40000k=40MB/s
Still not a very high number for current I/O loads.

Lowering bgwriter_delay is possible, but I think overhead is too much and
still there is a limit of 800MB/s involved:
bgwriter_delay=10ms
bgwriter_lru_maxpages=1000
8k*bgwriter_lru_maxpages*1000/bgwriter_delay=
=8k*1000*1000/10=800000k=800MB/s

So I think it would be better to have such a configuration:
bgwriter_delay=50ms
bgwriter_lru_maxpages=100000
8k*bgwriter_lru_maxpages*1000/bgwriter_delay=
=8k*100000*1000/50=16000000k=16000MB/s

So in fact I think bgwriter_lru_maxpages should be limited to 100000 if
limited at all.

Are my argumentations correct?
Any comments?

Thnx.

Ciao,
Gerhard

--
http://www.wiesinger.com/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gerhard Wiesinger 2009-09-27 06:14:37 Re: Problem with data corruption and psql memory usage
Previous Message Tom Lane 2009-09-27 04:41:47 Re: Idle processes chewing up CPU?