Loading  Large extensions


Forum: DSL Ideas and Suggestions
Topic: Loading  Large extensions
started by: friedgold

Posted by friedgold on Sep. 23 2005,18:36
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?

Posted by cbagger01 on Sep. 23 2005,22:39
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.

Posted by roberts on Sep. 24 2005,00:01
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

Posted by SaidinUnleashed on Sep. 24 2005,01:26
Noes.

People like me are still stuck with grumpy hardware~

~_~

-J.P.

Posted by WDef on Sep. 24 2005,12:31
I look forward to trying this - thanks very much indeed Friedgold.
Posted by Gatu on Sep. 24 2005,16:42
Hi friedgold,

this is exactly what I need for my old Mininotebook with 128 MB ram. How can I implement this in some way on my actual frugal installation?

In my understanding all changes go away after reboot....

Update: I just found out that I cannot even change this file :-( it is readonly...

Br,
Gatu

Posted by clivesay on Sep. 29 2005,03:31
OK kids, check this out.......

I've really wanted to try friedgold's hack and I believe I have a new DSL X ram record!

Specs.
Winbook XP5
120mhz
13mb ram + swap

Install
Frugal Grub (of course)  :)
xvesa 640x480 24bit

I actually booted to the full default DSL desktop with icons and dockapps! Was it fast? No, it was slow but once there it worked! With some of the low ram options and noicons it's still slow but functional. It was fun to try! I have some pics but no place to host them at the moment.

Chris

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.