Database block lifecycle - Mailing list pgsql-general

From pinker
Subject Database block lifecycle
Date
Msg-id 1407879679237-5814627.post@n5.nabble.com
Whole thread Raw
Responses Re: Database block lifecycle  (John R Pierce <pierce@hogranch.com>)
Re: Database block lifecycle  (Tatsuo Ishii <ishii@postgresql.org>)
Re: Database block lifecycle  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-general
Yesterday I had an interesting discussion with my colleague about shared
buffers size for our new server. This machine (is dedicated for db) has got
512GB of RAM and database size is about 80GB, so he assumes that db will
never have to read from disk, so there is no point to adjust read ahead
setting, because every block gonna be read from RAM. As I've red in Greg
Smith book, once a block is changed it will be written to a disk and buffers
page is marked as clean, which would mean than changes occur in the same
page as before? What if dirty page doesn't have enough space for another row
and row has to be written to another page? Is it still occurs in RAM? If
that's true all updates of FSM occurs in RAM as well?

What about buffers_clean and pg_clog then? Are those maintained completely
in RAM as well without direct read from disk at all?

To be precise, does the path to update and read updated row looks like a or
b?:
a). clean page (shared buffers) -> dirty page (shared buffers) -> to disk ->
read from disk -> shared buffers -> query
b). clean page (shared buffers) -> dirty page (shared buffers) -> to disk
& dirty page (shared buffers) -> clean page (shared buffers) -> query

btw. 512MB if we assume up to 600 connection is a reasonable value?




--
View this message in context: http://postgresql.1045698.n5.nabble.com/Database-block-lifecycle-tp5814627.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


pgsql-general by date:

Previous
From: dushy
Date:
Subject: Postgres 9.3 tuning advice
Next
From: Daniele Varrazzo
Date:
Subject: OIDs for jsonb type