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: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>, Kris Kennaway <kris(at)obsecurity(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: postgresql and process titles
Date: 2006-06-12 01:43:49
Message-ID: 20060612014349.GA38974@xor.obsecurity.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-06-12 01:58:33 Re: postgresql and process titles
Previous Message Alvaro Herrera 2006-06-12 01:32:13 Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),