kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sync guest calls made async on host - SQLite performance
@ 2009-09-23 15:58 Matthew Tippett
  2009-09-24 11:44 ` Avi Kivity
  2009-09-29 18:54 ` Anthony Liguori
  0 siblings, 2 replies; 44+ messages in thread
From: Matthew Tippett @ 2009-09-23 15:58 UTC (permalink / raw)
  To: kvm

Hi,

I would like to call attention to the SQLite performance under KVM in 
the current Ubuntu Alpha.

http://www.phoronix.com/scan.php?page=article&item=linux_2631_kvm&num=3

SQLite's benchmark as part of the Phoronix Test Suite is typically IO 
limited and is affected by both disk and filesystem performance.

When comparing SQLite under the host against the guest OS,  there is an 
order of magnitude _IMPROVEMENT_ in the measured performance  of the guest.

I am expecting that the host is doing synchronous IO operations but 
somewhere in the stack the calls are ultimately being made asynchronous 
or at the very least batched for writing.

On the surface, this represents a data integrity issue and  I am 
interested in the KVM communities thoughts on this behaviour.  Is it 
expected? Is it acceptable?  Is it safe?

Regards,

Matthew

^ permalink raw reply	[flat|nested] 44+ messages in thread
* Re: sync guest calls made async on host - SQLite performance
@ 2009-09-25  2:11 Ian Woodstock
  2009-09-25  3:13 ` Matthew Tippett
  0 siblings, 1 reply; 44+ messages in thread
From: Ian Woodstock @ 2009-09-25  2:11 UTC (permalink / raw)
  To: kvm

The Phoronix Test Suite is designed to test a (client) operating
system out of the box and it does a good job at that.
It's certainly valid to run PTS inside a virtual machine but you
you're going to need to tune the host, in this case Karmic.

The way you'd configure a client operating system to a server is
obviously different, for example selecting the right I/O elevator, in
the case of KVM you'll certainly see benefits there.
You'd also want to make sure that the guest OS has been optimally
installed - for exmaple in a VMware environment you'd install VMware
tools - in KVM you'd ensure that you're using VirtIO in the guest for
the same reason.
They you'd also look at optimizations like cpu pinning, use of huge pages, etc.

Just taking an generic installation of Karmic out of the box and
running VMs isn't going to give you real insight into the performance
of KVM. When deploying Linux as a virtualization host you should be
tuning it.
It would certainly be appropriate to have a spin of Karmic that was
designed to run as a virtualization host.

Maybe it would be more appropriate to actually run the test in a tuned
environment and present some results rather than ask a developer to
prove KVM is working.



> The test itself is a simple usage of SQLite.  It is stock KVM as
> available in 2.6.31 on Ubuntu Karmic.  So it would be the environment,
> not the test.
>
> So assuming that KVM upstream works as expected that would leave
> either 2.6.31 having an issue, or Ubuntu having an issue.
>
> Care to make an assertion on the KVM in 2.6.31?  Leaving only Ubuntu's
> installation.
>
> Can some KVM developers attempt to confirm that a 'correctly'
> configured KVM will not demonstrate this behaviour?
> http://www.phoronix-test-suite.com/ (or is already available in newer
> distributions of Fedora, openSUSE and Ubuntu.
>
> Regards... Matthew


On 9/24/09, Avi Kivity <avi@redhat.com> wrote:
> On 09/24/2009 03:31 PM, Matthew Tippett wrote:
>> Thanks Avi,
>>
>> I am still trying to reconcile the your statement with the potential
>> data risks and the numbers observed.
>>
>> My read of your response is that the guest sees a consistent view -
>> the data is commited to the virtual disk device.  Does a synchronous
>> write within the guest trigger a synchronous write of the virtual
>> device within the host?
>>
>
> Yes.
>
>> I don't think offering SQLite users a 10 fold increase in performance
>> with no data integrity risks just by using KVM is a sane proposition.
>>
>
> It isn't, my guess is that the test setup is broken somehow.
>
> --
> Do not meddle in the internals of kernels, for they are subtle and quick to
> panic.
>
>

--
Sent from my mobile device
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 44+ messages in thread
* Re: sync guest calls made async on host - SQLite performance
@ 2009-09-25  7:00 RW
  2009-09-27 11:37 ` Avi Kivity
  0 siblings, 1 reply; 44+ messages in thread
