Firebird 2.5 and SysV Semaphores

2011-05-18 Thread Leonardo M . Ramé
Hi, I have a problem with Firebird 2.5, and posted the issue in their mailing 
list. They suggested that I have to recompile the kernel to allow more SysV 
semaphores. Do you recommend this?

Here's a copy of my mail:

 I recently installed Firebird 2.5 on a FreeBSD, it was running ok
 until this moring when suddendly it stopped accepting connections.

 The server runs via inetd.

 Here is a copy of the last lines of firebird.log:

 ---
 server.rame.local Tue May 17 16:15:33 2011
   ISC_event_wait: semop failed with errno =3D 22


 server.rame.local Tue May 17 16:15:33 2011
   create_semaphores failed:
   operating system directive semget failed
   No space left on device


 server.rame.local Tue May 17 16:15:33 2011
   ISC_event_wait: semop failed with errno =3D 22


 server.rame.local Tue May 17 16:15:33 2011
   create_semaphores failed:
   operating system directive semget failed
   No space left on device

Should rebuild kernel with more SysV semaphores.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: sysv semaphores

2006-11-15 Thread Robin Becker

Damian Wiest wrote:
...
No, it's my fault; I checked things on the wrong system.  OpenBSD uses 
seminfo, FreeBSD uses ipc.



aa the joy of forking :)


--
Robin Becker
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


sysv semaphores

2006-11-14 Thread Robin Becker
I'm trying to test a python extension (POSH) that uses semaphores. When testing 
I get a run time error that indicates it requires too many semaphores. Is it 
possible to adjust the allowed number of semaphores without rebuilding the kernel?


What are the costs of having semaphores ie are they memory/cpu intensive?
--
Robin Becker
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: sysv semaphores

2006-11-14 Thread Damian Wiest
On Tue, Nov 14, 2006 at 03:22:33PM +, Robin Becker wrote:
 I'm trying to test a python extension (POSH) that uses semaphores. When 
 testing I get a run time error that indicates it requires too many 
 semaphores. Is it possible to adjust the allowed number of semaphores 
 without rebuilding the kernel?
 
 What are the costs of having semaphores ie are they memory/cpu intensive?
 -- 
 Robin Becker

You'll want to use either sysctl(8) to change the settings dynamically, or
use /etc/sysctl.conf to modify the settings permanently.  I'm not sure if
there's a benefit to rolling a new kernel versus using sysctl.conf, or if
things even work that way anymore.

# sysctl -a | grep seminfo

kern.seminfo.semmni=10# number of semaphore identifiers
kern.seminfo.semmns=60# number of semaphores in system
kern.seminfo.semmnu=30# number of undo structures in system
kern.seminfo.semmsl=60# max number of semaphores per id
kern.seminfo.semopm=100   # max number of operations per semop call
kern.seminfo.semume=10# max number of undo entries per process
kern.seminfo.semusz=100   # size in bytes of undo structure
kern.seminfo.semvmx=32767 # semaphore maximum value
kern.seminfo.semaem=16384 # adjust on exit max value

Those comments are from /usr/include/sys/sem.h

-Damian
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: sysv semaphores

2006-11-14 Thread Damian Wiest
On Tue, Nov 14, 2006 at 04:46:52PM -0600, Damian Wiest wrote:
 On Tue, Nov 14, 2006 at 03:22:33PM +, Robin Becker wrote:
  I'm trying to test a python extension (POSH) that uses semaphores. When 
  testing I get a run time error that indicates it requires too many 
  semaphores. Is it possible to adjust the allowed number of semaphores 
  without rebuilding the kernel?
  
  What are the costs of having semaphores ie are they memory/cpu intensive?
  -- 
  Robin Becker
 
 You'll want to use either sysctl(8) to change the settings dynamically, or
 use /etc/sysctl.conf to modify the settings permanently.  I'm not sure if
 there's a benefit to rolling a new kernel versus using sysctl.conf, or if
 things even work that way anymore.
 
 # sysctl -a | grep seminfo
 
 kern.seminfo.semmni=10# number of semaphore identifiers
 kern.seminfo.semmns=60# number of semaphores in system
 kern.seminfo.semmnu=30# number of undo structures in system
 kern.seminfo.semmsl=60# max number of semaphores per id
 kern.seminfo.semopm=100   # max number of operations per semop call
 kern.seminfo.semume=10# max number of undo entries per process
 kern.seminfo.semusz=100   # size in bytes of undo structure
 kern.seminfo.semvmx=32767 # semaphore maximum value
 kern.seminfo.semaem=16384 # adjust on exit max value
 
 Those comments are from /usr/include/sys/sem.h
 
 -Damian

