Using tinycore 2.5 on old Dell CPx laptop (Pentium III 500 MHz CPU with 256 MB RAM)
In an attempt to find an answer to the question in above post I tried the following:
1. Booted Tinycore 2.5 without any mounted tcz extensions and ran busybox free
It reported 32048 MB RAM used according to busybox free.
Following a tip I read somewhere from user Curaga, I then ran the command:
sync && echo 3 > /proc/sys/vm/drop_caches
a number of times in order to clear any caches being used by the virtual memory system.
That resulted in 30832 MB RAM now used.
2. I now rebooted but included (loop mounted) the bash.tcz extension.
Busybox free reported 33080 RAM used
and after clearing the caches (as above): 31504 MB RAM used.
I temporarily concluded that loop mounting a single tcz uses around 700 kB of RAM [31504 - 30832 (from step 1)].
3. As a check, I rebooted but now included: tcz extensions for bash, file, pppd and pppsetup (i.e. loop mounted four tcz extensions).
Running busybox free said: 35816 MB RAM used
After clearing the caches: 33640 MB RAM used
Hence difference between no loop mounted tcz extensions and using four loop mounted tcz extensions approximately = 33640 - 30832 (from test 1 above)
= 2808 MB (for these four loop mounts)
= roughly 700 kB per loop mount.
If the above is correct, it seems to me, that on low RAM machines (such as mine) it would be very beneficial to combine tcz extensions into one big extension in order to limit the number of loop mounts used. For example using fifty loop mounts would use up approx 35 MB of RAM (i.e. 50 x 700 kB), whereas if you combine all these into one big tcz before loop mounting you would just use up 700 kB of RAM to loop mount that single combined tcz extension.
It would be good, I feel therefore, if someone, who understands tcz squashed file systems, could write and provide a simple tool for combining them into one big tcz extension, which would allow the RAM savings indicated above on usage.