Hello all!
I'm a week or so away from starting this next phase so if anything, now is the time to send out requests for brain-storming.
I've read more within the TC wiki and forums than I likely ever read in college psychology. On a plus note... TC is more rewarding and many times, more entertaining! That said, I still don't know everything there is to know, thus these little projects to test the limits!
Envision if you will... a low end machine, probably i586 as a testing platform, say 512 RAM, no HDD, and a 4GB flash drive through USB.
Basic extensions: acpid, dropbear, dnsmasq, bb-http and a few other back-end services for hardware/network/power management and remote access.
Desktop: Xvesa/Xorg, Xprogs, flwm and similar. At this point, everything is done standard (usb/frugal) and all is well.
Let's say I wanted to load up midnight commander (mc). This would be an app that's rarely used, has a handful of dependencies making it that much larger, but compared to ondemand, it seems (to me) a bit overkill to keep it all in memory on "stand-by" around the clock when those resources could be used elsewhere. (Mind you, I haven't completely researched on-demand scripts to see how much stays in /tce and how much is loaded into RAM, but the following gives reason for this not to be overly important.)
What I'm thinking (and feel free to object and/or suggest alternatives) is having a directory (/tce/hybrid) to store an overlapped rootfs. When TC finishes booting it's normal operations, this second location would be
linked onto the primary root, thus in my mind, only the link itself would technically be in memory, whereas the uncompressed files would remain on storage for if and when they're actually needed. The storage apps would obviously take a bit longer to launch compared to reading from RAM, but even then once the app is no longer in use, that memory is released.
I'm expecting there's some apps that likely won't appreciate being linked and in other instances, this theory would fail for nfs exports/shares in many cases, but the end result "should" prove valid.
To pull this off (again, in theory) we'd simply scan the hybrid location. For directories that already exist in the main root file system, we'd traverse into those directories and just sym-link the files and/or directories within it. For files that already exist, rules would have to be implemented as to whether or not to overwrite, ignore or merge. Since the main root file system is in memory and the hybrid is linked into it, it then suggests that cache files, temp files, etc. would all be written to the memory-based file system, thus writes to the flash should be minimal.
What got me thinking about this: Take OpenOffice for example... the extension is huge. In memory, that's more than 150MB of wasted space while it sits there and does nothing. When using a single application within the package, you're still only utilizing a fraction of what the entire package is spending. The alternative here was to strip the package and break it into a "common" or "shared" pack (libraries, shared images, etc.) and then package each app within it separately (writer, calc, and so on.) If you installed all of the modules, you're still looking at 150+MB of wasted space when ever you're not using it. Now, extract it and have it linked into the main file system... my thoughts are that only the links themselves would take up any active resources and when launching Writer (for example) only those files used by the app would take up resources -- and released once the app closes, for the most part. That's the theory, at least.
Does this go against the TCL principles... yes and no. Considering the fact that the core operating system is still entirely tcz based, we still have a pristine operating system at boot time. Can OoO or other "hybrid" like applications become corrupt? Certainly... no differently than having /opt persistent and something happening to it. The principle is still modular... only how it launches and from where is what becomes non-standard.
Ideas welcome!
Constructive criticisms are also very welcome!
NOTE: Another reason this became a concern/idea was based on the maximum number of loop devices. I haven't had this happen yet, but I'd imagine with all of the tiny libraries that get loaded (one loop each) this may eventually become a problem for TC setups with a large number of extensions installed.