Sorry, I forgot to mention a few things.

You should become familiar with ipcs(1) as it will allow you to query 
the current state of SysV IPC facilities.  You'll probably find yourself 
manually deleting semaphores depending on how well that extension cleans 
up after itself during testing.

IIRC, the kernel maintains some in-memory datastructures to keep track
of semaphores.  I believe increasing the maximum number of semaphores 
will take up a negligible amount of main memory.

If you're interested, the Design and Implementation of the 4.4 BSD 
Operating System (ISBN # 0201549794) has great coverage of this stuff.  

-Damian
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: sysv semaphores

2006-11-14 Thread Robin Becker

Damian Wiest wrote:
.

You'll want to use either sysctl(8) to change the settings dynamically, or
use /etc/sysctl.conf to modify the settings permanently.  I'm not sure if
there's a benefit to rolling a new kernel versus using sysctl.conf, or if
things even work that way anymore.

# sysctl -a | grep seminfo

kern.seminfo.semmni=10# number of semaphore identifiers
kern.seminfo.semmns=60# number of semaphores in system
kern.seminfo.semmnu=30# number of undo structures in system
kern.seminfo.semmsl=60# max number of semaphores per id
kern.seminfo.semopm=100   # max number of operations per semop call
kern.seminfo.semume=10# max number of undo entries per process
kern.seminfo.semusz=100   # size in bytes of undo structure
kern.seminfo.semvmx=32767 # semaphore maximum value
kern.seminfo.semaem=16384 # adjust on exit max value

Those comments are from /usr/include/sys/sem.h

-Damian


Sorry, I forgot to mention a few things.

You should become familiar with ipcs(1) as it will allow you to query 
the current state of SysV IPC facilities.  You'll probably find yourself 
manually deleting semaphores depending on how well that extension cleans 
up after itself during testing.


IIRC, the kernel maintains some in-memory datastructures to keep track
of semaphores.  I believe increasing the maximum number of semaphores 
will take up a negligible amount of main memory.


If you're interested, the Design and Implementation of the 4.4 BSD 
Operating System (ISBN # 0201549794) has great coverage of this stuff.  


thanks very much all very useful info. Someone else recommended  looking 
at these options


kern.ipc.semmap=180
kern.ipc.semmni=160
kern.ipc.semmns=210
kern.ipc.semmnu=180
kern.ipc.semmsl=210
kern.ipc.semopm=250
kern.ipc.semume=160

kern.ipc.semusz=92
kern.ipc.semvmx=32767
kern.ipc.semaem=16384


and on my 6.1 system I see these with sysctl -a | grep ipc, however,

# sysctl -a | grep seminfo
/usr/RL_HOME/users/robin:
#

I guess they've been renamed.
--
Robin Becker
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: sysv semaphores

2006-11-14 Thread Damian Wiest
On Tue, Nov 14, 2006 at 11:56:45PM +, Robin Becker wrote:

[snip]

 thanks very much all very useful info. Someone else recommended  looking 
 at these options
 
 kern.ipc.semmap=180
 kern.ipc.semmni=160
 kern.ipc.semmns=210
 kern.ipc.semmnu=180
 kern.ipc.semmsl=210
 kern.ipc.semopm=250
 kern.ipc.semume=160
 
 kern.ipc.semusz=92
 kern.ipc.semvmx=32767
 kern.ipc.semaem=16384
 
 
 and on my 6.1 system I see these with sysctl -a | grep ipc, however,
 
 # sysctl -a | grep seminfo
 /usr/RL_HOME/users/robin:
 #
 
 I guess they've been renamed.
 -- 
 Robin Becker

No, it's my fault; I checked things on the wrong system.  OpenBSD uses 
seminfo, FreeBSD uses ipc.

-Damian
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]