Thread: Can we load all database objects in memory?
Hi All,
I have a database of 10GB.
My Database Server has a RAM of 16GB
Is there a way that I can load all the database objects to memory?
Thanks for your time and taking a look at this question.
Thanks
Deepak
Deepak, please don't cross-post the same question to 3 different lists. The short answer is no, you cannot force PostgreSQL to load all objects into memory. However when you proper configure PostgreSQL most, if not all of your data will be cached by the OS and/or PostgreSQL shared memory system. Ries On Mar 25, 2009, at 2:20 PM, DM wrote: > Hi All, > > I have a database of 10GB. > My Database Server has a RAM of 16GB > > Is there a way that I can load all the database objects to memory? > > Thanks for your time and taking a look at this question. > > > Thanks > Deepak
On Wed, Mar 25, 2009 at 1:20 PM, DM <dm.aeqa@gmail.com> wrote: > Hi All, > > I have a database of 10GB. > My Database Server has a RAM of 16GB > > Is there a way that I can load all the database objects to memory? Just replying to pgsql-general... Yeah, just select * from table for each table, then they'll be in kernel cache and ready to go.
Increase effective_cache_size parameter.
An "effective_cache_size=11GB" should be more than enough.
-----Original Message-----
From: DM <dm.aeqa@gmail.com>
To: pgsql-admin@postgresql.org, pgsql-general@postgresql.org, pgsql-sql@postgresql.org
Subject: [ADMIN] Can we load all database objects in memory?
Date: Wed, 25 Mar 2009 12:20:08 -0700
Hi All, I have a database of 10GB. My Database Server has a RAM of 16GB Is there a way that I can load all the database objects to memory? Thanks for your time and taking a look at this question. Thanks Deepak
An "effective_cache_size=11GB" should be more than enough.
-----Original Message-----
From: DM <dm.aeqa@gmail.com>
To: pgsql-admin@postgresql.org, pgsql-general@postgresql.org, pgsql-sql@postgresql.org
Subject: [ADMIN] Can we load all database objects in memory?
Date: Wed, 25 Mar 2009 12:20:08 -0700
Hi All, I have a database of 10GB. My Database Server has a RAM of 16GB Is there a way that I can load all the database objects to memory? Thanks for your time and taking a look at this question. Thanks Deepak
Deepak, please don't cross-post the same question to 3 different lists. The short answer is no, you cannot force PostgreSQL to load all objects into memory. However when you proper configure PostgreSQL most, if not all of your data will be cached by the OS and/or PostgreSQL shared memory system. Ries > Hi All, > > I have a database of 10GB. > My Database Server has a RAM of 16GB > > Is there a way that I can load all the database objects to memory? > > Thanks for your time and taking a look at this question. > > > Thanks > Deepak
Attachment
Iñigo Martinez Lasala wrote: >> Hi All, I have a database of 10GB. My Database Server has a >> RAM of 16GB Is there a way that I can load all the database >> objects to memory? Thanks for your time and taking a look >> at this question. Thanks Deepak > > Increase effective_cache_size parameter. > > An "effective_cache_size=11GB" should be more than enough. Sorry, but that is quite wrong. effective_cache_size only affects the planner, not memory utilization. You can use shared_buffers=11GB to give PostgreSQL memory enough to buffer all of a 10GB database in memory. But that does not automatically put all the tables in memory. Yours, Laurenz Albe