From owner-freebsd-questions@FreeBSD.ORG Mon Nov 13 14:46:42 2006 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 7F77A16A4E5 for ; Mon, 13 Nov 2006 14:46:42 +0000 (UTC) (envelope-from greenwood.andy@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 36FDE43D8A for ; Mon, 13 Nov 2006 14:46:10 +0000 (GMT) (envelope-from greenwood.andy@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so944973uge for ; Mon, 13 Nov 2006 06:46:09 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bOEkQkvMfkDbSCkChOchfyVq3gzPDlcA3Cw1OFo+ZE3X56u4qhJv0dovtA0sKsN4Oh9xsYdBETYtUM+dwPKRzWgHIAdbV8+voZCGCNzdunfU3GPSxNKtZqLCCYs847WxyW9D6U5B4SpetzMrL5qWaCu+DQvVY8MdXO7NwHF3+Yk= Received: by 10.78.134.12 with SMTP id h12mr6323883hud.1163429169501; Mon, 13 Nov 2006 06:46:09 -0800 (PST) Received: by 10.78.139.10 with HTTP; Mon, 13 Nov 2006 06:46:09 -0800 (PST) Message-ID: <3ee9ca710611130646t457c8245jb3df0f1dc4443407@mail.gmail.com> Date: Mon, 13 Nov 2006 09:46:09 -0500 From: "Andy Greenwood" To: "Zbigniew Szalbot" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: FreeBSD Questions Subject: Re: changing swap size 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: Mon, 13 Nov 2006 14:46:42 -0000 On 11/13/06, Zbigniew Szalbot wrote: > Hello, > > Following the advice about periodic freezes, I am going to add some RAM to > my system. However, currently my swap size is 512MB. If I increase RAM to, > say, 1GB, would I need to change the swap size to 2GB? If so, is it a safe > process (I assume this can be done using FIPS)? Would I need to boot first > in single-user mode? As has already been said, you don't really need to change your swap size unless you're going to be using all of your physical memory and need the additional space. Since it doesn't sound like you're going to be putting any more load on the server, it's unnecessary. However, if you want to do it, you could, without going to single-user mode: 1) create an empty file somewhere. This will make a 1 MB file, adjust bs and count as you need to. # dd if=/dev/zero of=/path/to/some.file bs=1k count=1024 2) create a file based device with mdconfig like this. # mdconfig -a -t vnode -f /path/to/some.file 3) swapon your shiny new md device. Use the md device that was given as output from the above command. # swapon /dev/md0 4) verify that your device is now working as a swap device with # swapinfo -h 5) now you can swapoff your main swap, change it as you need, and swapon it back # swapoff /dev/ad0s1b # swapon /dev/ad0s1b 6) now that you new, improved swap is working, you can swapoff your temporary swap, remove the md device, delete the file, and verify that your swap is right # swapoff /dev/md0 # mdconfig -d -u md0 # rm /path/to/some.file # swapinfo -h > Any other thoughts? BTW - is there any easy way to > make sure how much RAM is currently installed other than looking into the > hardware? Top: > > Mem: 146M Active, 23M Inact, 98M Wired, 15M Cache, 41M Buf, 22M Free > > Which would seem to suggest I have 345 MB RAM. But from what I recall this > machine uses 320 MB RAM. Thanks! > > > -- > Zbigniew Szalbot > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > -- I'm nerdy in the extreme and whiter than sour cream