You are not logged in.
Pages: 1
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
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.
Offline
thanks ...would either method make any difference? what would you suggest?
Offline
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 :-)
Offline
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
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
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
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
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
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
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)
:: / my web presence
Offline
mount -o remount,size=1G,noatime /tmp
"just below me"
Offline
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
Pages: 1