No announcement yet.

system in RAM

  • Filter
  • Time
  • Show
Clear All
new posts

  • system in RAM


    In order to reduce disk access and improve performance I thought about having the whole system running from a RAMdrive.

    I know the system does very good caching for itself and so on, but it still may be interesting to "evaluate".

    Let's say we could fit the whole OS and programs in about 2GB. A cheap pendrive can give you around 20MB/sec of read speed. That is 100 seconds +/-, and quite a resonable figure to me... From then on, I'say everything would go really really fast wouldn't it?

    Quoting Jeremy Clarkson... "How hard can it be!!??"
    My project: double indash, Golf IV

  • #2
    My first setup used an initrd to accomplish what you mention. However, I used RH9, and at that time, initrd's were limited to 4 MB. However, this was enough to get the system running, and all variables which needed to be written off of the HD (SQL Database, logs, etc). I then mounted the HD as read-only and used it to start X and such.

    I kept corrupting the SQL Database, because originally I had it read/write on the HD (2nd partition). This worked for about 2 years, then I switched to Puppy Linux, and the read/write parts are mounted from /dev/ram devices. This has been working for about 2 years now (maybe longer), and hos not corrupted the HD or SQL databases.

    "Speeding things up" was not really my goal, I was more about reliability. However, the unit is a PIII 1 Ghz, and can rip dvds/CDs GPS Nav, and playback mp3s simultaneously without problem.

    Just my 2 cents.


    • #3
      That sounds very interesting. I see you don't have a worklog in this forum. Do you have a blog, or some thread here or there where you explain how you did that with a high level of detail? Links?

      My project: double indash, Golf IV


      • #4
        i triedthis on a pc last year...the unik thing it gives me instant result when i opened a program...but the pc was old
        Carputer to sell :


        • #5
          Originally posted by summer69guy View Post
          i triedthis on a pc last year...the unik thing it gives me instant result when i opened a program...but the pc was old
          What did you do exactly?
          My project: double indash, Golf IV


          • #6
            I never kept a work log on this site, because I finished almost everything before joining the forums. As far as a list of things I did, you can start here:

            My Website

            I didn't talk about the exact details, but what I ended up doing is mounting /dev/ram1 on /mnt/disk and formatting it. Then I placed whatever files I needed there, and unmounted it. Next, I dd it to a file (dd if=/dev/ram1 of=/myfile.img). When I boot, I dd the file back to the ram1 device, then mount it all in the rc.local init script.

            Again, the goal was not the same. I wanted reliability, so my databases are copied to ram drives, and all /var/log files. I even put in a menu option to commit the database back to the harddrive, just so I could change settings and still have them on next reboot.


            • #7
              I've been looking at using tinycore linux -- ... It seems to very cleanly approach the "system in ram" issue...and has a decent repository of packages, and a super easy way to make new ones...

              One thing I like about it is also that you can mix "run-from-ram" apps with some apps stored on disk and mounted via loopback from a file.