From: Tyler Hicks <tyhicks@canonical.com>
To: Rahul Agrawal <mailrhl@gmail.com>
Cc: ecryptfs <ecryptfs@vger.kernel.org>
Subject: Re: Regd: Prefetching and Buffering in eCryptfs
Date: Tue, 27 Nov 2012 18:44:25 -0800 [thread overview]
Message-ID: <20121128024424.GA17780@boyd> (raw)
In-Reply-To: <CAAQA4tWoyrM09FQkTRBBh8tQMiRng+Dp=2Q2TXTZn7z99vMARA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]
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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-11-28 2:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-28 2:03 Regd: Prefetching and Buffering in eCryptfs Rahul Agrawal
2012-11-28 2:44 ` Tyler Hicks [this message]
2012-11-28 3:33 ` Rahul Agrawal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121128024424.GA17780@boyd \
--to=tyhicks@canonical.com \
--cc=ecryptfs@vger.kernel.org \
--cc=mailrhl@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.