Re: Crazy ramdisk idea

Robert Wuest (rwuest@ix.netcom.com)
Sun, 19 Jan 1997 18:39:33 -0600


William Burrow wrote:
>
> JJKennerly (jkenner@rain.org) wrote:
> : laptop users may want to avoid having any swapspace if they have 16MB or more
> : and dont plan on doing too many things all at once, for just this reason.
> : (the hard drive will spin up at miscelaneous random times... for apparently NO
> : reason.)
> [...]
> : Another approach that MIGHT work but I havent tried is to have 2MB of
> : ram disk, and to use it as swap (???) then use plain swap after that. It all
> : depends on weather ram disks themselves are swappable (I'd hope not...)
>
> No, but you don't gain anything. You lose the memory you could be using.

And more. You lose the fs overhead, too. I still have a swap area since
spinning up the hard drive is better than not being able to run an
executable when I need it. I use swapon manually, not in the init
scripts.

>
> Loading apps into a ramdisk ahead of time to avoid touching the harddisk
> has the disadvantage of wasting memory also. A ramdisk with filesystem
> currently is not resizeable thereby wasting memory on unused apps loaded
> into the ramdisk. You may end up using memory TWICE for the text pages of
> the same application. A definate loss.
>
> An idea that has occurred to me is a type of filesystem I'll dub ramdiskfs.
> In this hypothetical fs, text pages within executables would be shared
> with the ramdiskfs pages, thereby getting around the problem of loading
> the program into memory twice. I have no idea how practicable this idea
> is nor how to implement it at this time. This would be quite a win for
> large executables and libraries loaded into ramdisk.

This sounds great. The big win is when running off batteries.

-- 
Robert Wuest, PE                Empowered           Kemet Electronics
Sirius Engineering Company         by           robertwuest@kemet.com
mailto:rwuest@ix.netcom.com       Linux