From owner-freebsd-questions@FreeBSD.ORG Tue Feb 23 20:59:37 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 11677106566B for ; Tue, 23 Feb 2010 20:59:37 +0000 (UTC) (envelope-from john@dexter.starfire.mn.org) Received: from dexter.starfire.mn.org (starfire.skypoint.net [173.8.102.29]) by mx1.freebsd.org (Postfix) with ESMTP id A7CE48FC0C for ; Tue, 23 Feb 2010 20:59:36 +0000 (UTC) Received: (from john@localhost) by dexter.starfire.mn.org (8.11.3/8.11.3) id o1NKxS667569; Tue, 23 Feb 2010 14:59:28 -0600 (CST) (envelope-from john) Date: Tue, 23 Feb 2010 14:59:28 -0600 From: John To: Yuri Message-ID: <20100223145928.A67451@starfire.mn.org> References: <4B84396F.3030305@rawbw.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <4B84396F.3030305@rawbw.com>; from yuri@rawbw.com on Tue, Feb 23, 2010 at 12:24:15PM -0800 Cc: freebsd-questions@freebsd.org 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 20:59:37 -0000 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. The reason that they are still out there with a bunch of free memory is that nothing has referenced them since they were written out - so maybe it will be a long time yet (if ever) before many/some/all of them are referenced again? If the same situation occurs again which caused them to be swapped out to begin with, before a situation occurs which references them, you'll be hurting your future system response time, not helping it. You may know these things are so and will happen in that way, but it is not self-evident from the e-mail. > Yuri > _______________________________________________ > 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" -- John Lind john@starfire.MN.ORG The inherent vice of capitalism is the unequal sharing of blessings; the inherent virtue of socialism is the equal sharing of miseries. - Winston Churchill