[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to resize ramdisk?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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
overview.

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.

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFJye/MBcgs9XrR2kYRAtB5AJ0Sy9lUvqoXpaPk4VsoQA8yAyvocACeL1PD
yopaP7jc2pD+I2VswWO1KAc=
=ZHfd
-----END PGP SIGNATURE-----


Reply to: