pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Close <narshe@gmail.com>
Cc: POSTGRES-PERFORMANCE <pgsql-performance@postgresql.org>
Subject: Re: slow queries, possibly disk io
Date: Tue, 31 May 2005 10:33:33 -0400
Message-ID: <11908.1117550013@sss.pgh.pa.us> (raw)
In-Reply-To: <4a0cafe20505310617d803a0c@mail.gmail.com>
References: <4a0cafe205052613242e0d4d10@mail.gmail.com>
	<758d5e7f05052614232f6c9164@mail.gmail.com>
	<4a0cafe205052706043ef8f53f@mail.gmail.com>
	<4a0cafe205052706042d4e60e5@mail.gmail.com>
	<14584.1117204158@sss.pgh.pa.us>
	<429B90D1.9030402@wildcash.com>
	<4a0cafe20505310617d803a0c@mail.gmail.com>

Josh Close <narshe@gmail.com> writes:
> There is 2 gigs of mem in this server. Here are my current settings.

> max_connections = 100
> shared_buffers = 50000
> sort_mem = 4096
> vacuum_mem = 32768
> effective_cache_size = 450000

> Shared buffers is set to 10% of total mem. Effective cache size is 90% of mem.

Uh, shared_buffers and effective_cache_size are both measured in pages,
which are 8K apiece unless you built with a nondefault BLCKSZ.  So the
above calculations are off ...

> Is there anything that can be done to have postgres grab more from
> memory rather than disk?

It's not so much a matter of what Postgres will do as what the kernel
will do.  Check to see if there is some limit on how much memory the
kernel will set aside for disk buffers.  Plain old "top" will generally
tell you what is going on, though interpreting its output sometimes
requires some wizardry.

			regards, tom lane



view thread (16+ messages)  latest in thread

Message-ID: <11908.1117550013@sss.pgh.pa.us>
Permalink:  ../11908.1117550013@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11908.1117550013@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, narshe@gmail.com
  Subject: Re: slow queries, possibly disk io
  In-Reply-To: <11908.1117550013@sss.pgh.pa.us>

* 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