RamDisk?

Discussion in 'Linux' started by eno, Mar 4, 2009.

  1. eno

    eno

    Joined:
    Feb 21, 2009
    Messages:
    7
    Likes Received:
    0
    I'm trying to create a ramdisk for /tmp and to place browser cache into. But all the stuff I have tried seems to result in failed boot and a restore.

    sudo mousepad /etc/fstab

    #none /tmp tmpfs defaults 0 0

    removed the #, failed.

    Also tried;

    tmpfs /tmp tmpfs defaults 0 0

    Any ideas, im semi new to linux, so please tell me Im missing something obvious.
     
    eno, Mar 4, 2009
    #1
  2. eno

    rbil

    Joined:
    Aug 14, 2008
    Messages:
    730
    Likes Received:
    0
    Location:
    The Wet Coast, Canada
    /tmp already runs in a ram disk. It's initiated elsewhere, not in fstab.

    Cheers.
     
    rbil, Mar 4, 2009
    #2
  3. eno

    eno

    Joined:
    Feb 21, 2009
    Messages:
    7
    Likes Received:
    0
    Ok, thanks. Ill stop messing around :D

    Safe to move Firefox cache to /tmp ?
     
    eno, Mar 5, 2009
    #3
  4. eno

    rbil

    Joined:
    Aug 14, 2008
    Messages:
    730
    Likes Received:
    0
    Location:
    The Wet Coast, Canada
    Very limited space. I wouldn't do it.

    Cheers.
     
    rbil, Mar 6, 2009
    #4
  5. eno

    eno

    Joined:
    Feb 21, 2009
    Messages:
    7
    Likes Received:
    0
    Thanks alot for your help.

    I had read that moving the cache to a ramdisk would help, I have 1GB of RAM is isn't used that much. Can I create another ram disk for this, or should I just give up on this? :D
     
    eno, Mar 11, 2009
    #5
  6. eno

    ajw1980

    Joined:
    Mar 11, 2009
    Messages:
    1
    Likes Received:
    0
    I wouldn't use /tmp for a ramdisk on the AAO. I also tried it and boot failed. I use /var/tmp just fine, though. Put this in /etc/fstab:

    Code:
    tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
    I wrote a script to put the entire firefox profile directory in to a ramdisk and rsync it back to disk every so often. I've been using it on several machines with no problems.

    Run this:
    Code:
    sudo wget -O /usr/local/bin/ramdisk-profile [url]http://wettstein.homelinux.org/eee/ramdisk-profile[/url]
    sudo chmod +x /usr/local/bin/ramdisk-profile
    sudo /usr/local/bin/ramdisk-profile &
    
    You probably want to make the cache size smaller in the firefox preferences and turn off the safe browsing features (and delete the sqlite databases already created) before you start this script.

    Once it is working add '/usr/local/bin/ramdisk-profile &' to /etc/rc.local. Don't forget the &!

    1GB of RAM should be plenty to do this. I'm using it on a eee pc 4g with with 512MB RAM and it works fine, too.

    Let's just say this makes firefox fast!
     
    ajw1980, Mar 11, 2009
    #6
  7. eno

    eno

    Joined:
    Feb 21, 2009
    Messages:
    7
    Likes Received:
    0
    Thanks for help.
     
    eno, Mar 20, 2009
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.