Re: [mux@FreeBSD.org: Re: Anyone interested in improving postgresql scaling?]

From: Kris Kennaway <kris(at)obsecurity(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Maxime Henrion <mux(at)freebsd(dot)org>, Kris Kennaway <kris(at)obsecurity(dot)org>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [mux@FreeBSD.org: Re: Anyone interested in improving postgresql scaling?]
Date: 2007-04-11 00:40:27
Message-ID: 20070411004027.GA77091@xor.obsecurity.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 10, 2007 at 08:23:36PM -0400, Tom Lane wrote:

> > I think the high number of setproctitle() calls are more problematic
> > to us at the moment, Kris can comment on that.
>
> As of PG 8.2 it is possible to turn those off. I don't think there's a
> lot of enthusiasm for turning them off by default ... at least not yet.
> But it might make sense to point out in the PG documentation that
> update_process_title is particularly costly on platforms X, Y, and Z.
> Do you know if this issue affects all the BSDen equally?

It will likely affect them to some extent. In fact the only platforms
it will not hurt on are those which have already jumped through
special hoops to make setproctitle() super-cheap. I presume Linux is
in this category but don't know which others are, if any.

Since we've basically had it handed to us that calling setproctitle()
thousands of times per second is something that real applications now
do, we're pretty much forced to work on making it cheaper. Hopefully
this is something that will be addressed over the next few months
(we're going to look at adding support for pages shared between libc
and kernel so this kind of thing can be done without requiring a
syscall).

However this won't help all the existing systems out there (including
other affected OSes), so it would be great if you guys could meet us
half way and find a way to make postgresql rate-limit these calls by
default to some suitable compromise rate, like once/second or
whatever.

Kris

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Kirkwood 2007-04-11 00:50:06 Re: [mux@FreeBSD.org: Re: Anyone interested in improving postgresql scaling?]
Previous Message Tom Lane 2007-04-11 00:23:36 Re: [mux@FreeBSD.org: Re: Anyone interested in improving postgresql scaling?]