Re: Regd: Prefetching and Buffering in eCryptfs

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

 



On 2012-11-27 21:03:28, Rahul Agrawal wrote:
> Hello all,
> 
> I have been running some tests for using eCryptfs with MySQL and have
> posted a query on Stackexchange regarding the results that I got.
> 
> http://superuser.com/questions/511275/does-ecryptfs-prefetch-and-or-buffer-data
> 
> If someone knows about this and could answer the question, I'd really
> appreciate it.

Your test results don't make sense to me at first glance.

In the majority of kernel versions, eCryptfs uses write-through caching.
There were a few kernel releases where a write-back cache was
implemented, but it caused some problems and that patch was reverted.

For the SUM query that you're doing, I'd expect it to be all reads, so
write-back or write-through shouldn't matter much. There would be a
layer of caching of the encrypted pages in the lower filesystem and then
another cached layer of the decrypted pages at the eCryptfs level, so it
is certainly different than when you are just using plain ext4.

You talked about clearing the MySQL buffers and the eCryptfs page cache
(by unmounting and remounting eCryptfs) between tests. There is still
the lower filesystem page cache which isn't being cleared. Maybe that
has something to do with it, but I doubt that is the full story here.

Are you using innodb_flush_method=O_DIRECT? eCryptfs doesn't implement
direct I/O, so I'm not sure how MySQL would handle that on top of
eCryptfs vs. ext4, which does do direct I/O.

This is something that I'd have to dig into more to make any sense of
it. What you're seeing is definitely odd.

Tyler

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Crypto]     [Device Mapper Crypto]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux