[Mimedefang] Good Ramdisk Size

Stephen L Johnson stephen.johnson at arkansas.gov
Wed Mar 31 12:18:33 EST 2004


On Wed, 2004-03-31 at 08:56, Robert Covell wrote:
> What is a good ramdisk size for use with MD?  The default on linux is 4096
> but are concerned about those emails that have attachments over 4MB or
> getting several emails that together have attachments greater than 4MB.  We
> set the size to 50MB.  Do we need to do this?  Should we use the default
> ramdisk size (4096) and not worry about it?

The term ram disk is a bit confusing in Linux. There are actually 3
different things in Linux that can be classified as a ram disk.

First there is the RAM DISK which uses ram to act as a physical drive.
You build a file system inside of it. The ram usage is fixed and
unchanging.

Then there are two ram based file systems ramfs and tmpfs. Both of the
file system use kernel cache memory. Unlike a ram disk, ramfs and tmpfs
memory usage is dynamic. They only use as much memory as they need. As
data is delete, the corresponding memory pages are freed up.

ramfs is a bare minimal file system. It uses kernel cache memory to
store it's information. No limits checking and cache pages are pinned in
memory.

tmpfs is like ramfs, but it allows you limit the amount of ram that the
FS uses. tmpfs pages aren't pinned so they can be swapped of to disk if
need be. 

tmpfs is what you need. 

-- 
Stephen L Johnson                       stephen.johnson at mail.state.ar.us
Unix Systems Administrator              sjohnson at monsters.org
Department of Information Systems
State of Arkansas
501-682-4339



More information about the MIMEDefang mailing list