[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: swap and /tmp



On Sat, May 06, 2006 at 09:58:27PM -0400, Dave Witbrodt wrote:
> >I think you might be misunderstanding what ramfs does. 
> >using ramfs doesn't put any additional restrictions on
> >the maximum size of the temp partition. You just have to
> >add whatever space would have been used for a tmp partition
> >to your swap partition, and you will be able to support
> >just as many CD and DVD images.
> >
> >The effect of using ramfs is to allow things to run faster by
> >removing any requirement to keep a complete filesystem image on
> >non-volatile media (disk), and to allow greater flexibility by
> >allowing disk space to be distributed between /tmp space and
> >backing store for memory on demand rather than being fixed at
> >installation time.
> 
> I can see where it would work well under sane conditions.  It just 
> seems like problems would emerge if too many little files were created 
> in /tmp, or if someone tried to burn a DVD with a program that used 
> /tmp while they had other resource intensive programs running.
> 
> Most of the time it should work just fine, so I'll have to try it out. 
>  :)  It just seems like many things could go wrong that couldn't go 
> wrong using a physical /tmp partition.  I'm about to set up a 
> web/email server, and I can see where using tmpfs for /tmp would be of 
> great benefit in that situation, as long as /tmp and swap are sized 
> properly.

Still not sure I see what potential problems are concerning you.

A ramfs filesystem is likely to handle large numbers of small files
better than many conventional filesytems, because ramfs does not
(to my knowledge) have any inode limitations on file counts...

Can you give an example of something that would be ok on a conventional
disk partition based /tmp filesystem but not if /tmp was on ramfs?

Regards,
DigbyT
-- 
Digby R. S. Tarvin                                          digbyt(at)digbyt.com
http://www.digbyt.com



Reply to: