Setting up a database for 10000 concurrent users

From: Poul Møller Hansen <freebsd(at)pbnet(dot)dk>
To: pgsql-general(at)postgresql(dot)org
Subject: Setting up a database for 10000 concurrent users
Date: 2005-09-05 20:23:04
Message-ID: 431CA928.9000605@pbnet.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to setup a database for 10000 concurrent users for a test.
I have a system with 1GB of RAM where I will use 512MB for PostgreSQL.
It is running SuSE 9.3

I have changed SHMMAX & SHMALL
echo "536870912" >/proc/sys/kernel/shmmax
echo "536870912" >/proc/sys/kernel/shmall

and max_connections = 10000 in postgresql.conf

When trying to start the database server it leaves this in the log.

FATAL: could not create semaphores: No space left on device
DETAIL: Failed system call was semget(5432129, 17, 03600).
HINT: 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 5000).

Calculated the values should be
SEMMNI = 10000 / 16
SEMMNS = (10000 / 16) * 17 "plus room for other applications" How much
should that be ?
And where can I change those values on a 2.6 kernel ?

Poul

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Poul Møller Hansen 2005-09-05 20:37:51 Re: Setting up a database for 10000 concurrent users
Previous Message A. Kretschmer 2005-09-05 19:10:29 Re: PLPGSQL function schema or table parameter