From owner-freebsd-hackers Wed Dec 5 22: 2:30 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from gull.prod.itd.earthlink.net (gull.mail.pas.earthlink.net [207.217.120.84]) by hub.freebsd.org (Postfix) with ESMTP id 6655B37B416 for ; Wed, 5 Dec 2001 22:02:27 -0800 (PST) Received: from dialup-209.245.132.144.dial1.sanjose1.level3.net ([209.245.132.144] helo=mindspring.com) by gull.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16Brbo-00040t-00; Wed, 05 Dec 2001 22:02:12 -0800 Message-ID: <3C0F09EB.6AD237E8@mindspring.com> Date: Wed, 05 Dec 2001 22:02:19 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Tim Wiess Cc: Varshavchick Alexander , freebsd-hackers@FreeBSD.ORG Subject: Re: 4G phisical memory kernel trap References: <20011205103833.A1624@ahaza.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Tim Wiess wrote: > > Alexander, > I had experienced this problem before. It is most likely that you are running > out of page table pages. Try changing NKPT in /sys/i386/include/pmap.h to 64. > That worked for me. > > tim > > On Wed, Dec 05, 2001 at 03:57:22PM +0300, Varshavchick Alexander wrote: > > Hi, > > > > I have a PIII box with 4G phisical memory and FreeBSD 4.2 and it traps > > while booting - "fatal trap 12 page fault". With less than 4G memory the > > server is working good. He will still se problems under load, if he does this. In particular, it will lead to panics under load. The primary problem with using 4G is that the KVA space is too small to use that much memory reasonably, because of the swap maps that get created in /sys/i386/i386/machdep.c, which are scaled to 3 times the KVA space. In general, the FreeBSD design was to support sparse memory maps, where the amount of physical RAM did not approach the limits of the address space. I worked around this once by changing the calculation significantly, so that there was not an overallocation of the mapping tables. To be able to put this extra memory to profitable use, you will need to be able to allocate kernel structures, such as sockets, mbufs, and open file table entries, tcpcb's and inpcb's in it. For this to work, you really MUST address the machdep.c problems. I also suggest increasing the KVA space from 3G to 4G. Another sugestion is that you should use 4M pages for most of this memory, if you can figure out how to do it (it's not hard, but there is some minor intelligence required, since you will end up getting more trap 12 faults if you aren't careful). The mere acto of going to 4M pages will save you 4K per 4M of pages times how many pages you have, or ~4M. You will also get a 4-6% performance increase, overall, depending on usage patterns. I really should write an article for Daemon New on the FreeBSD startup process at boot time, to fill in the gaps behind Matt Dillon's articles on FreeBSD VM after it has been started up. I will start work on one. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message