The ideas are taken mainly from archlinux: https://wiki.archlinux.org/index.php/Firefox/Profile_on_RAM
Benefits: reduced drive read/writes; better responsiveness; several sessions of firefox simultaneously.
Main files of package “firefox-official” (32-bit) are located at:
- folder “/opt/mozilla/firefox” - application files (~110MB for Firefox version 51.0)
- folder “~/.mozilla” - a user's profile (~60 MB)
- folder “~/.cache/mozilla/firefox” - a user's cash (~10 MB)
If you have enough free RAM (check in terminal: $ free -m), you can copy Firefox to ramdisk and run it independently (and with profile management) from already installed Firefox.
How-to:
1.Make folder /mnt/ramdisk
2.Create ramdisk by adding the following line to file /etc/fstab :
tmpfs /mnt/ramdisk tmpfs size=200M,user,exec 0 0
3.Check that ramdisk was created: $df -h
4.Copy folder /opt/mozilla/firefox to /mnt/ramdisk
5.Create a folder for a new profile: /mnt/ramdisk/profile1
Then run Firefox in terminal and create the new profile.
$ /mnt/ramdisk/firefox/firefox -P
6.After closing Firefox, you can back up or sync files from ramdisk to your drive for future usage (they will be lost after poweroff).