From owner-freebsd-questions@FreeBSD.ORG Tue Dec 27 12:08:14 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 A99C216A41F for ; Tue, 27 Dec 2005 12:08:14 +0000 (GMT) (envelope-from bjoern.koenig@spray.se) Received: from efacilitas.de (smtp.efacilitas.de [85.10.196.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26BFE43D53 for ; Tue, 27 Dec 2005 12:08:13 +0000 (GMT) (envelope-from bjoern.koenig@spray.se) Received: from eurystheus.local (port-212-202-39-231.dynamic.qsc.de [212.202.39.231]) by efacilitas.de (Postfix) with ESMTP id 4F3884C420; Tue, 27 Dec 2005 13:16:40 +0100 (CET) Received: from [192.168.1.2] (muhkuh.local [192.168.1.2]) by eurystheus.local (Postfix) with ESMTP id C87A55285C; Tue, 27 Dec 2005 13:06:27 +0100 (CET) Message-ID: <43B12EAE.4040808@spray.se> Date: Tue, 27 Dec 2005 13:08:14 +0100 From: =?windows-1252?Q?Bj=F6rn_K=F6nig?= User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: Kiffin Gish References: <000a01c60ada$0b76c840$2401a8c0@XGISH> In-Reply-To: <000a01c60ada$0b76c840$2401a8c0@XGISH> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-questions@freebsd.org Subject: Re: Memory upgrade and resizing the /swap partition ... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Dec 2005 12:08:14 -0000 Kiffin Gish schrieb: > I just upgraded my laptop from 512MB to 1024MB memory. > > It is said that the /swap partition has to be at least as much as the maximum available memory, [...] This is more an ancient rule of thumb. You can even have a working system without swap at all. Swap will be only used if you have to less memory available and it depends on the main purpose of the computer how much swap you need. For example I have a small server at home that acts as small web server, mail server, file server and many other things; the server has 768 MB RAM and 128 MB swap and ran for the last two years without "out of memory" failures. > Can I increase the size of the existing swap partition or do I have to create a new one? [...] There is another solution: you can use a file that extends your swap partition. # create an empty 256 MB file dd if=/dev/zero of=/usr/swapfile bs=1024k count=256 # add an appropriate line to rc.conf echo 'swapfile="/usr/swapfile"' >> /etc/rc.conf # add swap /etc/rc.d/addswap start 'swapinfo' shows information about your current swap partition and files. Regards Björn