Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Feb 2001 18:58:52 -0600
From:      "Michael C . Wu" <keichii@iteration.net>
To:        "Forrest W. Christian" <forrestc@imach.com>
Cc:        freebsd-small@freebsd.org, dillon@freebsd.org
Subject:   Re: Sans-Swap VM Subsystem Questions
Message-ID:  <20010211185852.F19845@peorth.iteration.net>
In-Reply-To: <Pine.BSF.4.21.0102110001210.18747-100000@workhorse.iMach.com>; from forrestc@imach.com on Sun, Feb 11, 2001 at 12:13:24AM -0700
References:  <Pine.BSF.4.21.0102110001210.18747-100000@workhorse.iMach.com>

next in thread | previous in thread | raw e-mail | index | archive | help

The general idea is that many parts of FreeBSD sometimes count on 
having swap and such.  Can you use some part of the flash disk for
swap? 
i.e. if (no_swap == TRUE) {bad_things_happen(); return ENOTVERYGOOD;}

On Sun, Feb 11, 2001 at 12:13:24AM -0700, Forrest W. Christian scribbled:
| I asked this (phrased differently) over in -hackers as I thought the
| people who would know were likely among that crowd.  I didn't get a
| response, and in retrospect, it's probably better asked here anyways.
| 
| I'm currently working on a system with a rather large flash disk, Limited
| RAM, and absolutely no swap.
| 
| Some background first:
| 
| The FreeBSD VM subsystem in it's "normal" state understands that if it
| loads a program off of disk and then gets tight on memory that it can free
| the memory consumed by the non-changed code of the program without
| swapping to disk as it knows that it can just re-load it from the disk
| where it found it.
| 
| In my system, since I don't have swap, and limited memory, I would like to
| ensure that the above described piece of the VM subsystem continues to
| work.  That way, it can effectively "run from flash" if necessary. 
| However, as memory is (always) tight in this environment, I would
| also like to remove the SWAPPING code (as opposed to the "free" code
| described above) from the kernel.

I believe there is a NO_SWAP option in LINT/NOTES.  However, I remember
Peter Wemm stating in a certain forum that do such things is BAD(TM).

| So, my question was what, if anything, does "options NO_SWAPPING" (or
| whatever the exact option is) do in regards to the vm "free" chunk of
| code?

Same thing as you want.

| I'd also like to hear people's experience with running with and without
| the two swap-related kernel variables turned on without swap.  I realize

The performance decreases drastically with no VM on.  I am not the
VM expert, but I think it is true.  I have CC'ed Matt Dillon, our
VM guru, just to make sure. :)

| that the general consensus is to "enable" both delay and disable swap
| pagesouts.

-- 
+------------------------------------------------------------------+
| keichii@peorth.iteration.net         | keichii@bsdconspiracy.net |
| http://peorth.iteration.net/~keichii | Yes, BSD is a conspiracy. |
+------------------------------------------------------------------+


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-small" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010211185852.F19845>