[614] in linux-announce channel archive
swapd (v1.3)
daemon@ATHENA.MIT.EDU (Lars Wirzenius)
Wed Jun 7 20:54:44 1995
Date: Wed, 7 Jun 1995 04:37:29 -0500
From: Lars Wirzenius <wirzeniu@rose.uthscsa.edu>
To: linux-activists@niksula.hut.fi, linux-announce@vger.rutgers.edu
X-Mn-Key: announce
From: Nick Holloway <Nick.Holloway@alfie.demon.co.uk>
Organization: Alfie's Internet Node
Subject: swapd (v1.3)
Keywords: swap, daemon, auto, VM
Newsgroups: comp.os.linux.announce
Approved: linux-announce@news.ornl.gov (Lars Wirzenius)
Followup-to: comp.os.linux.development.system
This is the first public release of swapd, a program to dynamically manage
VM by adding or removing swap files as needed. It should be found as:
ftp://tsx-11.mit.edu/pub/linux/sources/sbin/swapd-1.3.tar.gz
I personally don't use it, but some people may find it useful. However,
with faster file swapping, coupled with tmpfs, and then...
README, and LSM follow signature.
--
Nick Holloway | `O O' | Home: Nick.Holloway@alfie.demon.co.uk
[aka `Alfie'] | // ^ \\ | Work: Nick.Holloway@parallax.co.uk
$Id: README,v 1.2 1995/05/21 20:26:57 alfie Exp $
Every so often, there is an outcry about the Linux kernel, which goes
something like:
o Shock! Linux will grant requests for memory that it might not be
able to satisfy, and how this is terrible.
o All requests to sbrk() should be given real VM, so that no process
has memory promises broken.
o This is refuted by the fact that many system calls, eg fork(), can
cause a need for more VM, as can even a function call (more stack).
o This then prompts a call for the kernel to be able to dynamically
add swap space.
o Finally, it is said that a user space daemon would be a more
suitable place to do this.
This is where `swapd' comes in. This is a program that will monitor
the amount of free VM available, and will dynamically add swap files
as needed.
I personally don't use this daemon, but there are people who have made
requests for a program of this sort. So, this is for the people who
want it, or for the people that think they want it...
Swapd will allow free space in the filesystem to be used as swap when
needed by adding additional swap files as needed.
Swapd periodically monitors the amount of free swap available in
the system. It tries to maintain the amount of swap using upper and
lower limits. If the amount of free swap falls below the lower limit,
it will add an extra swapfile. A swap file will be removed if it will
still leave the system with at least the upper limit available.
Since swapping from a file is less efficient than swapping from a
partition, this can be used to `top up' the swap when needed (but will
also work as the sole source of swap).
All of the parameters can either be changed at compile time, or at
run time from the command line. The current defaults are arbitary --
if you find better settings, let me know.
The history of swapd is as follows:
* The idea for swapd was originally conceived when I discovered that
I had failed to compile xv due to being short of 1M of swap (after
having 8+8Mb VM).
* The original code was written in April 1993, but needed extra
code (more parameters, signal handling, and parameter checking).
Also it needed fsync() to hit the streets.
* It sat on my disk until April 1994, where the discussion came up
again, and I tidied up the code, and made it available on request.
Only two people requested it, and no feedback was made.
* In February 1995, the discussion appeared again, and the same offer
was made. This was taken up by more people, and feedback was
received.
* Since it was found useful, and the code seems stable (and bugs fixed)
I am now making the public release.
Thanks to Tim Norman, Jim Nance, and David Groves (and possibly others
I have forgotten) for their encourangement and testing.
Nick Holloway
<Nick.Holloway@alfie.demon.co.uk>
<Nick.Holloway@parallax.co.uk>
Begin3
Title: swapd
Version: 1.3
Entered-date: 21May95
Description: swapd is a daemon that will create swap files on the fly to
cope with peak VM demands.
Keywords: swap, deamon, VM, /dev
Author: Nick Holloway <Nick.Holloway@alfie.demon.co.uk>
Maintained-by:
Primary-site: tsx-11.mit.edu /pub/linux/sources/sbin
6751 swapd-1.3.tar.gz
Platform: Linux
Copying-policy: Freely redistributable
End
--
Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov
PLEASE remember Keywords: and a short description of the software.