kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Tippett <tippettm@gmail.com>
To: Ian Woodstock <ian.woodstock@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: sync guest calls made async on host - SQLite performance
Date: Thu, 24 Sep 2009 23:13:11 -0400	[thread overview]
Message-ID: <4ABC3547.10903@gmail.com> (raw)
In-Reply-To: <6b483fa20909241911r6b7a7936udc0fb8edf7c596a5@mail.gmail.com>

Thanks for your response.

Remember that I am not raising questions about the relative performance 
of KVM using guests.  The prevailing opinion would be that performance 
of a guest would range anywhere from considerably slower to around the 
same performance as native - depending on workload, tuning the guest and 
configuration.

I am looking further into a particular anomalous result.  The result is 
that SQLite experiences an _order of magnitude_ - 10x beneficial 
advantage when running under KVM.

My only rationalization of this would be as the subject suggests, is 
that somewhere between the host's HDD and the guests file layer 
something is making a synchronous call asynchronous and batching writes 
  together.

Intuitively this feels that running SQLite under at least a KVM 
virtualized environment will be putting the data at considerably higher 
risk than is present in a non-virtualized environment in case of system 
failure.  Performance is inconsequential in this case.

Focusing in particular on one response

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

I am not asking for comparative performance results, I am looking for 
more data that indicates if the anomalous performance increase is a 
Ubuntu+KVM+2.6.31 thing or a KVM+2.6.31 thing or a KVM thing.

I am looking to the KVM developers to either confirm that the behaviour 
is safe and expected, or to provide other data points to indicate that 
it is a Ubuntu+2.6.31 or a 2.6.31 thing by showing that when KVM is 
properly configured KVM environment the performance sits in the expected 
"considerably slower to around the same speed".

Regards,

Matthew

-------- Original Message  --------
Subject: Re: sync guest calls made async on host - SQLite performance
From: Ian Woodstock <ian.woodstock@gmail.com>
To: kvm@vger.kernel.org
Date: 09/24/2009 10:11 PM

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


  reply	other threads:[~2009-09-25  3:13 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-25  2:11 sync guest calls made async on host - SQLite performance Ian Woodstock
2009-09-25  3:13 ` Matthew Tippett [this message]
  -- strict thread matches above, loose matches on Subject: below --
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
2009-09-23 15:58 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

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=4ABC3547.10903@gmail.com \
    --to=tippettm@gmail.com \
    --cc=ian.woodstock@gmail.com \
    --cc=kvm@vger.kernel.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).