pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
CLUSTER using more memory than expected
5+ messages / 3 participants
[nested] [flat]

* CLUSTER using more memory than expected
@ 2006-10-25 16:13 Joshua Marsh <icub3d@gmail.com>
  2006-10-25 22:49 ` Re: CLUSTER using more memory than expected Tom Lane <tgl@sss.pgh.pa.us>
  2006-10-26 21:33 ` Re: CLUSTER using more memory than expected Jim C. Nasby <jim@nasby.net>
  0 siblings, 2 replies; 5+ messages in thread

From: Joshua Marsh @ 2006-10-25 16:13 UTC (permalink / raw)
  To: pgsql-admin

The CLUSTER function seems to be using more memory than I expect.  Here is
what I get from top and from my config file:

from top:
27589 postgres  25   0 3943m 3.6g  11m R 99.9 61.6 639:19.41 postgres:
postgres data 127.0.0.1(42126) CLUSTER

from postgresql.conf
shared_buffers = 1000 #26214            # min 16, at least
max_connections*2, 8KB each
work_mem = 256000               # min 64, size in KB
maintenance_work_mem = 2097151  # min 1024, size in KB
#max_stack_depth = 2048         # min 100, size in KB

My version is: 8.0.3

Any ideas why this would be happening.  I tried a full restart and the same
thing happens.

Thanks,

Josh


-- 
This E-mail is covered by the Electronic Communications Privacy Act, 18
U.S.C. 2510-2521 and is legally privileged.

This information is confidential information and is intended only for the
use of the individual or entity named above. If the reader of this message
is not the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this communication is strictly
prohibited.

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

* Re: CLUSTER using more memory than expected
  2006-10-25 16:13 CLUSTER using more memory than expected Joshua Marsh <icub3d@gmail.com>
@ 2006-10-25 22:49 ` Tom Lane <tgl@sss.pgh.pa.us>
  2006-10-25 23:23   ` Re: CLUSTER using more memory than expected Joshua Marsh <icub3d@gmail.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Tom Lane @ 2006-10-25 22:49 UTC (permalink / raw)
  To: Joshua Marsh <icub3d@gmail.com>; +Cc: pgsql-admin

"Joshua Marsh" <icub3d@gmail.com> writes:
> The CLUSTER function seems to be using more memory than I expect.

CLUSTER will eat maintenance_work_mem during index rebuilds --- more or
less.  You shouldn't expect these numbers to be dead on, particularly
not in older releases.  It looks like your 2Gb spec has turned into
3.6Gb actually eaten, which is a bit sloppier accounting than I'd like
but not overly surprising.  (FWIW, I think CVS HEAD is better than 8.0
at measuring sort workspace.)

			regards, tom lane



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

* Re: CLUSTER using more memory than expected
  2006-10-25 16:13 CLUSTER using more memory than expected Joshua Marsh <icub3d@gmail.com>
  2006-10-25 22:49 ` Re: CLUSTER using more memory than expected Tom Lane <tgl@sss.pgh.pa.us>
@ 2006-10-25 23:23   ` Joshua Marsh <icub3d@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Joshua Marsh @ 2006-10-25 23:23 UTC (permalink / raw)
  To: pgsql-admin

On 10/25/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
>
> CLUSTER will eat maintenance_work_mem during index rebuilds --- more or
> less.  You shouldn't expect these numbers to be dead on, particularly
> not in older releases.  It looks like your 2Gb spec has turned into
> 3.6Gb actually eaten, which is a bit sloppier accounting than I'd like
> but not overly surprising.  (FWIW, I think CVS HEAD is better than 8.0
> at measuring sort workspace.)
>
>                         regards, tom lane
>

Thanks for the clarification.  It doesn't sound like it's going to jump to
8Gb and hog most of the RAM.

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

* Re: CLUSTER using more memory than expected
  2006-10-25 16:13 CLUSTER using more memory than expected Joshua Marsh <icub3d@gmail.com>
@ 2006-10-26 21:33 ` Jim C. Nasby <jim@nasby.net>
  2006-10-26 21:51   ` Re: CLUSTER using more memory than expected Joshua Marsh <icub3d@gmail.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Jim C. Nasby @ 2006-10-26 21:33 UTC (permalink / raw)
  To: Joshua Marsh <icub3d@gmail.com>; +Cc: pgsql-admin

On Wed, Oct 25, 2006 at 10:13:59AM -0600, Joshua Marsh wrote:
> My version is: 8.0.3

You should really upgrade to 8.0.9; there's crash and data loss bugs
that have been fixed since 8.0.3.
-- 
Jim Nasby                                            jim@nasby.net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)



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

* Re: CLUSTER using more memory than expected
  2006-10-25 16:13 CLUSTER using more memory than expected Joshua Marsh <icub3d@gmail.com>
  2006-10-26 21:33 ` Re: CLUSTER using more memory than expected Jim C. Nasby <jim@nasby.net>
@ 2006-10-26 21:51   ` Joshua Marsh <icub3d@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Joshua Marsh @ 2006-10-26 21:51 UTC (permalink / raw)
  To: pgsql-admin

On 10/26/06, Jim C. Nasby <jim@nasby.net> wrote:
>
> On Wed, Oct 25, 2006 at 10:13:59AM -0600, Joshua Marsh wrote:
> > My version is: 8.0.3
>
> You should really upgrade to 8.0.9; there's crash and data loss bugs
> that have been fixed since 8.0.3.
> --
> Jim Nasby                                            jim@nasby.net
> EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)
>

Eeek!  Thanks for the head's up.  I'll do that.

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


end of thread, other threads:[~2006-10-26 21:51 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-10-25 16:13 CLUSTER using more memory than expected Joshua Marsh <icub3d@gmail.com>
2006-10-25 22:49 ` Tom Lane <tgl@sss.pgh.pa.us>
2006-10-25 23:23   ` Joshua Marsh <icub3d@gmail.com>
2006-10-26 21:33 ` Jim C. Nasby <jim@nasby.net>
2006-10-26 21:51   ` Joshua Marsh <icub3d@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