RAM disk.

Tom Kessler kessler at hacketorium.Eng.Sun.COM
Wed Oct 10 07:05:42 AEST 1990



In article <1850 at necisa.ho.necisa.oz> boyd at necisa.ho.necisa.oz (Boyd Roberts) writes:
>When I hear `ram disk' I reach for my revolver.  Now, repeat after me...
>    What is the buffer cache? -- A ram disk.
>Increase NBUF and throw tmpfs away.

Whoa, hold on there.  There are some performance wins with tmpfs 
(once you get it working right :-) ) that you can't get by just upping
NBUF (with the SunOS/System V R 4 memory management NBUF doesn't do what 
it used to do anyway :-) ).  Remember that when you create and delete
lots of shortlived files you've got to update their inodes (yes, I know
i-nodes are cached as well as blocks).  With the UFS file system you
actually go to disk quite frequently (mostly for recover reasons).
If you've marked this files system as a tmpfs the kernel doesn't have
to worry about getting your stuff out to disk ever because presumably
you don't care if the files are still there after a reboot.
Maybe you could tweak the file system to "know this" but for whatever
I've found tmpfs to speed up compiles quite a bit.



More information about the Comp.unix.internals mailing list