Re: setproctitle_fast()
Emre Hasegeli <emre@hasegeli.com>
From: Emre Hasegeli <emre@hasegeli.com>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-07-07T11:57:01Z
Lists: pgsql-hackers
> FreeBSD's setproctitle() is a bit slow because it contains a syscall > or two, so people often run PostgreSQL with update_process_title set > to off on that OS. That makes the user experience not quite as nice > as Linux. As a weekend learn-me-some-kernel-hacking project I fixed > that and got the patch committed to FreeBSD 12, though I was asked to > use a new libc entry point _fast(). Here's a patch to teach > PostgreSQL about that. It doesn't have much effect on small systems, > but it makes "pgbench -c 40 -j 40 -S -M prepared" do ~10% more > transactions per second on an AWS m4.10xlarge instance. I am curious why they asked you to use a new libc entry point. The function signatures are the same. More people could benefit from making the existing function faster.
Commits
-
Use setproctitle_fast() to update the ps status, if available.
- 1bc180cd2acc 12.0 landed