[ltp] how to silence the hard drive

Jens Rutschmann linux-thinkpad@linux-thinkpad.org
Mon, 06 Jul 2009 15:22:53 +0200


Martin Schuster (IFKL IT OS DSM CD) schrieb am 06.07.2009 12:25:
> Volker Krueger wrote:
>> [...]
>> Now, i discovered the following possible entries for /etc/fstab:
>>
>> tmpfs /var/log tmpfs defaults,noatime,mode=1777 0 0
>> tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
>> tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
>>
>> this generates a ram-disk for each mounted tmpfs, i.e., all temporary
>> stuff goes into the laptop's memory so that the HD is not woken up anymore.
>>
> /tmp in RAM is a good idea (at least if you have enough RAM :)
> 
> /var/tmp is for "Temporary files preserved between system reboots" =>
> maybe shouldn't go to RAM, see
> http://www.pathname.com/fhs/pub/fhs-2.3.html#VARTMPTEMPORARYFILESPRESERVEDBETWEE

I have /tmp mounted on tmpfs and /var/tmp symlinked to it for two or three years 
now, running KDE 3.5 on Gentoo almost every day. I did not have any problems so 
far that I would associate with /var/tmp using tmpfs. YMMV

Didn't know about the fact that /var/tmp should preserve between reboots :-)

Also one could combine the preservation with tmpfs by copying the contents to 
the harddisk and vice versa on startup / shutdown using inits scripts.
That's what I would do if I had the Firefox cache in tmpfs.

Best regards,
Jens