Messages in this thread | | | From | Rick Hohensee <> | Subject | RAMdisk revisited | Date | Mon, 21 Jun 1999 08:58:41 -0400 (EDT) |
| |
I had to tweak drivers/block/rd.c for a 2.88meg boot/root floppy a while back. This lead to my first posts to this list and I never got a sensible explanation of why rd_size is 4096 (k). I don't know if kernel "commandline arguments" will override that. I don't see where it would, and this is not a problem that's worth using a bootloader to solve, or bothering the user about at boot time.
Well now I have 64meg of RAM and my rd_size is 40960 (k). I had some other code at one time that would set the RAMdisk to 1/2 actual RAM, but I didn't bother with that this time.
The comments about this are somewhat ambiguous, BTW. rd_size now seems to be a MAXIMUM, and I think if the MAXIMUM is too big, i.e. bigger than your RAM, booting fails. There's no need for it to, since the RAMdisk may be smaller than the maximum.
I thought it would be cute to post to this list, and do a few IRCs and so on at the same time, from a box with a total of zero mounted persistant storage devices, but alas, that stunt has defeated me. I did get booted to a 36 meg RAMdisk as /, and was able to copy most of my 32 meg core setup to the RAMdisk. I had about 300 commands all in RAM, Lynx working out of RAM, etc. But not PPP. This was also using the cc1obj-built kernel. I didn't see anything that looked like it was definitely the kernel not working, though. Between my non-standard filename tree and cp -u'ing the whole world onto / on RAM, 2.2.9-obj can't be blamed for anything.
The decompression in the kernel does a nice job of decompressing a compressed 36 meg ext2 filesystem on a floppy. The floppy read waits for sections of the deflate to complete, and the light on the drive stays on, and it chugs right along. I was worried about that in 64 meg, but no problem.
In other words, the way I got a 36 meg "image" on a 1.44 meg floppy was the usual method for making a root floppy, but do so with a real big blank ext2 loopback file. A 36 meg empty ext2 filesystem compresses to about 38k, i.e. 1000:1 .
Performance 100% in RAM seems slightly snappier for a few things, like du, find, etc. on a 486. It may not be noticable on a current machine. I suppose there may be other uses for a big RAMdisk. Demo'ing Linux, for one thing. Or is that policy? ;o)
Rick Hohensee http://linux01.gwdg.de/~rhohen cyluphonics rootsy guitar xart
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |