Date: Tue, 7 Nov 2000 14:56:00 -0800 From: Alfred Perlstein <bright@wintelcom.net> To: jadream <jadream@chat.ru> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: getsem()fails with "No space left on device" Message-ID: <20001107145559.F5112@fw.wintelcom.net> In-Reply-To: <3A08726E.20463FCE@chat.ru>; from jadream@chat.ru on Wed, Nov 08, 2000 at 12:21:50AM %2B0300 References: <3A08726E.20463FCE@chat.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
* jadream <jadream@chat.ru> [001107 13:22] wrote:
> Hi!
>
> Maybe I'm just unliky with FreeBSD but I still cannot solve my problems
> :0)
>
> As I ran into problems while using SysV IPCs in threded apps I changed
> to forked child processes.
> But after only 10 processes inited I failed to get semaphore cluster (2
> sems in size) with such an amazing error "No space left on device".
> What device?
> What does it mean no space left - is 10 sem clusters some IPC limit???
> Tis nonsense.
No it's not, it's a system limit so people don't exhaust kernel memory
by allocating hundreds of semaphores.
> Or I'm just walking around something obvious?
Not veryu obvious since they are undocumented but in the LINT kernel
config file there are several tunables:
I've just dug through the sources to document them, here's what I
plan to add to LINT:
# These three options provide support for System V Interface
# Definition-style interprocess communication, in the form of shared
# memory, semaphores, and message queues, respectively.
#
# System V shared memory and tunable parameters
options SYSVSHM # include support for shared memory
options SHMMAXPGS=1025 # max amount of shared memory pages (4k on i386)
options SHMALL=1025 # max amount of shared memory (bytes)
options SHMMAX="(SHMMAXPGS*PAGE_SIZE+1)"
# max shared memory segment size (bytes)
options SHMMIN=2 # min shared memory segment size (bytes)
options SHMMNI=33 # max number of shared memory identifiers
options SHMSEG=9 # max shared memory segments per process
# System V semaphores and tunable parameters
options SYSVSEM # include support for semaphores
options SEMMAP=31 # amount of entries in semaphore map
options SEMMNI=11 # number of semaphore identifiers in the system
options SEMMNS=61 # number of semaphores in the system
options SEMMNU=31 # number of undo structures in the system
options SEMMSL=61 # max number of semaphores per id
options SEMOPM=101 # max number of operations per semop call
options SEMUME=11 # max number of undo entries per process
# System V message queues and tunable parameters
options SYSVMSG # include support for message queues
options MSGMNB=2049 # max characters per message
options MSGMNI=41 # max number of message queue identifiers
options MSGSEG=2049 # max number of message segments in the system
options MSGSSZ=16 # size of a message segment MUST be power of 2
options MSGTQL=41 # max amount of messages in the system
> Sorry if I bother all of you too much,ppl, but I'm really in trouble
> with all that IPC stuff.
> Hanging around for a second week with no progress and even any idea how
> to get out.
Just use the above tunables to increase the amount of sysv ipc primatives
available to you.
--
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001107145559.F5112>
