Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Further reduce the number of semaphores used under --disable-spinlocks.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 18 Apr 2016 17:33:07 +0000 (13:33 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 18 Apr 2016 17:33:07 +0000 (13:33 -0400)
Per discussion, there doesn't seem to be much value in having
NUM_SPINLOCK_SEMAPHORES set to 1024: under any scenario where you are
running more than a few backends concurrently, you really had better have a
real spinlock implementation if you want tolerable performance.  And 1024
semaphores is a sizable fraction of the system-wide SysV semaphore limit
on many platforms.  Therefore, reduce this setting's default value to 128
to make it less likely to cause out-of-semaphores problems.

src/include/pg_config_manual.h

index 5e2ae6f88e7e4c5bdc2e94c1a6b7464d439b3de6..00b381ea88a04f04d9965931808029980b7a9456 100644 (file)
@@ -62,7 +62,7 @@
  * may improve performance, but supplying a real spinlock implementation is
  * probably far better.
  */
-#define    NUM_SPINLOCK_SEMAPHORES     1024
+#define    NUM_SPINLOCK_SEMAPHORES     128
 
 /*
  * Define this if you want to allow the lo_import and lo_export SQL