From: RW @ 2009-09-25  7:00 UTC (permalink / raw)
  To: kvm

I've read the article a few days ago and it was interesting.
As I upgraded vom 2.6.29 to 2.6.30 (Gentoo) I also saw a dramatic
increase disk and filesystem performance. But then I realized
that the default mode for ext3 changed to "data=writeback".
So I changed that back to "data=ordered" and performance was
as it was with 2.6.29.

I think ext3 with "data=writeback" in a KVM and KVM started
with "if=virtio,cache=none" is a little bit crazy. I don't know
if this is the case with current Ubuntu Alpha but it looks
like so.

Regards,
Robert

> I would like to call attention to the SQLite performance under KVM in
> the current Ubuntu Alpha.
>
> http://www.phoronix.com/scan.php?page=article&item=linux_2631_kvm&num=3
>
> SQLite's benchmark as part of the Phoronix Test Suite is typically IO
> limited and is affected by both disk and filesystem performance.
>
> en comparing SQLite under the host against the guest OS,  there is an
> der of magnitude _IMPROVEMENT_ in the measured performance  of the guest.
>
> I am expecting that the host is doing synchronous IO operations but
> somewhere in the stack the calls are ultimately being made asynchronous
> or at the very least batched for writing.
>
> On the surface, this represents a data integrity issue and  I am
> interested in the KVM communities thoughts on this behaviour.  Is it
> expected? Is it acceptable?  Is it safe?


^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2009-10-19  5:57 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-23 15:58 sync guest calls made async on host - SQLite performance Matthew Tippett
2009-09-24 11:44 ` Avi Kivity
2009-09-24 12:31   ` Matthew Tippett
2009-09-24 13:03     ` Avi Kivity
2009-09-24 19:49       ` Matthew Tippett
2009-09-25  7:22         ` Avi Kivity
2009-09-25 11:33           ` Matthew Tippett
2009-09-25 15:04             ` Avi Kivity
2009-09-29 18:58             ` Anthony Liguori
2009-09-29 18:57           ` Anthony Liguori
2009-09-29 18:54 ` Anthony Liguori
2009-09-25  2:11 Ian Woodstock
2009-09-25  3:13 ` Matthew Tippett
2009-09-25  7:00 RW
2009-09-27 11:37 ` Avi Kivity
2009-09-27 12:07   ` Matthew Tippett
2009-09-29 19:02     ` Anthony Liguori
2009-09-29 19:32       ` Matthew Tippett
2009-09-29 20:46         ` Dustin Kirkland
2009-09-29 20:51         ` Anthony Liguori
2009-10-07 14:15           ` Matthew Tippett
2009-10-07 16:53           ` Matthew Tippett
2009-10-07 18:59             ` Dustin Kirkland
2009-10-07 19:31               ` Matthew Tippett
2009-10-07 20:12                 ` Avi Kivity
2009-10-07 21:01                   ` Matthew Tippett
2009-10-09  6:05                 ` Dustin Kirkland
     [not found]                 ` <4ACE0196.9010904@gmail.com>
     [not found]                   ` <d9c105ea0910082312n7218e1abhc69a2be660838e89@mail.gmail.com>
     [not found]                     ` <f28b49ce0910090425p385636c3he6dfb7595927d7e4@mail.gmail.com>
2009-10-09 15:18                       ` Dustin Kirkland
2009-10-09 19:06                         ` Matthew Tippett
2009-10-11  9:16                           ` Avi Kivity
2009-10-13 22:37                             ` Christoph Hellwig
2009-10-14 11:03                               ` Avi Kivity
2009-10-14 13:41                                 ` Christoph Hellwig
2009-10-14 16:56                                   ` Avi Kivity
2009-10-14 17:02                                     ` Christoph Hellwig
2009-10-14 22:54                                       ` Anthony Liguori
2009-10-14 23:37                                         ` Avi Kivity
2009-10-15 12:17                                         ` Christoph Hellwig
2009-10-15 12:36                                           ` Christoph Hellwig
2009-10-19  5:56                                           ` Avi Kivity
2009-10-13 23:08                           ` Anthony Liguori
2009-10-14  2:09                             ` Matthew Tippett
2009-10-14  4:12                               ` Dustin Kirkland
2009-10-14 11:32                                 ` Matthew Tippett

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).