From: Greg Spiegelberg <gspiegelberg@gmail.com>
To: Anj Adu <fotographs@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: tmpfs and postgres memory
Date: Mon, 26 Apr 2010 21:59:50 -0600
Message-ID: <w2z22723571004262059n36f065ai5ff22e08a6920a2c@mail.gmail.com> (raw)
In-Reply-To: <q2of2fd819a1004261624u985929a5s6d9250f9db77943b@mail.gmail.com>
References: <q2of2fd819a1004261624u985929a5s6d9250f9db77943b@mail.gmail.com>
On Mon, Apr 26, 2010 at 5:24 PM, Anj Adu <fotographs@gmail.com> wrote:
> I have a 16G box and tmpfs is configured to use 8G for tmpfs .
>
> Is a lot of memory being wasted that can be used for Postgres ? (I am
> not seeing any performance issues, but I am not clear how Linux uses
> the tmpfs and how Postgres would be affected by the reduction in
> memory)
Like Solaris, tmpfs is from swap and swap is both memory and disk so
there is no guarantee when you're using it that it will be the fast
memory based file system you're looking for.
What you may be wanting is ramfs. Unlike tmpfs, it is 100% memory.
Another difference is though you may mount a ramfs file system
specifying a size, no real size is enforced. If you have 2GB of
memory and attempt to copy 2GB of files to a ramfs mount point the
system will do it until all the space, i.e. memory, is gone.
Both tmpfs and ramfs come with a price, that is at the flick of a
switch, loss of power or other cause that resets or reboots the system
all data is lost. That reason doesn't necessarily mean you can't use
a memory based file system it just limits it's applications.
Personally, I'd find a way to tell PostgreSQL about the memory before
toying with tmpfs or ramfs but I'm sure our applications are
different.
-Greg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: gspiegelberg@gmail.com, fotographs@gmail.com
Subject: Re: tmpfs and postgres memory
In-Reply-To: <w2z22723571004262059n36f065ai5ff22e08a6920a2c@mail.gmail.com>
References: <q2of2fd819a1004261624u985929a5s6d9250f9db77943b@mail.gmail.com> <w2z22723571004262059n36f065ai5ff22e08a6920a2c@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox