Date: Fri, 19 Dec 2008 12:13:21 +0200 From: David Naylor <naylor.b.david@gmail.com> To: FreeBSD <freebsd@optiksecurite.com> Cc: freebsd-questions@freebsd.org Subject: Re: Simple swap question Message-ID: <200812191213.26300.naylor.b.david@gmail.com> In-Reply-To: <494A693A.5050204@optiksecurite.com> References: <494A693A.5050204@optiksecurite.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812191213.26300.naylor.b.david>