DSL Ideas and Suggestions :: Loading  Large extensions



To allow changes to the filesystem while DSL is loaded, a ramdisk is mounted over /ramdisk and symlinks to /ramdisk are created. Loaded .dsl and .tar.gz extensions will occupy this ramdisk. The maximum size of this ramdisk is set to 4/5 of the memory available when the linuxrc in the initrd runs.

If you have a small amount of physical memory the maximum size of this ramdisk will be fairly small (e.g. with 64MB of ram the ramdisk's maximum size is about 45MB). If you want to load large extensions (e.g. GTK2 libraries and a couple of GTK2 apps) you quickly run out of room on the ramdisk and can no longer load additional extensions. Currently creating a swap file/partition makes no difference as the maximum size of the ramdisk is set before any swap files/partitions are mounted (it's set by the linuxrc script in the initrd).

To get around this I modified /etc/init.d/knoppix-autoconfig so that if a swap file or swap partition has been mounted, /ramdisk will be remounted with the maximum size set to 4/5 of the free memory including swap.

This means when using a swap file or partition it is possible to load .tar.gz and .dsl extensions that previously would not have had room.

The relevent section of my knoppix-autoconfig now looks like this:

Code Sample
update_progress 90

FREEMEM="$(awk 'BEGIN{m=0};/MemFree|Cached|SwapFree/{m+=$2};END{print m}' /proc/meminfo)"

if [ -z "$INSTALLED" ]; then
       # Now that any swap partitions/files are mounted, see if we can increase the ramdisk size
       RAMSIZE="$(expr $FREEMEM \* 4 / 5)"
       [ -n "$RAMSIZE" ] && mount -o "remount,size=${RAMSIZE}k" /ramdisk
fi


Maybe this change could be incorporated into DSL?

Now that's an AWESOME improvement for livecd/frugal users with a decent amount of available swap space but with limited RAM.

Hopefully after some testing it could be included into a future release of DSL.

This change could help encourage some people with lower RAM machines to go the "frugal" route instead of going the full hard disk install method that they must use today.

friedgold, this is very nice, indeed.

Looking at it and testing it now.  Look for it in the next release.

Thanks for sharing.

So, now I can drop the full hard drive installs out of DSL? :D

Robert

Noes.

People like me are still stuck with grumpy hardware~

~_~

-J.P.

I look forward to trying this - thanks very much indeed Friedgold.
Next Page...
original here.