From: "Thomas Steffen" <steffen.list.account@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Ensuring data is written to disk
Date: Mon, 7 Aug 2006 20:13:57 +0200 [thread overview]
Message-ID: <d7e2700f0608071113m408b5f12u288a032560567aa5@mail.gmail.com> (raw)
In-Reply-To: <44D73C0C.5010205@armiento.net>
On 8/7/06, R. Armiento <reply-2006@armiento.net> wrote:
> Lets assume this typical website setup: HARDWARE: commodity SATA/PATA;
> drive cache is not battery backed up. HOST OS: late Linux 2.6 kernel
> (e.g. 2.6.15), directly, on top of host, a recent version of database
> software (e.g. MySQL 5.1). Running in ~ 'production'.
>
> Now, if I understand the foregoing discussion: the *only* way of running
> this setup with 'full' transactional guarantees on power loss, without
> having to change/patch the Linux kernel, is to turn off write-caching?
> And that severely decreases performance.
And some IDE disks do not let you switch off write-caching. So as far
as I know, you need SCSI for transactional guarantees. SATA might
work, but since so many things "should work" and then don't in SATA, I
would be very careful.
> To reiterate the foregoing discussion: fsync in ext3 only goes to the
> drive cache. ResiserFS v3, which is included in the kernel, does not
> guarantee data integrity on power loss.
I have heard this before. Basically, the OS can interprete the fsync
command as a request to flush all caches, or it can interprete it as a
write barrier. The later gives much higher performance and guarantees
the consistency of the disk content, but it does not guarantee the
consistency with the rest of the world. My impression was that Linux
only does the later, but I did not find a lot of information on this.
> This is somewhat surprising to me, given claims of data integrity made
> by both ext3 and MySQL documentation.
I don't have any problems with that. Both MySQL and ext3 are
transaction safe if used on a correct disk (SCSI). But if your disk
does not handle sync correctly, then the resulting system cannot be
transaction safe.
> And then, on top of this, if one instead runs the database in a QEMU
> with a late Linux 2.6 kernel, one are just making data-loss more likely,
> right? So QEMU is in no way to blame for any of this.
If qemu works correctly: yes. It would be interesting to test that.
> However, this severely decreases performance. Also note: in MySQL the
> MyISAM table type still does not guarantee no data loss; you need innoDB
> for that.
Correct, and MyISAM is much more popular, because it is faster.
Thomas
next prev parent reply other threads:[~2006-08-07 18:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-01 0:11 [Qemu-devel] Ensuring data is written to disk Armistead, Jason
2006-08-01 10:17 ` Jamie Lokier
2006-08-01 10:45 ` Jens Axboe
2006-08-01 14:17 ` Jamie Lokier
2006-08-01 19:05 ` Jens Axboe
2006-08-01 21:50 ` Jamie Lokier
2006-08-02 6:51 ` Jens Axboe
2006-08-02 13:28 ` Jamie Lokier
2006-08-02 15:56 ` Bill C. Riemers
2006-08-07 13:11 ` R. Armiento
2006-08-07 16:14 ` Bill C. Riemers
2006-08-07 18:13 ` Thomas Steffen [this message]
2006-08-08 2:37 ` R. Armiento
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=d7e2700f0608071113m408b5f12u288a032560567aa5@mail.gmail.com \
--to=steffen.list.account@gmail.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).