From owner-freebsd-questions Wed Jul 31 09:17:32 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA08746 for questions-outgoing; Wed, 31 Jul 1996 09:17:32 -0700 (PDT) Received: from root.com (implode.root.com [198.145.90.17]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id JAA08740 for ; Wed, 31 Jul 1996 09:17:29 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by root.com (8.7.5/8.6.5) with SMTP id JAA01727; Wed, 31 Jul 1996 09:16:36 -0700 (PDT) Message-Id: <199607311616.JAA01727@root.com> X-Authentication-Warning: implode.root.com: Host localhost [127.0.0.1] didn't use HELO protocol To: Juri Tsibrovski cc: questions@FreeBSD.ORG Subject: Re: Considering FreeBSD In-reply-to: Your message of "Wed, 31 Jul 1996 16:24:07 +0400." <2.2.32.19960731122407.00b12a5c@myth.sw.ru> From: David Greenman Reply-To: dg@root.com Date: Wed, 31 Jul 1996 09:16:36 -0700 Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >At 00:06 29.07.96 -0700, David Greenman wrote: >>>On Fri, 26 Jul 1996, Paul J. Mech wrote: >>> >>>> 0) When Linux runs out of virtual memory, it crashes. What is FreeBSD's >>>> behavior under these conditions? >>> >>>FreeBSD will start killing processes until the memory problem is resolved. >>>This usually means the program that is trying to start, and working >>>backward. Occaisionally the VM system gets too busy and kills init, but >>>that is very rare. >> >> FreeBSD will never kill init or any process whose process id is less than >>48. In the extremely unlikely event that the process consuming all the memory >>has a pid less than 48, the system will hang. This is extremely unlikely >>because when the pids wrap at 32767, then wrap back to 100, so usually only >>processes that were started at system startup time will have pids < 100. >> > >Is 48 a kind of magic number? Last night one of our machines eventually run >out of VM, then inetd (pid 91) and tac_plus (authorization and >authentification daemon for our terminal servers, pid 190) got killed. Now >I'm seriously considering modifying the source code to protect more >processes from being killed. No magic. It's just a value that seemed reasoonable at the time. Some systems may create daemons with PIDs >48, so perhaps the value should be increased a bit. YMMV. >So, what's the Pros et Contra, besides the risc of system crash when one of >that processes going crazy? Any other solution? The worst that will happen is that the system will hang due to virtual memory exhaustion. You should not increase it to >99, however, as 100 is the starting point after it wraps at 30000 and thus may protect processes that shouldn't be protected. The whole thing is admittedly somewhat of a kludge, but it actually handles about 98% of the failure cases and is a far better solution (killing off the process that faults when VM is exhausted) than hanging or crashing the system. -DG David Greenman Core-team/Principal Architect, The FreeBSD Project