Mount /tmp in RAM

You can indeed make it as large as you want, however, is it advisable? From what I’ve read…I wouldn’t try it. I went for the official documentation. Since it is included in kernels 2.4.x and newer, it would make sense that the documentation would be at kernel.org

What you decide to do however, is your own business. There are always tweaks and tricks that can be done. Experiment and have fun.

You are somehow reading that last sentence (about oversizing) as referring back to the previous sentence (about the default size limit). I’m not seeing any indication that they are intended to be connected in that way. And other parts of that report do seem to suggest that swap is used. If swap+memory is over-committed, I would expect problems. And I think that’s all the last sentence is intending to say.

I followed the steps in this document and it was easy.

https://sites.google.com/site/easylinuxtipsproject/ssd-in-opensuse

Which did this to fstab.

#
# Modification for SSD
tmpfs      /var/log        tmpfs      defaults,noatime        0    0
tmpfs      /tmp          tmpfs      defaults,noatime,mode=1777    0    0

hexdump@Corky-PC:~> 

I also just saw a comment to disable readahead but haven’t done it yet.

Happy to hear of your success. You can add Solved to your message title and add it to the tag cloud at the bottom, but the original titl can not be changed by the original poster.

Thank You,

When you make /var/log a tmpfs file system, you will never be able to study log entries from before your last boot.

On 2013-11-15 15:46, hextejas wrote:
>
> I followed the steps in this document and it was easy.
>
> https://sites.google.com/site/easylinuxtipsproject/ssd-in-opensuse
>
> Which did this to fstab.

Have a look at “/usr/lib/tmpfiles.d” and “/etc/tmpfiles.d/”

>
>
> Code:
> --------------------
> #
> # Modification for SSD
> tmpfs /var/log tmpfs defaults,noatime 0 0
> tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
>
> hexdump@Corky-PC:~>
> --------------------

/var/log/? I would never use a tmpfs there. If there is a problem on
your machine there will not be any logs to look at later.

What you might do instead is tell the kernel to delay write operations
and group them. How to do that? Well, I don’t exactly know, but the
laptop-mode-tools (I’m unsure of the exact name, my laptop is powered
off ATM) do it while on battery, so the information can be extracted
from there. I seem to recall a sysconfig file with those adjustments.

/etc/sysconfig/powermanagement ??

/etc/sysconfig/kernel ??


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

What is the reason behind “mode=1777”? I’ve been mounting /tmp in ram for years just using defaults with no adverse reactions.

none                 /tmp                 tmpfs      defaults              0 0

According to the “Mount options for tmpfs” section of

man mount

mode=
Set initial permissions of the root directory.

This is the default and the normal case for /tmp in any case. So it is not needed, but it does no harm.