From owner-freebsd-current@FreeBSD.ORG Fri Jul 25 12:09:58 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 087DE37B401 for ; Fri, 25 Jul 2003 12:09:58 -0700 (PDT) Received: from kientzle.com (h-66-166-149-50.SNVACAID.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 508A343FB1 for ; Fri, 25 Jul 2003 12:09:57 -0700 (PDT) (envelope-from kientzle@acm.org) Received: from acm.org (ugly.x.kientzle.com [66.166.149.53]) by kientzle.com (8.12.9/8.12.9) with ESMTP id h6PJ9ssE036331; Fri, 25 Jul 2003 12:09:54 -0700 (PDT) (envelope-from kientzle@acm.org) Message-ID: <3F218087.5020308@acm.org> Date: Fri, 25 Jul 2003 12:09:59 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0.1) Gecko/20021005 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ahmed Al-Hindawi References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: mezz7@cox.net cc: freebsd-current@freebsd.org cc: wmoran@potentialtech.com Subject: Re: Memory Mangement Problem in 5.1-RELEASE X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: kientzle@acm.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2003 19:09:58 -0000 Ahmed Al-Hindawi wrote: > This is not the problem. We know what is the purpose of swap data. It is > swaping when there is more than suffiecient memory to do so. There is > disk activity on the swap disk (I have a seperate disk for faster > access) even when there is enough memory to suit my request and more. > > It is simply swapping when it shouldn't. > > Opening Mozilla, Opera, Netscape, DrJava, jEdit, Emacs, PrBoom, > XBubbles, and Nautilus at the same time on a 233Mhz machine should fill > up the memory (160Mb) but instead it has decided to use the swap disk > for a measly 50Mb which I do have in RAM!! This is definitely an FAQ. In short, FreeBSD manages swap space differently than does Linux or other systems. In particular, FreeBSD will copy data to swap preemptively in order to fulfill future memory requests more quickly. (By copying the data to swap now in the background, it can avoid stalling a future memory request because those blocks can simply be reallocated without waiting on the disk at the time the request is made.) If your system is spending a lot of time moving data to and from swap when it is not memory-starved, or if it is stalling memory allocations that it should be able to fulfill from free RAM, that's a concern. Otherwise, it is perfectly normal and expected to see a low level of swap activity even when memory is not completely full. Tim Kientzle