Quote:
Originally Posted by MasterOfTheWind
Is it possible for me to run Linux purely from RAM?
|
Is there a problem, other than ordinary performance issues, with using the hard drive during normal operation?
Quote:
1) On boot a ramdisk is loaded from a harddrive into memory. It includes all files you would expect to have in a usual installation.
|
I don't think you really want to take that extra time during boot, vs. having Linux automatically read each item from disk once on first use.
Quote:
2) From then on all read/writes happen to RAM, not any physical disk
|
If you really have enough extra ram (vs. the work you're trying to make Linux do) that your idea could work, ordinary file caching will occur such that files are only read from disk on first access and then remain in the cache. So the read part takes nothing to accomplish. Linux will just do it if you have enough ram.
For write, I think you can set up the right kind of tempfs (I forget details between tempfs versions) such that most of the physical ram will be allocated (taken away from the caching of read only files) only when actually used.
Then use aufs to mask the entire hard drive (copy on write) so that any file when modified will be moved from the file cache to the tempfs.
Quote:
3) When I shutdown my computer, RAM is copied back to the harddrive to save all changes I did during my work day.
|
See the aufs documentation (I remember general concepts, not specific details). There is something you could put in a shutdown (or other) script to sync the changes back to the original media.
Quote:
Any suggestions / thoughts?
|
Others mentioned the obvious risk of all forms of unexpected shutdowns before you get a chance to sync files.
In much of my own computer use, most files created exist for only a short time and have no value past the next reboot, and there is usually plenty of ram to keep them in ram. I'd like to figure out a way to use some tempfs to reduce the work the fs does i creating and deleting those files. But they and the files I want to keep are distributed through the directory tree. I would need a much trickier use of aufs than I described above to accomplish what I want and I haven't figured it out yet.
If your intent is to cut the workload on all the files created and deleted that should never need to be synced to disk, I still think you're taking too much risk with all the files that you do want synced to disk.
If your intent is something else, I don't get it at all.