Fold on flash drive

Discussion in 'Distributed Computing' started by lssmit02, Mar 15, 2005.

  1. lssmit02 macrumors 6502

    Mar 25, 2004
    I've got a dual 1.8 G5, and have been folding using mc68k's dual processor script for a while. (Thanks for doing that, btw, mc68k). I was thinking of using a flash drive to fold, to cut down on access to my hard drive. I found a discussion about how to do this as explained by Plutronics (scroll down the page a bit to find the post). But since I'm using mc68k's script, I wasn't sure if this would work.

    First, is there really any benefit to doing this (saving wear & tear on hard drive, heat)?

    Second, is there an easy way to move the two FAH folders to the flash drive without reinstalling the clients? If not, how should I reinstall the clients onto the flash drive?

  2. Dreadnought macrumors 68020


    Jul 22, 2002
    Almere, The Netherlands
    I think it's very easy. Just stop folding and drag everything to the flashdrive. Also did it on my ipod. It's the same when you install a regular version of folding, it installs on your desktop and makes a clutter, everybody throws it in a folder.
  3. plinden macrumors 68040


    Apr 8, 2004
    Hmm, I may be wrong about this, but aren't flash drives limited in the number of read/write operations before they go belly up? Much more so than HDs, which is why we won't be replacing HDs with flash drives even if we get the capacity up? So by doing this are you not putting more wear and tear on your flash drive than on your HD if you keep it there?
  4. benpatient macrumors 68000

    Nov 4, 2003
    i can't really see how this is a particularly good idea.

    hard drives are cheaper than flash drives and you aren't really losing any performance by running from your main hard drive. In fact, running over the USB or FW bus seems like it might be more of a resource hog than when using the HD.

    Your folding activity couldn't account for even half a percent of your daily HD access...even when you aren't using the machine...I don't see the point.
  5. jackieonasses macrumors 6502a


    Mar 3, 2004
    the great OKLAHOMA....
    How?? There are no moving parts? Flash drives are like RAM.... Solid-state memory chips. We would replace hard-drives with Solid-State memory if it were large enough. Rumor has it that Google's search runs entirely off solid-state RAM....

  6. Daveway macrumors 68040


    Jul 10, 2004
    New Orleans / Lafayette, La
    8 billion webpages on flash memory?! HAHA :rolleyes:
  7. plinden macrumors 68040


    Apr 8, 2004
    The may be solid state, but nonvolatile flash memory has almost nothing in common with volatile RAM memory.

    NOR flash memory has typically a limit in the region of 100,000 erase/write operations, and NAND has about 10x that, which means it is very useful for such uses as storing data like digital photos, or for system backups, or even storing programs, ie. any data that isn't modified much. But typical HDs go through many more write cycles than that.

    Flash memory eventually just wears out since every write modifies it physically.
  8. clayj macrumors 604


    Jan 14, 2005
    visiting from downstream
    Ditto what Plinden said... Flash memory is very different from standard RAM in that it retains information even if no power is present. The price for this ability is that Flash memory is limited in the number of write operations per bit within the memory.

    In other words, using Flash memory to save wear-and-tear on your hard drive ain't such a good idea. If your machine's going to be on all of the time, I might suggest using a program to "build" a virtual HD within your machine's RAM, and then use that for your folding operations. The only kicker is that you need to make sure the virtual HD's contents are backed up to a real HD before you restart/shut down your machine.
  9. lssmit02 thread starter macrumors 6502

    Mar 25, 2004
    Avoid hard disk access

    The purpose of folding off of a flash drive, as I understand it, is to avoid the constant wake from sleep activity every time you reach a checkpoint. If you have your computer set to put the drive to sleep when not used, FAH will wake it every time a you complete a checkpoint, causing your drive to spin up regularly. This, it is thought, will decrease the life of your drive.

    There was a discussion about this on the site, and the reasoning made sense to me. As for the issue of limited number of rewrites, apparently it numbers in the thousands per sector, so you'd have to write to the drive millions of times before hitting that wall.

    Assuming you agree with this analysis, a flash drive seems to be a nice way to cut down on unnecessary hard drive access. My concern is that if I merely move the folding@home folders over to the flash drive, mc86k's setup (cron?) won't know where to find the folders. Also, I want to ensure that the data is stored on the flash drives. Right now, it appears that they're stored in the library folder.
  10. stoid macrumors 601


    Feb 17, 2002
    So long, and thanks for all the fish!
    Well OS 9 and earlier had a RAM Disk that you could specify to allocate on start-up, but I don't know if Mac OS X has the same functionality, or if there are third party apps that can do this.

    Also, would it work to replace the Folding data folders on your HD with aliases to the folder stored on an external drive? Or will this not work because folding operates in the command line?
  11. lssmit02 thread starter macrumors 6502

    Mar 25, 2004
    Update: Modified mc68k's scripts to install on flash drive

    After some tinkering, I discovered that you can't just move the F@H1 and F@H2 folders to a flash drive, because mc68k's scripts look for those folders in the "~/" directory (I'm new to Unix, so please excuse my misuse of terminology). For example, the crontab script includes the following instruction: "@reboot cd ~/F@H2; ./fah5 -local -advmethods &." If you just move the folders, the crontab would try to start the fah5 app by looking in the wrong directory. So I modified all of his scripts (in the .setup folder) to change them to install the F@H folders on my flash drive, and to reference those drives so that crontab, login1, login2, work and rid would work.

    Needless to say, it took me several hours to figure this out. Probably, I could have PM'd mc68k, but what's the fun in that! :) I now know a little about using the terminal command line, and several Unix commands, such as "sed." It reminded me of all my tinkering in the dos config.sys and autoexec.bat files to get all of the tsr programs into himem, so that you had the maximum amount lower memory available (640k!) so games like Mech Warrior would run. Ah, the good ol' days.
  12. lssmit02 thread starter macrumors 6502

    Mar 25, 2004
    had to add sleep command to crontab

    I noticed that the scripts were not running at reboot. It turns out that because the flash drive takes a little longer to mount, the crontab was running but unable to find the drive. So when the "@ reboot cd /[flash drive]/fah1" line was run, it couldn't find the directory, and so the command failed. After some digging, I discovered the "sleep" command. I added the following to the crontab, after "@ reboot" and before "cd": "sleep 30;"

    Here is the revised crontab:

    @reboot sleep 30; cd /Volumes/FRIGG/F@H1; ./fah5 -local -advmethods &
    @reboot sleep 30; cd /Volumes/FRIGG/F@H2; ./fah5 -local -advmethods &

    This delays the running of the crontab for 30 seconds after reboot, given the flash drive enough time to mount. Note: the sleep command has to be inserted in both lines, so that both instructions are delayed.
  13. 840quadra Moderator


    Staff Member

    Feb 1, 2005
    Twin Cities Minnesota
    Ram disk! :eek:

    Why did they get rid of that!? I used that for applications and other items that had lots of IO I didn't want the disk to deal with..

    Was the Ram disk ahead of it's time?

    How I would love a 512mb ramdisk on my G5!!

Share This Page