Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Loading  Large extensions, with limited memory< Next Oldest | Next Newest >
friedgold Offline





Group: Members
Posts: 122
Joined: Mar. 2005
Posted: Sep. 23 2005,18:36 QUOTE

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?
Back to top
Profile PM 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: Sep. 23 2005,22:39 QUOTE

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.
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: Sep. 24 2005,00:01 QUOTE

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
Back to top
Profile PM WEB 
SaidinUnleashed Offline





Group: Members
Posts: 1428
Joined: Mar. 2004
Posted: Sep. 24 2005,01:26 QUOTE

Noes.

People like me are still stuck with grumpy hardware~

~_~

-J.P.


--------------
They say if you play a Microsoft CD backwards, you hear satanic messages. That's nothing, cause if you play it forwards, it installs Windows.

Unleash the power of the TILDE~~~
Back to top
Profile PM AOL MSN YIM 
WDef Offline





Group: Members
Posts: 798
Joined: Sep. 2005
Posted: Sep. 24 2005,12:31 QUOTE

I look forward to trying this - thanks very much indeed Friedgold.
Back to top
Profile PM 
6 replies since Sep. 23 2005,18:36 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: Loading  Large extensions

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code