Date: Wed, 08 Nov 2000 09:38:03 +0300 From: jadream <jadream@chat.ru> To: Alfred Perlstein <bright@wintelcom.net> Cc: freebsd-questions@freebsd.org Subject: Re: getsem()fails with "No space left on device" Message-ID: <3A08F4CA.5CAFDA2B@chat.ru> References: <3A08726E.20463FCE@chat.ru> <20001107145559.F5112@fw.wintelcom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Good morning, Alfred! You're just like an angel for me :0) When I think I'm gonna be crazy you save my life :0) Well ... to be serious. I got it I need to change in config and recompile the kernel. But you said tis done for ppl not making hundreds of semaphores and I need some really huge ammount - up to 8192 double-sem clusters to sinchronize my multiply connection-dependant processes that use mmaped pages (which I had to use instead of threads that are much more common for me as I was bread with OS/2). Hence I'm worring if I'm not breaking some hard system limits in this case? By the way, when I tried UNIX sockets on the role I got a serious memory leak in a simple test program ans what embarrased me most of all that all that lost mem wasn't released after prog was terminated and top reported is as resident (!). Ain't it strange? :0) Well, thank you very much, Alfred, wish i won't bother you soon :0) Alexander Komratov Alfred Perlstein wrote: > * 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?3A08F4CA.5CAFDA2B>