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
pgpxMmw1cbEgN.pgp
Description: PGP signature