Postgresql cache (memory) performance + how to warm up the cache

From: Shaul Dar <shauldar(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Postgresql cache (memory) performance + how to warm up the cache
Date: 2009-06-01 11:05:48
Message-ID: 234efe30906010405p48b55a91u83bccefc09271601@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

I have a DB table with 25M rows, ~3K each (i.e. ~75GB), that together with
multiple indexes I use (an additional 15-20GB) will not fit entirely in
memory (64GB on machine). A typical query locates 300 rows thru an index,
optionally filters them down to ~50-300 rows using other indexes, finally
fetching the matching rows. Response times vary between 20ms on a warm DB to
20 secs on a cold DB. I have two related questions:

1. At any given time how can I check what portion (%) of specific tables and
indexes is cached in memory?

2. What is the best way to warm up the cache before opening the DB to
queries? E.g. "select *" forces a sequential scan (~15 minutes on cold DB)
but response times following it are still poor. Is there a built-in way to
do this instead of via queries?a

Thanks, feel free to also reply by email (info(at)shauldar(dot)com])

-- Shaul

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message David Rees 2009-06-01 12:45:06 Re: Vacuuming technique doubt
Previous Message S Arvind 2009-06-01 05:26:07 Vacuuming technique doubt