From owner-freebsd-questions@FreeBSD.ORG Fri Dec 19 10:13:41 2008 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 88AF81065676 for ; Fri, 19 Dec 2008 10:13:41 +0000 (UTC) (envelope-from naylor.b.david@gmail.com) Received: from mail-ew0-f21.google.com (mail-ew0-f21.google.com [209.85.219.21]) by mx1.freebsd.org (Postfix) with ESMTP id E49198FC08 for ; Fri, 19 Dec 2008 10:13:40 +0000 (UTC) (envelope-from naylor.b.david@gmail.com) Received: by ewy14 with SMTP id 14so1152156ewy.19 for ; Fri, 19 Dec 2008 02:13:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:organization:to:subject :date:user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=VhHqXRQQ8oAkyDzuL4TicQBIBbDDIWrdhbtzEcd7udc=; b=U8IQ597nrBoqVtzMyZaPAh7clZsOVUzktJGNAROcfsWAxxlldD2iX4lRz79EKpQl0Z FKAadn/Hl/hDEx2280x8Rbx7QSQRLYU3mmruek1kZECiuK96pEjXAQnc8qGzdVrsFo3b IPDXpx3vv2vtTh83OWMJXWbkizsoQkncQxDt8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:organization:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id; b=ZV1hjowqgFsh0B+7N9SOPtF8YXoT3vaIRCjy4vLP96whLBlKxKr12srb99TM1jjTyd oYaK820YB0/v0O3SZvwLkX4UeEkbeZxOuaC5nuWlKYmA39TWqKFUubpe+WkGn4b/gRwW Pg4yQvPwKZD+08StbZY7QU+AOBjL6sYvWFXL8= Received: by 10.210.34.5 with SMTP id h5mr3513800ebh.161.1229681619793; Fri, 19 Dec 2008 02:13:39 -0800 (PST) Received: from ?0.0.0.0? ([196.34.241.123]) by mx.google.com with ESMTPS id g11sm5504411gve.16.2008.12.19.02.13.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 19 Dec 2008 02:13:38 -0800 (PST) From: David Naylor Organization: Private To: FreeBSD Date: Fri, 19 Dec 2008 12:13:21 +0200 User-Agent: KMail/1.9.10 References: <494A693A.5050204@optiksecurite.com> In-Reply-To: <494A693A.5050204@optiksecurite.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2490624.y4Mk0WFcDt"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200812191213.26300.naylor.b.david@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: Simple swap question 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: Fri, 19 Dec 2008 10:13:41 -0000 --nextPart2490624.y4Mk0WFcDt Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 18 December 2008 17:16:10 FreeBSD wrote: > Hi everyone, > > I have a FreeBSD 7.0-Release server that started to swap after an error > in a shell script (process spawning competition ;-) ). I killed the > shell and the RAM is now OK. The problem is that the swap is still used. > How can I "reset" the swap? > > Thanks for sharing your knowledge, > > Martin Easy: # swapoff -a ; swapon -a It just removes all swap devices (with the content mapped back into memory)= =20 and then turns the swap devices back on. Just make sure you have enough RAM to run your system while it does this=20 (since only the RAM will be available for the system [NO SWAP])!!! =20 WARNING: This could kill your system and does eat babies!!! To others: There is one reason I can think of for doing this, if an=20 irregularly used program (that is rather big) has been swapped out but=20 requires a low latency when used (i.e. must not wait to be swapped back=20 in...) then it would be desired to get the program swapped back into RAM as= =20 soon as possible after RAM has been freed. =20 Regards, David --nextPart2490624.y4Mk0WFcDt Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEABECAAYFAklLc8YACgkQUaaFgP9pFrKcrwCfUn1LoAgNWoenKkyd1tPwtqOU z8cAnROocs22/FodF/P/o40JMJ/dTF7t =Vqax -----END PGP SIGNATURE----- --nextPart2490624.y4Mk0WFcDt--