Обсуждение: Postgresql 7.3 on Red Hat Enterprise 5 (Problem with SEMMNI, SEMMNS)

Поиск
Список
Период
Сортировка

Postgresql 7.3 on Red Hat Enterprise 5 (Problem with SEMMNI, SEMMNS)

От
Darek Czarkowski
Дата:
Hello,

I am have installed postgresql-7.3.4 on Linux server running Red Hat Enterprise Linux Server release 5 (Tikanga).
Postmaster runs fine with the default settings, but when I try to increase number of connections to 200 I get
"IpcSemaphoreCreate: semget(key=5432120, num=17, 03600) failed: No space left on device" Error

Now, I dont think the default system settings are too low, default settings for semafores are kernel.sem = 250 32000
100128 
I have tried changing them, but I am not getting any results.

This is a new server, with almost twice the parameters of the older systems I have already running PostgresSQL for
years.The settings that I would use normally are: 

max_connections = 200
shared_buffers = 2048
sort_mem = 32168

That just doesn't seam possible on this new server. Any ideas?

P.S.
I can not use newer versions of PostgresSQL.

--
Darek Czarkowski


Re: Postgresql 7.3 on Red Hat Enterprise 5 (Problem with SEMMNI, SEMMNS)

От
Devrim GÜNDÜZ
Дата:
Hi,

On Fri, 2007-08-31 at 18:11 -0700, Darek Czarkowski wrote:
> when I try to increase number of connections to 200 I get
> "IpcSemaphoreCreate: semget(key=5432120, num=17, 03600) failed: No
> space left on device" Error
>
> Now, I dont think the default system settings are too low, default
> settings for semafores are kernel.sem = 250 32000 100 128

You should increase shmmax. Add this to sysctl.conf:

kernel.shmmax=$TheValueYouNeed

(and then run sysctl -p)

Regards,
--
Devrim GÜNDÜZ
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/



Вложения

Re: Postgresql 7.3 on Red Hat Enterprise 5 (Problem with SEMMNI, SEMMNS)

От
Tom Lane
Дата:
Darek Czarkowski <dczarkowski@infinitesource.ca> writes:
> I am have installed postgresql-7.3.4 on Linux server running Red Hat Enterp=
> rise Linux Server release 5 (Tikanga).

Why in heavens name would you be wanting to run 7.3.4?  Even if you have
a good reason for wanting 7.3.x, you should be installing 7.3.19.  We
don't update back branches just because we have nothing better to do.
Read the release notes starting here:
http://developer.postgresql.org/pgdocs/postgres/release-7-3-19.html
and then get onto a more recent version.

> Postmaster runs fine with the default settings, but when I try to increase =
> number of connections to 200 I get
> "IpcSemaphoreCreate: semget(key=5432120, num=17, 03600) failed: No spac=
> e left on device" Error

Hmm ... I suppose you are hitting the SEMMNI limit, but unless there is
something else eating semaphores in the system, you should be able to go
way higher than that with the default Red Hat settings.  (I can run more
than 2000 connections without changing the defaults on a Fedora 6
machine.)

What I suspect is that there is something you didn't tell us about this
machine, like that it's not a vanilla x86-architecture machine, and that
PG 7.3.4 doesn't have any spinlock code for it.  In that case your build
would have fallen back to using semaphores for spinlocks, which aside
from being horrendously slow eats many more semaphores than normal (I
think two per shared buffer, for one thing).  In this connection it is
worth pointing to the 7.3.16 release notes ...

            regards, tom lane