Re: Increasing Max # of connections

From: Errol Neal <errol(dot)neal(at)enhtech(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Increasing Max # of connections
Date: 2003-07-23 22:39:04
Message-ID: 5.1.0.14.0.20030723183854.03dd0e40@mail.enhtech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 12:05 PM 7/23/2003 -0400, you wrote:
>At 11:48 AM 7/23/2003 -0400, Errol Neal wrote:
>>Hi All,
>>
>>I am using Postgresql 7.3.2 on Solaris 5.9 compiled with gcc and solaris
>>ld. Right now, our max number of connections and buffers are set to the
>>default, which is 32 for connections and 64 for buffers. I want to be
>>able to increase that to 100 Max connections and 200 max buffers, but
>>when I do that.. i get this:
>>
>>IpcSemaphoreCreate: semget(key=5432004, num=17, 03600) failed: No space
>>left on device
>>
>>This error does *not* mean that you have run out of disk space.
>>
>>It occurs when either the system limit for the maximum number of
>>semaphore sets (SEMMNI), or the system wide maximum number of
>>semaphores (SEMMNS), would be exceeded. You need to raise the
>>respective kernel parameter. Alternatively, reduce PostgreSQL's
>>consumption of semaphores by reducing its max_connections parameter
>>(currently 100).
>>
>>How do I increase the mentioned kernel values on solaris to be able to
>>increase the number of connections I need?
>>
>>
>>TIA,
>>
>>
>>Errol U. Neal
>>
>>
>>Errol Neal, Systems/Network Administrator
>>eneal(at)enhtech(dot)com
>>Enhanced Technologies Inc.
>>http://www.enhtech.com
>>703-924-0301 or 800-368-3249
>>703-924-0302 Fax
>>
>>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 7: don't forget to increase your free space map settings
>
>
>Just in case some were wondering, here is the relative output of sysdef on
>the system:
>
>
>* Tunable Parameters
>*
>20799488 maximum memory allowed in buffer cache (bufhwm)
> 15882 maximum number of processes (v.v_proc)
> 99 maximum global priority in sys class (MAXCLSYSPRI)
> 15877 maximum processes per user id (v.v_maxup)
> 30 auto update time limit in seconds (NAUTOUP)
> 25 page stealing low water mark (GPGSLO)
> 5 fsflush run rate (FSFLUSHR)
> 25 minimum resident memory for avoiding deadlock (MINARMEM)
> 25 minimum swapable memory for avoiding deadlock (MINASMEM)
>*
>* Utsname Tunables
>*
> 5.9 release (REL)
>server17 node name (NODE)
> SunOS system name (SYS)
> Generic version (VER)
>*
>* Process Resource Limit Tunables (Current:Maximum)
>*
>0x0000000000000100:0x0000000000010000 file descriptors
>*
>* Streams Tunables
>*
> 9 maximum number of pushes allowed (NSTRPUSH)
> 65536 maximum stream message size (STRMSGSZ)
> 1024 max size of ctl part of message (STRCTLSZ)
>*
>* IPC Messages module is not loaded
>*
>*
>* IPC Semaphores
>*
> 10 semaphore identifiers (SEMMNI)
> 60 semaphores in system (SEMMNS)
> 30 undo structures in system (SEMMNU)
> 25 max semaphores per id (SEMMSL)
> 10 max operations per semop call (SEMOPM)
> 10 max undo entries per process (SEMUME)
> 32767 semaphore maximum value (SEMVMX)
> 16384 adjust on exit max value (SEMAEM)
>*
>* IPC Shared Memory
>*
> 8388608 max shared memory segment size (SHMMAX)
> 100 shared memory identifiers (SHMMNI)
>*
>* Time Sharing Scheduler Tunables
>*
>60 maximum time sharing user priority (TSMAXUPRI)
>SYS system class name (SYS_NAME)
>
>
>Everything is pretty much at the defaults
>
>
>
>TIA (again)
>
>
>Errol Neal
>
>Errol Neal, Systems/Network Administrator
>eneal(at)enhtech(dot)com
>Enhanced Technologies Inc.
>http://www.enhtech.com
>
>
>703-924-0301 or 800-368-3249
>703-924-0302 Fax
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match

Okay, here is an update...

I modified the kernel params in /etc/system to this:

set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
set semsys:seminfo_semmni=100
set semsys:seminfo_semmsl=100
set semsys:seminfo_semmns=200
set semsys:seminfo_semopm=100
set semsys:seminfo_semvmx=32767

Here is the output from sysdef

* IPC Semaphores
*
100 semaphore identifiers (SEMMNI)
200 semaphores in system (SEMMNS)
30 undo structures in system (SEMMNU)
100 max semaphores per id (SEMMSL)
100 max operations per semop call (SEMOPM)
10 max undo entries per process (SEMUME)
32767 semaphore maximum value (SEMVMX)
16384 adjust on exit max value (SEMAEM)
*
* IPC Shared Memory
*
4294967295 max shared memory segment size (SHMMAX)
100 shared memory identifiers (SHMMNI)

Okay, the new problem is that when I place as little as double the default
amount of connections and buffers, Postgresql starts, but dies shortly
thereafter. There is not any log output as to why it dies, it just does!!
Can someone help me please??

Errol Neal

Errol Neal, Systems/Network Administrator
eneal(at)enhtech(dot)com
Enhanced Technologies Inc.
http://www.enhtech.com
703-924-0301 or 800-368-3249
703-924-0302 Fax

Browse pgsql-general by date

  From Date Subject
Next Message John DeSoi 2003-07-23 22:57:35 Re: Role Models Wanted
Previous Message Dmitry Tkach 2003-07-23 22:36:34 Re: Convert TimeStamp to Date