pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
tmpfs and postgres memory
3+ messages / 3 participants
[nested] [flat]

* tmpfs and postgres memory
@ 2010-04-26 23:24 Anj Adu <fotographs@gmail.com>
  2010-04-27 03:59 ` Re: tmpfs and postgres memory Greg Spiegelberg <gspiegelberg@gmail.com>
  2010-04-28 00:56 ` Re: tmpfs and postgres memory Robert Haas <robertmhaas@gmail.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Anj Adu @ 2010-04-26 23:24 UTC (permalink / raw)
  To: pgsql-performance

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)

Sriram



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: tmpfs and postgres memory
  2010-04-26 23:24 tmpfs and postgres memory Anj Adu <fotographs@gmail.com>
@ 2010-04-27 03:59 ` Greg Spiegelberg <gspiegelberg@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Greg Spiegelberg @ 2010-04-27 03:59 UTC (permalink / raw)
  To: Anj Adu <fotographs@gmail.com>; +Cc: pgsql-performance

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: tmpfs and postgres memory
  2010-04-26 23:24 tmpfs and postgres memory Anj Adu <fotographs@gmail.com>
@ 2010-04-28 00:56 ` Robert Haas <robertmhaas@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Robert Haas @ 2010-04-28 00:56 UTC (permalink / raw)
  To: Anj Adu <fotographs@gmail.com>; +Cc: pgsql-performance

On Mon, Apr 26, 2010 at 7: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)

What does the output of "free -m" look like when the database is as
heavily used as it typically gets?

...Robert



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2010-04-28 00:56 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-04-26 23:24 tmpfs and postgres memory Anj Adu <fotographs@gmail.com>
2010-04-27 03:59 ` Greg Spiegelberg <gspiegelberg@gmail.com>
2010-04-28 00:56 ` Robert Haas <robertmhaas@gmail.com>

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