Re: postgresql and process titles - Mailing list pgsql-hackers

From Kris Kennaway
Subject Re: postgresql and process titles
Date
Msg-id 20060612020753.GA39706@xor.obsecurity.org
Whole thread Raw
In response to Re: postgresql and process titles  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sun, Jun 11, 2006 at 09:58:33PM -0400, Tom Lane wrote:
> Kris Kennaway <kris@obsecurity.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

pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),
Next
From: Kris Kennaway
Date:
Subject: Re: postgresql and process titles