Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Oct 2004 12:32:40 -1000
From:      Clifton Royston <cliftonr@lava.net>
To:        hackers@freebsd.org
Subject:   Relative performance of swap-backed MFS vs. regular UFS?
Message-ID:  <20041022223238.GA12502@tikitechnologies.com>
Resent-Message-ID: <20041022224551.D8567153884@malasada.lava.net>

next in thread | raw e-mail | index | archive | help
  I have seen some conflicting information posted about this in the
past, and I figure this is the best place to get an authoritative
answer.

  For a large temporary file system which must hold short-lived files,
mostly small but occasionally several very large ones (e.g. 100MB+), is
it better for performance and stability if this file system:

  1) resides on a swap-backed MFS and trusts the OS to swap out
low-priority blocks if needed under RAM pressure, or

  2) on a regular UFS and trusts the OS to buffer as many blocks as
possible into RAM when RAM is free?

  The application here is amavisd-new, which needs transient space for
unpacking and virus-checking mail files in transit.  It is designed
such that the files never need to exist permanently; it's just fine if
everything vanishes on a reboot.

  Each scanning server has about 1GB of RAM, which is mostly free most
of the time.  I initially had /var/amavis a regular directory under the
/var fs; then I switched to a 128MB MFS system backed by a 1GB swap on
/dev/ad0s1b. This works 99.99% of the time, and seemed to run a little
faster, but occasionally a couple big ZIP files can come through at
once and run it out of space.

  I temporarily enlarged it to 256MB which is working, but as I worked
out the worst case scenario, I realized it really would need to be
nearly 1GB to handle multiple zip-bombs each hitting the 100MB size
limit.  This makes me wonder if it's wise to specify a 1GB MFS on a
system with only 1GB RAM, or wiser to just revert to a regular file
system?

  -- Clifton

-- 
          Clifton Royston  --  cliftonr@tikitechnologies.com 
         Tiki Technologies Lead Programmer/Software Architect
Did you ever fly a kite in bed?  Did you ever walk with ten cats on your head?
  Did you ever milk this kind of cow?  Well we can do it.  We know how.
If you never did, you should.  These things are fun, and fun is good.
                                                                 -- Dr. Seuss



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