controlling ramdisk size

Forum: DSL Embedded
Topic: controlling ramdisk size
started by: colinbes

Posted by colinbes on April 06 2007,14:08
I am busy refactoring DSL and am wanting to reduce the ramdisk size to make more memory available to application.

Running "df" shows ramdisk size of 196000 (approx) bytes. (System memory is 256MB).

I have experimented making changes in lilo conf and setting ramdisk_size to values other than 100000 but changes don't seem to take effect - running "df" always shows same size after booting (and running lilo command on modified config file).

I have also tried modifying S00-autoconfig (in etc/rcS.d) where it sets ramsize using remount option by hardcoding ramsize.
Code Sample
[ -n "$RAMSIZE" ] && mount -o remount,size=${RAMSIZE}k" /ramdisk

Yet after refactoring and booting ramdisk size still remains at 196M.

I can modify the ramsize in but I would prefer to do this as part of default setup.

I have just started looking into minirt24 for idea but thought I would ask if anyone can explain where and how the ramdisk is sized. Should modifying ramdisk_size in lilo have worked?

Posted by ^thehatsrule^ on April 06 2007,15:50
ramdisk_size I think is used only for the minirt ramdisk, nothing more.
Unless you plan on using a huge one (ie for pxe booting) that's over 100mb, it won't affect the DSL session.

afaik it doesn't remount the ramsize by hardcoding - it does it by a factor of 3:1
It's calculated somewhere... maybe linuxrc ?
I wouldn't suggest increasing it too much, unless you know you have a lot of ram, since the kernel and running things requires enough free space.

However, since you posted this in dsl-embedded, are you saying you want to change the memory allocated to the qemu vm?  Try the -m switch

Posted by colinbes on April 06 2007,21:07
Actually I want to make the ramdisk smaller as it is allocating large percentage of free ram to ramdisk size which is why I thought I found the issue in S00-autoconfig.

I also suspect ramdisk_size is only used at boot time for minirt. In minirt there is also tweaking of ramdisk size in linuxrc but I didn't feel like refactoring this as well if it was not the place to make the change.

Posted by curaga on April 11 2007,14:55
Ramdisk space isn't actually used, until it is used ;)
So if part of it shows up as free space, then that is not away from ram...

Posted by colinbes on April 11 2007,18:16
Quote (curaga @ April 11 2007,10:55)
Ramdisk space isn't actually used, until it is used ;)
So if part of it shows up as free space, then that is not away from ram...

"True" but that doesn't make for a 24/7 system.

Also we have found that even thought ramdisk is not using physical ram (or so the documents state) available memory is affected.

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