[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how is data cached in the memory when using loop device
Newsmail wrote:
> I have an aes128 partition, I use loop-aes. I would like to ask, that when
> linux caches the data prior to disk write, does it cache it in its
> encrypted form or in plain?
Data is cached in unencrypted form.
> because, many times when I have big disk i/o
> the machine seems to freeze for some seconds. I think that this is because
> bdflush begins to write out cached plain data from memory, and encrypts all
> in once, which results in this sort of freeze. is that right?
Yes.
Loop helper thread will release CPU pretty quickly if scheduler says it
should reschedule. Ingo Molnar's new scheduler gives loop helper thread
(that does time consuming encryption) much more CPU time than mainline
scheduler.
Problem may also be that large number of dirty RAM pages are unavailable for
other use until their contents are encrypted and transferred to disk. RAM
shortage causes delays in program execution.
> ps: if anybody experienced this before, did he found any remedy for the problem?
What kernel version are you using? -ac and -aa kernels have better VM than
mainline kernels.
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/