Re: How to resize ramdisk?
-----BEGIN PGP SIGNED MESSAGE-----
On Wed, Mar 25, 2009 at 08:19:09AM +0100, BALLABIO GERARDO wrote:
> [resending as this doesn't seem to have reached the list]
> Alex Owen wrote:
> > I think the ramdisk is now an initramfs loaded into a ramfs.. so by
> > deleting stuff at runtime should free up memory
> Sorry, I do not understand you. What are you suggesting that I should
> delete? [...]
I think what Alex is saying here is, that with modern systems (ramfs),
the RAM based file system just takes as much space as needed, as opposed
to a fixed chunk of RAM which is used as a block device and then
formatted with a "conventional" file system on top (ramdisk).
See <http://www.linuxdevices.com/articles/AT4017834659.html> for an
So you wouldn't need to "resize" your ramdisk (at least not if you are
using ramfs, and if you are on kernel 2.6 it's almost sure you are).
It'll grow and shrink as needed.
> if I delete stuff, ramdisk usage will actually *increase*. Is that wrong?
Yes, the deletions take up space in the read-write overlay, as
so-called "whiteouts". Chris Lamb posted a pointer to an article in LWN
by Valerie Aurora (former Valerie Henson) about how those overlay file
systems work. Recommended. Look a few days back in this list.
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
-----END PGP SIGNATURE-----