Wolfgang Schweer wrote:
> On Tue, 26 Mar 2002, Hans Ekbrand wrote:
> > > It is then possible to skip the ram disk for /tmp, using shmfs instead.
> > > Shmfs (is) resizable, only the needed memory is occupied. Compared to
> > > the standard ram disk for /tmp one can gain nearly one meg of ram.
> >
> > in order to use shmfs instead of ram disk, I suppose have to modify:
> > /opt/ltsp/i386/etc/modules.devfs:alias     /dev/ram*            rd
> > /opt/ltsp/i386/etc/rc.local:/sbin/mke2fs -q -m0 /dev/ram1 ${RAMDISK_SIZE}
> > /opt/ltsp/i386/etc/rc.local:/bin/mount -n /dev/ram1 /tmp
> >
> > and substitute "/dev/ram" with "/dev/shm". But is it that simple?
> 
> hi Hans,
> 
> these are the steps that work for me:
> -------------------------------------------
> Put a line like this into the file /etc/fstab of your ltsp tree
> shmfs   /tmp    shm     defaults        0 0
> -----------------------------------------
> Modify /etc/rc.local for use with a custom kernel:
> (custom kernel with devfs and shmfs compiled in,
> devfs with 'mount on boot' enabled, either compiled in or
> via kernel command line param 'devfs=mount'):
> 
> 1) replace
>     PATH=/bin:$PATH; export PATH
>    with
>     PATH=/bin:/usr/bin:/usr/sbin:/sbin; export PATH
> 
> 2) replace
>     echo "Creating ramdisk on /tmp"
>     RAMDISK_SIZE=`get_cfg RAMDISK_SIZE 1024`
>     /sbin/mke2fs -q -m0 /dev/ram1 ${RAMDISK_SIZE}
>     /bin/mount -n /dev/ram1 /tmp
> 
>    with
>     echo "Mounting shmfs on /tmp"
>     mount -a
> --------------------------------------------

AIX 4.1 could use a similar setup for /tmp.  Things I remember about
this are:
1. Reboots clear out /tmp for you.
2. If someone copied a large file (greater than paging space), you were
in trouble.  If I recall correctly, AIX treats paging space like RAM and
uses RAM as a cache for paging space, so as long as you've got room in
your paging area, you're OK.

Linux doesn't seem to handle memory like this.  I added this to
/etc/fstab:
shmfs   /mnt/fubar    shm     defaults        0 0

and mounted /mnt/fubar on two systems, one with 128MB and one with 256. 
In each case, df showed /mnt/fubar to be one half of physical RAM;
adding swap did not change this.  If this holds true for smaller
systems, a dc with 16MB would have to get by with at most 8MB in tmp. 
Is this likely to be a problem?

Wolfgang, do you use tmpfs on all of your LTSP systems?  Are you
satisfied with the results?  Should we all be using it?
-David

_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.openprojects.net

Reply via email to