From owner-freebsd-questions Sun Sep 22 18:16:47 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CB54737B401 for ; Sun, 22 Sep 2002 18:16:45 -0700 (PDT) Received: from mail.au.darkbluesea.com (mail.au.darkbluesea.com [203.185.208.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A51443E65 for ; Sun, 22 Sep 2002 18:16:44 -0700 (PDT) (envelope-from d.anker@au.darkbluesea.com) Received: (qmail 20704 invoked by uid 82); 23 Sep 2002 01:15:30 -0000 Received: from unknown (HELO ?10.0.0.188?) (10.0.0.188) by mail.au.darkbluesea.com with SMTP; 23 Sep 2002 01:15:30 -0000 Subject: Virtual memory allocations and signal 11 core dumps From: Duncan Anker To: freebsd-questions@freebsd.org Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 23 Sep 2002 11:14:59 +1000 Message-Id: <1032743700.20802.44.camel@duncan> Mime-Version: 1.0 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi all, I posted a few weeks back about apache core dumping with signal 11 - as it turns out, it's not just apache, but a lot of processes which are doing it. Signal 11 is apparently indicative of hardware problems, so I thought in this case it might be memory allocation. I have been investigating how memory works under FreeBSD, and it seems to be this way: Irrespective of how much memory you really have, you have a virtual memory size of 4Gb (maximum imposed by the 32-bit architecture). Of this, the kernel will use 1Gb leaving 3Gb for user processes. Each process by default is granted 128Mb data size up to a 512Mb limit. This limit can be raised up to just under 2Gb by setting MAXDSIZ (due to the use of a signed int, I suspect). Given this information, and I would appreciate corrections if I have any of it wrong, my question then becomes this - if I have, for example, 512Mb of real memory and 2Gb of swap space then that would give me a maximum 2.5Gb (depending on how the swapper handles this). What happens once this maximum is used up, since the system has a theoretical maximum of another 1.5Gb? If the system actually tries to use the space allocated through the over-committing strategy is the net result going to be that dreaded signal 11? For that matter, even if one does have 4Gb available, whether real or swap, it seems entirely possible that one could run several large processes and go over this limit. Would this cause a crash? A more practical question might be "Should I ensure that the number of precesses running won't use more than my total available memory less the 1Gb for the kernel?" Thanks in advance Duncan Anker To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message