Re: how to make PostgreSQL using "all" memory and chaching the DB completely there

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>Christoph Anton Mitterer
<christoph.anton.mitterer@xxxxxxxxxxxxxxxxxxxxxx>
wrote: 
 
> What we have here at the institute is a quite powerful server,
> whit about 100GB RAM that has a PostgreSQL running on it (with
> several DBs).
 
In one cluster (postmaster instance) or separate?
 
> Currently it's 8.4 but we shall switch to 9.x eventually. The
> database is (physical) size is currently at about 30 GB.
 
30 GB is the total of all the databases?
 
> What I'd like to have, is that Postgresql uses at MAX say 50% 
> (~50GB) of the available memory.
 
The only way to do that is with OS limits, like ulimit.  Of course,
if you set the shared_buffers well under that and use reasonable
settings for other parameters, it won't tend to go above that unless
the RAM is unused by any other process.  If you really want to be
sure some amount of RAM is not used by *any* process, the best way
is to pull it out of the machine and set it on a shelf -- it will do
as much good there as sitting unused in a machine.  ;-)
 
> And there it should completely cache the DB for _reading_.
 
If there's sufficient unused RAM on the machine, it will do this
automatically.
 
> When any writes occur, these should still be sent "immediately" to
> disk.
 
The writes are persisted on COMMIT (before the COMMIT statement
completes), unless you configure for unsafe values.  Make sure that
fsync, full_page_writes, and synchronous_commit are all on.
 
Make sure you have a good RAID controller with battery-back-up
caching configured for write-back.
 
-Kevin

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux