pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ragnar Kjørstad <postgres@ragnark.vestdata.no>
To: xbdelacour@yahoo.com
Cc: pgsql-admin@postgresql.org
Subject: Re: Large database help
Date: Tue, 24 Apr 2001 02:06:26 +0200
Message-ID: <20010424020625.C7572@vestdata.no> (raw)
In-Reply-To: <5.0.2.1.0.20010423180546.02ad3a40@pop.mail.yahoo.com>
References: <5.0.2.1.0.20010422184417.01972e70@pop.mail.yahoo.com>
	<5.0.2.1.0.20010422165107.02b46ec0@209.61.155.192>
	<5.0.2.1.0.20010422165107.02b46ec0@209.61.155.192>
	<20010423004646.A4724@vestdata.no>
	<5.0.2.1.0.20010422184417.01972e70@pop.mail.yahoo.com>
	<20010423181517.B4323@vestdata.no>
	<5.0.2.1.0.20010423180546.02ad3a40@pop.mail.yahoo.com>

On Mon, Apr 23, 2001 at 06:13:38PM -0400, xbdelacour@yahoo.com wrote:
> A smaller snippet:
> 
> shmget(5432001, 400385024, IPC_CREAT|0x180|0600) = 2945
> shmget(5432001, 400385024, 0)           = 2945
> shmat(2945, 0, 0)                       = 0x40176000
> 
> I'm no Unix expert, but this would seem to indicate that shmget is 
> successfully allocating 400385024/1024/1024=381MB of shared memory. I don't 
> know enough about how the postgres parent/child/shmem scheme works to know 
> why this is working yet the children only register 12MB of shared memory 
> under top.

I believe you're right that it allocates the memory (succesfully).

The reason top only show 12 MB shared memory may be that the process
haven't actually used the whole segment yet. (linux only allocates the
memory when it's first written to)

I suppose it could be that postgres doesn't write to the memory-segment,
because it doesn't need it. For read access to the file, the OS wil
cache the data anyway, and there is no need to use process memory to
access the file-data. 

Maybe the whole shared-memory issue was a blind track - it should not be
related to disk activety in this case?

Note: some disk activety should be expected. Maybe postgresql updates
the log? Or at the very least it will update the atime timestamps for
the files everytime they're read. This shouldn't cause enough disk
activity to become a performance-problem, but if I remember your initial
post correctly, you indicated that one processor was fully saturated.

Maybe the problem is in fact related to locking and smp, and not related
to shared-memory and disk activity?



-- 
Ragnar Kjørstad



view thread (17+ messages)  latest in thread

Message-ID: <20010424020625.C7572@vestdata.no>
Permalink:  ../20010424020625.C7572@vestdata.no/
Also on:    postgresql.org/message-id/20010424020625.C7572@vestdata.no

 · 

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-admin@postgresql.org
  Cc: postgres@ragnark.vestdata.no, xbdelacour@yahoo.com
  Subject: Re: Large database help
  In-Reply-To: <20010424020625.C7572@vestdata.no>
  References: <5.0.2.1.0.20010422184417.01972e70@pop.mail.yahoo.com> <5.0.2.1.0.20010422165107.02b46ec0@209.61.155.192> <20010423004646.A4724@vestdata.no> <20010423181517.B4323@vestdata.no> <5.0.2.1.0.20010423180546.02ad3a40@pop.mail.yahoo.com> <20010424020625.C7572@vestdata.no>

* 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