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

From Kris Kennaway
Subject Re: postgresql and process titles
Date
Msg-id 20060612014349.GA38974@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 07:43:03PM -0400, Tom Lane wrote:
> > On Sun, 11 Jun 2006, Kris Kennaway wrote:
> >> Why does postgresql change its process title so frequently and how can
> >> this be disabled?  Profiling suggests it's a fairly serious
> >> performance bottleneck.
>
> 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.

It's actually worse than that in stock FreeBSD because in certain
"mixed" workloads with other sources of Giant contention present they
will contend with each other to make overall machine performance much
worse; that's the "serious" aspect, although 8% performance loss just
in case someone should ever want to run 'ps' to check the state of the
database processes is nothing to laugh at either.

Kris

pgsql-hackers by date:

Previous
From: Kris Kennaway
Date:
Subject: Re: postgresql and process titles
Next
From: Tom Lane
Date:
Subject: Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),