Can we load all database objects in memory?

Started by DMabout 17 years ago7 messagesgeneral
Jump to latest
#1DM
dm.aeqa@gmail.com

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

#2ries van Twisk
ries@vantwisk.nl
In reply to: DM (#1)
Re: [SQL] Can we load all database objects in memory?

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

Show quoted text

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

Attachments:

smime.p7sapplication/pkcs7-signature; name=smime.p7sDownload
#3ries van Twisk
pg@rvt.dds.nl
In reply to: DM (#1)
Re: [SQL] Can we load all database objects in memory?

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:

Show quoted text

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

#4Iñigo Martinez Lasala
imartinez@vectorsf.com
In reply to: DM (#1)
Re: Can we load all database objects in memory?

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

#5Iñigo Martinez Lasala
imartinez@vectorsf.com
In reply to: ries van Twisk (#3)
Re: [SQL] Can we load all database objects in memory?

And I replied to all list also...
Sorry. :(

-----Original Message-----
From: ries van Twisk <pg@rvt.dds.nl>
To: DM <dm.aeqa@gmail.com>
Cc: pgsql-admin@postgresql.org, pgsql-general@postgresql.org,
pgsql-sql@postgresql.org
Subject: Re: [ADMIN] [SQL] Can we load all database objects in memory?
Date: Wed, 25 Mar 2009 15:07:21 -0500

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:

Show quoted text

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

#6Scott Marlowe
scott.marlowe@gmail.com
In reply to: DM (#1)
Re: [SQL] Can we load all database objects in memory?

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.

#7Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Iñigo Martinez Lasala (#4)
Re: [ADMIN] Can we load all database objects in memory?

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