Re: Setting up a database for 10000 concurrent users

Поиск
Список
Период
Сортировка
От Sergey E. Koposov
Тема Re: Setting up a database for 10000 concurrent users
Дата
Msg-id Pine.LNX.4.44.0509060358330.7172-100000@lnfm1.sai.msu.ru
обсуждение исходный текст
Ответ на Setting up a database for 10000 concurrent users  (Poul Møller Hansen <freebsd@pbnet.dk>)
Ответы Re: Setting up a database for 10000 concurrent users  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Mon, 5 Sep 2005, [UTF-8] Poul Mц╦ller Hansen wrote:

> 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.
> 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 ?
>

The file /proc/sys/kernel/sem contains 4 numbers

SEMMSL  The maximum semaphores per semaphore set.
SEMMNS  A  system-wide  limit  on  the  number   of
    semaphores in all semaphore sets.
SEMOPM  The  maximum  number of operations that may
    be specified in a semop(2) call.
SEMMNI  A system-wide limit on the  maximum  number
    of semaphore identifiers.

Look "man proc"

So just do something like
echo "250 32000 32 16000" > /proc/sys/kernel/sem
(compute the exact numbers by yourself)

But I really doubt that it it possible/reasonable to have 10000
simultaneous connections.

Also you can setup the semaphore numbers using sysctl
sysctl -w kernel.sem="250 32000 32 16000"

Regards,
    Sergey

*****************************************************
Sergey E. Koposov
Max-Planck Institut fuer Astronomie
Web: http://lnfm1.sai.msu.ru/~math
E-mail: math@sai.msu.ru


В списке pgsql-general по дате отправления:

Предыдущее
От: Klint Gore
Дата:
Сообщение: Re: Debug plpgSQL stored procedures
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bug or ?