pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Brian McCane <bmccane@mccons.net>
To: pgsql-admin@postgresql.org
Subject: Re: performance issues
Date: Sat, 16 Jun 2001 15:51:29 -0500 (CDT)
Message-ID: <Pine.BSF.3.96.1010616154901.85663A-100000@fw.mccons.net> (raw)
In-Reply-To: <200106141635.f5EGZVv07369@candle.pha.pa.us>

On Thu, 14 Jun 2001, Bruce Momjian wrote:

> > 2. If you are on a platform where the kernel thinks it can swap out
> > parts of shared memory (which is most platforms, these days), it's
> > counterproductive to make your shared mem large enough that it's not
> > all being used heavily.  If the kernel decides to swap out some buffer
> > space, you have a net loss in performance, because you just wasted
> > disk I/O (especially if the page in the buffer is dirty --- it'll
> > eventually have to be read in again, then written out again, to no
> > purpose).
> 
> FYI, FreeBSD had the ability to disable shared memory swapping with a
> sysctl setting, while BSD/OS does not swap out shared memory.
> 
> -- 
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 853-3000
>   +  If your life is a hard drive,     |  830 Blythe Avenue
>   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 

I was going to mention this but had to get to my database machine to find
it first.  The command is:

sysctl -w kern.ipc.shm_use_phys=1

This is supposed to make shared memory use physical memory, but I don't
think it is a an absolute rule.  If you use too much memory, it will still
swap I believe.

- brian




view thread (6+ messages)

Message-ID: <Pine.BSF.3.96.1010616154901.85663A-100000@fw.mccons.net>
Permalink:  ../Pine.BSF.3.96.1010616154901.85663A-100000@fw.mccons.net/
Also on:    postgresql.org/message-id/Pine.BSF.3.96.1010616154901.85663A-100000@fw.mccons.net

 · 

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 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-sql@postgresql.org
  Cc: bmccane@mccons.net, pgsql-admin@postgresql.org
  Subject: Re: performance issues
  In-Reply-To: <Pine.BSF.3.96.1010616154901.85663A-100000@fw.mccons.net>
  References: <200106141635.f5EGZVv07369@candle.pha.pa.us> <Pine.BSF.3.96.1010616154901.85663A-100000@fw.mccons.net>

* 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