Announcement

Collapse
No announcement yet.

ramdisk in Kubuntu 14.04

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    ramdisk in Kubuntu 14.04

    In my win 7 I use a 2gb ramdisk that saves on exit to store temp internet files. Since I save them instead of cleaning them out (no real benefit to doing that), browsing is very quick. Would like to do the same thing in Kubuntu. Since i have 16Gb ram , using 2Gb for a ramdrive will not have much impact on performance.
    Not finding much info on how to do this through searches, except others asking. So I figured i would post it where the people with the most knowledge hang out

    #2
    A cleaner method is simply to declare that /tmp should use the tempfs partition type.
    1. Log out of KDE.
    2. Press Ctrl+Alt+F2 to switch to a TTY console.
    3. Run sudo rm -rfv /tmp/* to delete anything in the current location.
    4. Run sudo nano /etc/fstab. Add the following line at the end:
      Code:
      tmpfs  /tmp  tmpfs  noatime,mode=1777  0  0
    5. Press Ctrl+X to save the file and exit the editor.
    6. Type sudo reboot to reboot.

    Google can help you find instructions for configuring Firefox and Chrom(e)ium to use /tmp for their caches.

    Comment


      #3
      Interesting.
      Windows no longer obstructs my view.
      Using Kubuntu Linux since March 23, 2007.
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment


        #4
        Contrary to similar advice given elsewhere, I'd recommend not placing any of the /var directories on tmpfs. Items in these directories are intended to persist between reboots. That even includes /var/tmp.

        Comment


          #5
          I found an easier way. Since I haven't ffound a way yet to make the info persist between rebbots, I just added browser.cache.disk.parent_directory to abount:config in Firefox and set it to /dev/shm which ubuntu already created. Seems to work. Will do some more research on making a ramdrive that will back up contents before restarts.

          Comment


            #6
            This page has a similar objective.

            http://www.observium.org/wiki/Persis...sk_RRD_storage

            Since you're using this with firefox only, you could use a script that would create and populate the ram disk at log in and another to run firefox and save the ramdisk contents when firefox closes.

            Please Read Me

            Comment


              #7
              When I set FF to use /dev/shm as storage, it worked fine. When I changed it to use /ramdrive/ffcache, it quit using /dev/shm, but will not work with /ramdrive/ffcache. Copied a couple files into /ramdrive and they stayed through reboot. must be doing something wrong. set browser.cache.disk.parent_directory to /ramdrive/ffcache .. Is forefox a teenager? That would explain why it doesn't do what it's told I have two teens at home

              Comment


                #8
                Man beats computer. Turns out it was a permission prblem (isn't that true about 95% of the time?)

                Comment


                  #9
                  Originally posted by vsreeser View Post
                  I found an easier way. Since I haven't ffound a way yet to make the info persist between rebbots, I just added browser.cache.disk.parent_directory to abount:config in Firefox and set it to /dev/shm which ubuntu already created. Seems to work. Will do some more research on making a ramdrive that will back up contents before restarts.
                  Um, where did you find advice about using /dev/shm? That directory definitely does not persist between reboots. Observe:
                  Code:
                  steve@t520:~$ [B]ls -al /dev/shm[/B]
                  lrwxrwxrwx 1 root root 8 Jan  9 16:25 /dev/shm -> /run/shm
                  
                  steve@t520:~$ [B]cat /proc/mounts | grep /run[/B]
                  tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=805580k,mode=755 0 0
                  none /run/shm tmpfs rw,nosuid,nodev,relatime 0 0
                  {...}
                  /dev/shm is symlinked to /run/shm, and the entire /run directory is tmpfs: meaning that it will not persist between reboots.

                  Comment

                  Working...
                  X