You are not logged in.

#1 2005-02-18 14:47:00

ganja_guru
Member
Registered: 2005-02-14
Posts: 464

tmpfs full?

i tried creating a tar.gz to make a pacman pack...and i got an error while compressing ...i checked the logs and i got a 'cannot write to /tmp'..using kdiskfree i found out that /tmp was full...is this suposed to happen?..i deleted all thefiles in /tmp and restarted X and everything was fine, but wont it fill up again..sorry, not familiar with tmpfs...anyway to clear /tmp automatically, or increase the space? or make it dynamic?

Thanks!

Offline

#2 2005-02-18 16:06:03

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: tmpfs full?

By default its size is 1/2 of your RAM. The solution would be to hash it out of fstab, thus using genuine hard disk space for /tmp or changing its default size by adding size=Xbytes to the options column of tmpfs in fstab.

Online

#3 2005-02-18 16:58:09

ganja_guru
Member
Registered: 2005-02-14
Posts: 464

Re: tmpfs full?

thanks ...would either method make any difference? what would you suggest?

Offline

#4 2005-02-18 17:56:44

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: tmpfs full?

Well, it depends on your amount of RAM and how much do you utilize /tmp. If you have a sufficient amount of RAM and don't place big files in /tmp, stay with tmpfs. Otherwise, don't. Remember, that always when you know you're gonna do something 'tmp-intensive' (oh, what a nice word I have created :-)) you can just 'mount -o size=bigenoughforyou remount /tmp'. It's better not to set size of tmpfs too big in default or it could eat all of your RAM and hog your PC :-)

Online

#5 2005-02-19 06:39:23

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Re: tmpfs full?

Using "tmpfs" for '/tmp' is nice if you are low on disk space and high on memory.  In my case with a 30 gig'er, I commented out the use of "tmpfs" for '/tmp'.

If you just do that, everytime you reboot, the init scripts will wipe '/tmp' clean for you anyway, so what's the point of using "tmpfs" with all that free HD space.  I haven't found any real benefit to using it's faster memory access.  Most hard drives today will transfer 300MB in a "blink of an eye" just as well.  Well, maybe more like 2 "blinks of an eye"...

Offline

#6 2005-02-21 07:59:22

cs25x
Member
Registered: 2004-05-04
Posts: 150

Re: tmpfs full?

I have 1 G of ram & still filled tempfs, so I also comment out tempfs in /etc/fstab. That is on the desktop. My laptop has even less ram.
There is one thing I do not know about temps, does it count ram+swap, or just ram? If it is ram + swap than I can not see the point in using tempfs,given that both will be on a hard drive somewhere.


--(*(cs25x--));

Offline

#7 2005-02-21 08:06:08

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: tmpfs full?

from my understanding, tmpfs behavior is this :
it uses your available memory, ie RAM+swap (if swap is configured), and use it as one memory unit. if you have enough free RAM (ie, swap is not used yet) tmpfs will prove itself much faster since writing will be done directly into memory - ie, RAM. i use tmpfs extensively (i have 1GB ram) since obviously RAM writing is too fast to even compare to my sata writes...  8)

Offline

#8 2005-02-21 09:07:47

ganja_guru
Member
Registered: 2005-02-14
Posts: 464

Re: tmpfs full?

z4ziggy : what happens when you run out of the allocated ram for tmpfs? does it auto clear without a reboot?  will tmpfs reduce the ram available for things like opening apps and general system speed/responsiveness?

Offline

#9 2005-02-21 09:15:31

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: tmpfs full?

when u run out of space in tmpfs, it behaves just like any normal filesystem should : gives u approp message saying you are out of space...
yes, ofcourse it autoclears on autoboot, thats the meaning of a ram filesystem wink
and yes, tmpfs will reduce available ram for the overall station since its uses same memory. however, as far as i remember tmpfs default settings is to use only 80% of total memory to eliminate "out-of-memory" for your running applications. another however - if u clean your work in /tmp (the tmpfs mount) and u know what u doing, u shouldnt worry about any "bad effects". thats from my personnal experience only though.

Offline

#10 2005-02-21 18:00:14

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: tmpfs full?

http://modzer0.cs.uaf.edu/wiki/index.php/Tmpfs

(from the Linux source Documentation/filesystems/tmpfs file)

Tmpfs is a file system which keeps all files in virtual memory.

Everything in tmpfs is temporary in the sense that no files will be created on your hard drive. If you unmount a tmpfs instance, everything stored therein is lost.

tmpfs puts everything into the kernel internal caches and grows and shrinks to accommodate the files it contains and is able to swap unneeded pages out to swap space. It has maximum size limits which can be adjusted on the fly via 'mount -o remount ...'

If you compare it to ramfs (which was the template to create tmpfs) you gain swapping and limit checking. Another similar thing is the RAM disk (/dev/ram*), which simulates a fixed size hard disk in physical RAM, where you have to create an ordinary filesystem on top. Ramdisks cannot swap and you do not have the possibility to resize them.

Since tmpfs lives completely in the page cache and on swap, all tmpfs pages currently in memory will show up as cached. It will not show up as shared or something like that. Further on you can check the actual RAM+swap use of a tmpfs instance with df(1) and du(1).

Conclusion:
1. non-disk-mounted tmpfs resides in cached kernel memory
2. looking at the "free -m" && "df -hT", the 1/2*RAM is the max size of the tmpfs (not actually occupied, because on my 1GB system I have a cache of ~300MB, ~0MB swapped && 500MB tmpfs (~100KB occupied in tmpfs))
3. it is swap-able (advantage over ramfs)
4. resizable via "remount" option of mount (no example there)

Offline

#11 2005-02-21 18:47:47

SG-3
Member
Registered: 2005-02-01
Posts: 28

Re: tmpfs full?

mount -o remount,size=1G,noatime /tmp

"just below me"

Offline

#12 2005-02-22 01:16:14

cs25x
Member
Registered: 2004-05-04
Posts: 150

Re: tmpfs full?

IceRAM, thanks. I exceeded 2g or so of tempfs !! all I was doing was unpacking with mc, like ganja_guru.

perhaps mount -o remount,size=10g,noatime  /tmp
will fix my cravings. I am uncertain on the cache bit, ordinarily I dislike a priority job or its data being swapped so I run with swappiness down low. I suppose I will just have to test performance for a couple of weeks to see which is best.


--(*(cs25x--));

Offline

Board footer

Powered by FluxBB