Re: Swapfile

Mike Castle (mcastle@umr.edu)
Mon, 2 Oct 1995 13:38:03 -0500 (CDT)


Amazingly enough Kai Schulte said:
> On Sun, 1 Oct 1995, Dirk-Jan Koopman wrote:
>
> > I was wondering the other day whether, in this modern day & age, we need
> > to have separate swap partitions? What with running X, doing a longish
> > print in netscape and only 32Mb of RAM, I was swapping and couldn't I
> > hear it!
>
> Having an extra partition to swap to reduces file system overhead, and
> by keeping the swap partition on a separate drive you can gain further
> improvement in performance compared to a swap file within the same
> file system :)

I was under the impression that Dirk-Jan was aware of the use of a swapfile, but felt
that, by having a swap _partition_, this caused more seeks to be done when running
programs that both caused paging and did lots of disk access.

Personally, I don't think a swap file would accomplish any savings in seeks. The file
still wouldn't be likely to be in a location that would be optimisable with regular disk
accesses. And the extra layer of overhead of going through the filesystem (even if the
filesystem was swap aware, and would treat accesses to swap files differently from other
accesses), would be more than you could gain from trying to redesign the system.

As Kai mentioned, putting the swap partition on the least used drive is probably the
best bet. If you have only a one drive system, you're always going to have a lot of
seeks when paging and doing file access, no matter if using partitions or files.

mrc

-- 
Mike Castle .-=NEXUS=-.  Life is like a clock:  You can work constantly
  mcastle@cs.umr.edu     and be right all the time, or not work at all
   mcastle@umr.edu       and be right at least twice a day.  -- mrc
    We are all of us living in the shadow of Manhattan.  -- Watchmen