Which files/directories can I move to RAM drive to have the system working faster?
I'm planning to upgrade my laptop's memory to 8GB soon, so I'll have some fast memory to use. How to configure the system to work optimal with this memory?
The next changes I consider next are: - upgrading hard drive to SSD - start using virtualization (I need Windows sometimes)
Edit:
Maybe I can sacrifice boot time, and copy some files to RAM drive during boot?
To mount
/tmp
/var/log
and/var/tmp
in RAM. Add these lines to the end of fstab to mount/tmp
(temporary files) astmpfs
(temporary file system):Save, then:
sudo mount -a
Reboot for the changes to take effect. Running df, you should see a new line with
/tmp
,/var/tmp
and/var/logs
mounted ontmpfs
.Note: all log files will be lost after a reboot, to back them up manually run this in terminal:
To move Firefox Cache Into RAM:
Type
about:config
in firefox address bar and click I'll be careful,I promise!. Right click on blank area and create a new string value called:Set its value to
/tmp
Restart Firefox.
As per the Filesystem Hierarchy Standard for Linux,
/var/tmp
should NOT be placed in tmpfs:http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html#VARTMPTEMPORARYFILESPRESERVEDBETWEE
There's not much from a default installation to put on a ramdisk, since it will be erased every time you boot. A ramdisk is only usable for temporary files.
So directories to run of a ramdisk I can think of are /var/run/ and /var/tmp/ (maybe /tmp). I do this on Mac OSX (RamFS: https://gist.github.com/931579).