Re: PrivateRefCount (for 8.3)

From: NikhilS <nikkhils(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PrivateRefCount (for 8.3)
Date: 2007-03-05 13:58:09
Message-ID: d3c4af540703050558p207fcbc0y2d1258501198985f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

What is the opinion of the list as to the best way of measuring if the
following implementation is ok?

http://archives.postgresql.org/pgsql-hackers/2007-01/msg00752.php

As mentioned in earlier mails, this will reduce the per-backend usage of
memory by an amount which will be a fraction (single digit percentage)
of (NBuffers
* int) size. I have done pgbench/dbt2 runs and I do not see any negative
impact because of this. Are there any other suggestions for measuring the
backend memory footprint?

Regards,
Nikhils

On 2/21/07, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>
>
> Added to TODO:
>
> * Consider decreasing the amount of memory used by PrivateRefCount
>
> http://archives.postgresql.org/pgsql-hackers/2006-11/msg00797.php
> http://archives.postgresql.org/pgsql-hackers/2007-01/msg00752.php
>
>
>
> ---------------------------------------------------------------------------
>
> Simon Riggs wrote:
> > On Mon, 2006-11-27 at 14:42 -0500, Bruce Momjian wrote:
> > > Simon Riggs wrote:
> > > > int8 still seems like overkjll. When will the ref counts go above 2
> on a
> > > > regular basis? Surely refcount=2 is just chance at the best of
> times.
> > > >
> > > > Refcount -> 2 bits per value, plus a simple overflow list? That
> would
> > > > allow 0,1,2 ref counts plus 3 means look in hashtable to find real
> > > > refcount.
> > >
> > > At two bits, would we run into contention for the byte by multiple
> > > backends?
> >
> > No contention, its a private per-backend data structure. That's why we
> > want to reduce the size of it so badly.
> >
> > --
> > Simon Riggs
> > EnterpriseDB http://www.enterprisedb.com
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 6: explain analyze is your friend
>
> --
> Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
> EnterpriseDB http://www.enterprisedb.com
>
> + If your life is a hard drive, Christ can be your backup. +
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>

--
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2007-03-05 15:14:50 Latest plans for Utilities with HOT
Previous Message Nikolay Samokhvalov 2007-03-05 12:54:32 Re: [HACKERS] Re: [HACKERS] XQuery or XPathサポート