From owner-freebsd-arch Wed Dec 19 12:36: 6 2001 Delivered-To: freebsd-arch@freebsd.org Received: from netau1.alcanet.com.au (ntp.alcanet.com.au [203.62.196.27]) by hub.freebsd.org (Postfix) with ESMTP id 8844037B419 for ; Wed, 19 Dec 2001 12:36:00 -0800 (PST) Received: from mfg1.cim.alcatel.com.au (mfg1.cim.alcatel.com.au [139.188.23.1]) by netau1.alcanet.com.au (8.9.3 (PHNE_22672)/8.9.3) with ESMTP id HAA24209; Thu, 20 Dec 2001 07:35:57 +1100 (EDT) Received: from gsmx07.alcatel.com.au by cim.alcatel.com.au (PMDF V5.2-32 #37645) with ESMTP id <01KC30C9N0AO4M3I51@cim.alcatel.com.au>; Thu, 20 Dec 2001 07:35:38 +1100 Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.11.6/8.11.6) id fBJKZsa58156; Thu, 20 Dec 2001 07:35:54 +1100 Content-return: prohibited Date: Thu, 20 Dec 2001 07:35:54 +1100 From: Peter Jeremy Subject: Swap performance (was: Getting rid of /usr file system) In-reply-to: <200112161616.fBGGGKg49403@aslan.scsiguy.com>; from gibbs@scsiguy.com on Sun, Dec 16, 2001 at 09:16:20AM -0700 To: "Justin T. Gibbs" Cc: freebsd-arch@FreeBSD.ORG Mail-Followup-To: "Justin T. Gibbs" , freebsd-arch@FreeBSD.ORG Message-id: <20011220073554.Q73243@gsmx07.alcatel.com.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.2.5i References: <200112120510.fBC5AEM33040@harmony.village.org> <200112161616.fBGGGKg49403@aslan.scsiguy.com> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Dec 16, 2001 at 09:16:20AM -0700, Justin T. Gibbs wrote: > I prefer to have my swap partition as close to the front >of the disk as possible to take advantage of the faster tracks. Is this particular piece of folklore still valid? It used to be true: When a process started, the text and data were read from the filesystem into memory. If necessary, the process was paged/swapped to/from swap. Pre-paging Unices in particular had comparatively high I/O load on swap since the entire process space needed to be read/written. (Hence the use of drums in better-equipped sites). For FreeBSD (and other modern Unices), processes are initially paged in from the filesystem. Under high memory load, pages will be paged to/from swap and from the filesystem. The removal of the need to swap entire processes and the removal of text (and other read-only data) from swap both reduce the I/O load of the swap device. It's no longer clear to me that dedicating the fastest piece of disk to swap is the best solution. The above is somewhat simplified - it ignores sticky executables (which transform filesystem I/O into swap I/O) and mmap(2) (which can result in paging to, as well as from, the filesystem) - but I believe it is generally representative. Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message