Re: Memory Management - BSD vs Linux

Darin Johnson (darin@connectnet.com)
Tue, 12 Aug 1997 19:18:48 -0700 (PDT)


> From: Mike Shaver <shaver@neon.ingenia.ca>
>
> Until someone creates a _huge_ file in /tmp (as my users are wont to
> do) and all of the sudden you're low on memory.
>
> Or when your MOO/database/rendering eats up piles of memory and
> sendmail can't create temp files and starts rejecting mail.
>
> Colour me unimpressed with tmpfs.

Actually I was thinking of writing something like this. Of course,
I *was* going to allow minimum free tmp and swap, so cases like this
don't happen. Of course, one can always run out of tmp or swap
without tmpfs; if tmpfs size was the old tmp size plus the old swap
size, why would there be less space?

The BSD method is simplest; it uses a RAM based device, that is stored
a separate process's address space, and you build a file system on top
of that. However, I was thinking of doing the file system directly
rather than using a device, as this should be faster (but it's hard
to say, the caches keep things fast enough, which removesy one of the
main reasons to use tmpfs).

The advantages are mostly in system setup and configuration (yeah, as
someone mentioned earlier about swap files that grow; a well
configured system won't need it, but Linux has never had a
prerequisite of being an expert admin). You can have a smaller root
partition that won't fill up, you can overestimate the size of the
swap partition without actually wasting disk (yeah, someone will pipe
in and say disks are cheap, but so am I), etc. And if you don't like it,
don't use (probably not as good an idea on a multi user machine).