Re: Howto reduce the size of /tmp as tmpfs?

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

 



On 11/18/2016 06:30 AM, Robert Nichols wrote:
> On 11/18/2016 07:39 AM, Frédéric Bron wrote:
>>> While tmpfs does utilize RAM it will actually move contents to swap
>>> in the event RAM is
>>> actually needed.
>>
>> So that's normal that my RAM looks full (in top) and the swap and /tmp
>> are empty. This means that I still have about 8Gb free RAM available,
>> right? I am happy then.
> 
> You have all 16GB available. That "8GB" for /tmp is just a limit. The
> actual space used grows and shrinks as you add and delete files there.
> Think of it like the ulimit for process size. Just because processes
> might be allowed to grow to 4GB doesn't mean that all processes _use_ 4GB.
> 
> There really isn't a lot of difference between /tmp in RAM and /tmp on
> disk.
> 
> With /tmp on disk, files are written initially to the buffer cache, and
> get flushed out to disk when something else needs the RAM or,
> eventually, by the automatic push of dirty buffer pages. For the latter
> case, a copy of the data remains in the buffer until something else
> needs that RAM. Short-lived files might spend their entire lives in the
> buffer and never get pushed out to disk.
> 
> With /tmp in RAM, files get written to the RAM pages and get pushed out
> to swap when something else needs the RAM.
> 
> The only difference is whether longer-lived files always get written to
> disk regardless of the memory load.
> 
> As for RAM appearing full, see <http://www.linuxatemyram.com/>.

The main problem for using a RAMdisk-based /tmp is that a hell of a lot
of utilities still write temp files to /tmp and with its limited size,
you often get "filesystem full" errors.

Before you start on me, I know the new guidelines say for "large" temp
files the program is supposed to use /var/tmp, but the VAST majority do
NOT do that and probably never will. I live in the real world, solving
real problems and the first thing I do is mask tmp.mount on any
installation. I'm somewhat surprised that they actually gave us a
relatively easy way to get around this stupid idea. I wish it were as
easy to sh*tcan systemd and journalctl (two other really moronic, overly
complicated and badly implemented ideas).
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks@xxxxxxxxxxxxxx -
- AIM/Skype: therps2        ICQ: 226437340           Yahoo: origrps2 -
-                                                                    -
-          When all else fails, try reading the instructions.        -
----------------------------------------------------------------------
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]
  Powered by Linux