Re: loop device memory usage

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

 



Newsmail wrote:
> hi i'm using loop-aes with aes128 mostly, I would like to know how we can
> calculate the memory usage the loop device needs for a specific amount of
> data to encrypt. jari mentioned when he talked about swap encryption that
> when the machine needs to swap it tries to free memory by it, but to
> encrypt the swap we need memory, and bingo :) well, how can we calculate
> that need or how does it work?

loop-AES's device backed loop preallocates a predetermined amount of RAM
pages at losetup/mount time. It does not allocate any more thereafter at
all, but recycles preallocated pages. That means that it is encrypted swap
and encrypted filesystem safe no matter what amount of data you throw at it.

Amount of preallocation just affects performance: too little preallocation
causes slow performance, and too large preallocation just wastes RAM without
significant performance improvement.

Regards,
Jari Ruusu <jari.ruusu@pp.inet.fi>

-
Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/


[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux