Skip site navigation (1) Skip section navigation (2)

Re: Configure template change to use SysV Semaphors on darwin

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chris Marcellino <cmarcellino(at)apple(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Configure template change to use SysV Semaphors on darwin
Date: 2007-05-24 21:09:04
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Awhile back, Chris Marcellino <cmarcellino(at)apple(dot)com> wrote:
> I searched through the archives and I can't find a mention of why the  
> posix_sema code was written for Darwin.
> I assume it is because before Darwin 6.0/Mac OS X 10.2 there was not  
> kernel support for SysV semaphores.
> If this is in fact the case, I have a trivial patch to conditionally  
> enable SysV semaphores based on the OS release:

This seems to have slipped through the cracks --- apologies, but IIRC
core were a bit distracted with security issues right around then.

I've tried this patch on my Mac laptop, and while it seems to work as
advertised in terms of not eating a boatload of file descriptors,
I was disturbed to find that it seems consistently a couple percent
slower than the POSIX-sema code according to pgbench.  I get numbers
like these:


pgbench -c 10 -t 1000		104.4 tps	106.5 tps
pgbench -C -c 10 -t 1000	25.73 tps	26.07 tps

The numbers jump around a good deal from run to run, but it seemed that
the SYSV code was always a bit slower in two comparable runs.

Test conditions: PG CVS HEAD as of today, fully up-to-date OS X 10.4.9
running on a 1.33GHZ 12" Al Powerbook, all kernel and PG settings
default except for fsync off, pgbench initialized with -s 10.  This of
course has nothing to do with real-world database performance, but I was
at least hoping to confirm that there wouldn't be any performance
penalty for switching to SYSV semas.  Seems like there is.  Comments?

			regards, tom lane

In response to


pgsql-patches by date

Next:From: Andrew DunstanDate: 2007-05-24 23:32:19
Subject: Re: like/ilike improvements
Previous:From: Andrew DunstanDate: 2007-05-24 21:00:00
Subject: Re: Concurrent psql patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group