From owner-freebsd-questions@FreeBSD.ORG Tue Feb 23 22:01:19 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43646106568B for ; Tue, 23 Feb 2010 22:01:19 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-ew0-f228.google.com (mail-ew0-f228.google.com [209.85.219.228]) by mx1.freebsd.org (Postfix) with ESMTP id 690A78FC0C for ; Tue, 23 Feb 2010 22:01:18 +0000 (UTC) Received: by ewy28 with SMTP id 28so14521ewy.33 for ; Tue, 23 Feb 2010 14:01:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=TOl2XgTx8qyUN9sgZGzHIlI4phV0x17SnY1Vsn4abgM=; b=YvonD7z7wEAb88T0HHjtaqBafEKSuV5c2lbg9PsE2NVLj7SqMs8bKl8eSFZPGsTc5L qyj2ufRM8k+KyzAFWy3HncpQqNS4kdL7zzu9J31FIqmfMWcJBMWMrOGlah4Chi1JC4m5 PV7kNoOTRNjR4LEriEu5ChDmkn3AZqh4u17CY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=xlHbpiBT/rWANsMQp/gQ6KoQo6gPRT+1mqKPn+ad/3H1zPXdLBEMxWlDwyGDDA2KZP kkuMit0Bpzxi0KXKpYSfSq26UUNPaL7F5fqpsDapBueAqGfum2VgeEyB1SxtjgSQOAyF g4riBH+zWMaLEuFkRtDNrFRQIvCw44tfzyLNQ= Received: by 10.213.109.203 with SMTP id k11mr3659301ebp.47.1266962470062; Tue, 23 Feb 2010 14:01:10 -0800 (PST) Received: from gumby.homeunix.com (bb-87-81-140-128.ukonline.co.uk [87.81.140.128]) by mx.google.com with ESMTPS id 23sm13932615eya.11.2010.02.23.14.01.08 (version=SSLv3 cipher=RC4-MD5); Tue, 23 Feb 2010 14:01:09 -0800 (PST) Date: Tue, 23 Feb 2010 22:01:06 +0000 From: RW To: freebsd-questions@freebsd.org Message-ID: <20100223220106.71af7f6f@gumby.homeunix.com> In-Reply-To: <20100223145928.A67451@starfire.mn.org> References: <4B84396F.3030305@rawbw.com> <20100223145928.A67451@starfire.mn.org> X-Mailer: Claws Mail 3.7.5 (GTK+ 2.18.7; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: Is there a command to load all swap into the memory? 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, 23 Feb 2010 22:01:19 -0000 On Tue, 23 Feb 2010 14:59:28 -0600 John wrote: > On Tue, Feb 23, 2010 at 12:24:15PM -0800, Yuri wrote: > > I am asking out of curiosity. > > 'top' describes the memory state on my machine like this: > > Mem: 1085M Active, 196M Inact, 301M Wired, 36M Cache, 112M Buf, > > 1366M Free Swap: 16G Total, 757M Used, 16G Free, 4% Inuse > > > > There is enough space in memory to load back all swap. Is there a > > command to do that for all swap? > > This will speed up immediate system response in the future. > > Well, you have assumed that the furture demand on the system will > involve the pages which are swapped out. If that assumption is > false, bringing them back into memory now will dramatically slow > down system responsiveness in the future, because the scarce resoure > will be free memory pages, which was the reason they were swapped > out in the first place. And AFAIK pages that are read back into memory are retained in swap to avoid haing to page them out again.