[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ltsp-discuss
Subject:    [Ltsp-discuss] using tmpfs, also known as shmfs
From:       Wolfgang Schweer <schweer () cityweb ! de>
Date:       2002-03-29 11:39:54
[Download RAW message or body]

Hi Hans, hi John,

perhaps it's better to start a new thread.

> On Wed, Mar 27, 2002 at 09:51:05AM +0100, Hans Ekbrand wrote:
...
> > Put a line like this into the file /etc/fstab of your ltsp tree
> >
> > shmfs	/tmp	shm	defaults	0 0
> > -----------------------------------------
...
> > 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
> > --------------------------------------------
> >
> > hope it works for you,

> It did! But I don't really know how to measure the gain in RAM. I set
> the runlevel to 3 and run "free" as first command. The smfs system
> reported 2416 free kb of RAM, and the ramdisk setup gave about 2200
> (don't remember exactly). But that's perhaps not a good measure? (Even
> if it's just some 200k of RAM, that's still 200k of RAM, so I will of
> course continue to use it).

Hans,

for me the difference is that shmfs grows and shrinks, whereas the
ram disk has a fixed size. I've found an interesting article (attached)
containing much more information than can be found in
<kernel_src_dir>/Documentation/filesystems/tmpfs.txt

----------------------------
> From david@johnstons.net Fri Mar 29 11:57:49 2002
>
> 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?

John,

that's the default. You can overwrite this by skipping the entry in
/etc/fstab and using instead a line like this one in rc.local:

mount tmpfs /tmp -t tmpfs -o size=40m

the kernel will then use real memory and swap space (this has to be
available) combined with a size of 40MB as virtual memory - as far as I
understand the whole thing.

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

Tried it on a few stations at home, just starting to understand.
My intention was to free up space for boxes low on ram - as Hans did.
At school there are a lot of boxes with 8MB.

Perhaps one can solve the problem posted to the list a few days ago:
Apps want to write to /tmp, but /tmp is limited to 1MB by default.
Having tmpfs mounted on /tmp, this limit does not exist, cause swap is
used automagically by tmpfs.

Another point of view is that tmpfs is needed for POSIX compliance.
Recent distros have shmfs mounted on /dev/shm due to this.
In future more and more apps may depend on the existance of tmpfs.

Wolfgang

["l-fs3.html.gz" (APPLICATION/x-gunzip)]
_____________________________________________________________________
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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic