From owner-freebsd-questions@FreeBSD.ORG Sun Feb 4 21:53:15 2007 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4652716A401 for ; Sun, 4 Feb 2007 21:53:15 +0000 (UTC) (envelope-from alohaguy123@yahoo.com) Received: from web53614.mail.yahoo.com (web53614.mail.yahoo.com [206.190.39.181]) by mx1.freebsd.org (Postfix) with SMTP id 080A413C4A7 for ; Sun, 4 Feb 2007 21:53:14 +0000 (UTC) (envelope-from alohaguy123@yahoo.com) Received: (qmail 95764 invoked by uid 60001); 4 Feb 2007 21:53:14 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Message-ID; b=RD3bQ2PxQ6h+r/6WMdcU1zz4uSKMFP2okuCLViB5nsadMR4FabSFy6i4LMlDR4r0SM+3ltUXsbCnIOWASi2rwgKf0hd+vwWgG9XUeujF/DVCBshZtncuiGvkxfglFOzDil5AnUeEhUUrLvMDt8/knGGuo2xljX0zCYxLczAEoJc=; X-YMail-OSG: 5RC1PtsVM1mHFVRpcM0TaiovXd5XLgSoW8Lei5GVmO5r4eqEKKkrz_tsOPFoo9oHsC5ASmjNSjLcAHs3YVebjmPDNVNIbte43W6XCejo0SUWkMJSRxRM53OnenPIrsYTT0MPN3Lup82s28856q0HdQwqqrPhJ0v0nxc3KKkw.moXf15OSYddavNnPjkE Received: from [208.201.244.225] by web53614.mail.yahoo.com via HTTP; Sun, 04 Feb 2007 13:53:14 PST X-Mailer: YahooMailRC/368.3 YahooMailWebService/0.6.132.7 Date: Sun, 4 Feb 2007 13:53:14 -0800 (PST) From: Aloha Guy To: Scott Long MIME-Version: 1.0 Message-ID: <393982.95591.qm@web53614.mail.yahoo.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: questions@freebsd.org, current@freebsd.org Subject: Re: swap file vs 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: Sun, 04 Feb 2007 21:53:15 -0000 Thanks for the input. You do have good points. The only issue with swap p= artitions is that it seems like you need to increase it everytime you incre= ase the physical memory. Is there a swap partition size limit that pretty = much will handle anything and setting a number larger than that will really= not offer anything?=0A=0AJohn=0A=0A----- Original Message ----=0AFrom: Sco= tt Long =0ATo: Aloha Guy =0ACc: q= uestions@freebsd.org; current@freebsd.org=0ASent: Sunday, February 4, 2007 = 12:16:37 PM=0ASubject: Re: swap file vs swap partition=0A=0A=0AAloha Guy wr= ote:=0A> Greetings everyone:=0A> =0A> I am planning to build a few new boxe= s which will run -RELEASE and -CURRENT and I have a question about the swap= file. In the past, I had always used a swap partition of 256MB since I or= iginally had 128MB system memory in the 1990's but my system has been upgra= ded to 2GB and it seems the swap file would have more flexibility as I can = just change the size of the swapfile if I needed to. My question is is ther= e any difference in performance between a swap file versus a swap partition= and can one run a system with a swap file instead of a swap partition?=0A= =0AYes. A swap file requires a pass through the filesystem code in order= =0Ato figure out where each block is.=0A=0A> Also, searching has not gotten= me very far but are there any drawbacks to a swap file instead of a swap p= artition? I read somewhere that a few people seem to think that a swap fil= e can't handle kernel crash dumps?=0A=0AThat's correct, it cannot.=0A=0A> S= houldn't it be the same as both of them occupy disk space and as long as th= e swap file is large enough, wouldn't it work?=0A=0AThe crashdump code is w= ritten to assume that the dump space is=0Acompletely contiguous, something = that is not at all guaranteed by=0Aa swap file. While it would certainly b= e possible to modify it=0Ato make a pass through the filesystem like above,= the intention=0Aof the crashdump code is also to be as simple as possible = and to=0Adepend on as few kernel services as possible. When the system has= =0Acrashed, who knows what can be trusted anymore, right? Also, filesystem= =0Acorruption is a frequent cause of crashes; why risk that dumping to=0Aa = swapfile might encounter corruption and trash your entire filesystem.=0A=0A= Scott=0A=0A=0A =0A_________________________________________________________= ___________________________=0AGet your own web address. =0AHave a HUGE yea= r through Yahoo! Small Business.=0Ahttp://smallbusiness.yahoo.com/domains/?= p=3DBESTDEAL