Re: postgresql and process titles

From: Kris Kennaway <kris(at)obsecurity(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kris Kennaway <kris(at)obsecurity(dot)org>, "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: postgresql and process titles
Date: 2006-06-12 02:07:54
Message-ID: 20060612020753.GA39706@xor.obsecurity.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jun 11, 2006 at 09:58:33PM -0400, Tom Lane wrote:
> Kris Kennaway <kris(at)obsecurity(dot)org> writes:
> > On Sun, Jun 11, 2006 at 07:43:03PM -0400, Tom Lane wrote:
> >> Let's see the evidence.
>
> > The calls to setproctitle() (it looks like 4 setproctitle syscalls per
> > DB query) are causing contention on the Giant lock 25% of the time on
> > a dual p4 + HTT. Disabling process title setting completely gives an
> > 8% peak performance boost to the super-smack select benchmark.
>
> I think you misunderstood me: I asked for evidence, not interpretation.
> What are you measuring, and with what tool, and what are the numbers?
> On what benchmark case?

As I said, I'm using the super-smack select benchmark; presumably you
are aware of it.

> And what did you do to "disable process title setting completely"?

Added this to ps_status.c:

#undef PS_USE_SETPROCTITLE
#undef PS_USE_PSTAT
#undef PS_USE_PS_STRINGS
#undef PS_USE_CHANGE_ARGV
#undef PS_USE_CLOBBER_ARGV
#define PS_USE_NONE

Here are the queries/second data, before and after:

x pg
+ pg-noproctitle
+------------------------------------------------------------+
|x xx + |
|x xx + + |
|xx xxx + + + ++++ |
| |AM| |____AM___||
+------------------------------------------------------------+
N Min Max Median Avg Stddev
x 11 3399.29 3425.1 3413.93 3411.8418 9.4287675
+ 10 3615.63 3699.32 3685.515 3679.344 24.894177
Difference at 95.0% confidence
267.502 +/- 16.871
7.8404% +/- 0.494483%
(Student's t, pooled s = 18.4484)

Kris

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2006-06-12 02:40:45 Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),
Previous Message Tom Lane 2006-06-12 01:58:33 Re: postgresql and process titles