All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ketan Nilangekar <Ketan.Nilangekar@veritas.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	ashish mittal <ashmit602@gmail.com>,
	"Daniel P. Berrange" <berrange@redhat.com>,
	Jeff Cody <jcody@redhat.com>, qemu-devel <qemu-devel@nongnu.org>,
	Kevin Wolf <kwolf@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Fam Zheng <famz@redhat.com>,
	Ashish Mittal <Ashish.Mittal@veritas.com>,
	Abhijit Dey <Abhijit.Dey@veritas.com>,
	Buddhi Madhav <Buddhi.Madhav@veritas.com>,
	"Venkatesha M.G." <Venkatesha.Mg@veritas.com>,
	Nitin Jerath <Nitin.Jerath@veritas.com>,
	Gaurav Bhandarkar <Gaurav.Bhandarkar@veritas.com>,
	Abhishek Kane <Abhishek.Kane@veritas.com>,
	Ketan Mahajan <Ketan.Mahajan@veritas.com>,
	Niranjan Pendharkar <Niranjan.Pendharkar@veritas.com>,
	Nirendra Awasthi <Nirendra.Awasthi@veritas.com>
Subject: Re: [Qemu-devel] [PATCH v7 RFC] block/vxhs: Initial commit to add Veritas HyperScale VxHS block device support
Date: Mon, 28 Nov 2016 10:23:41 +0000	[thread overview]
Message-ID: <995D8EE5-E13C-45C1-A08C-887772D0DEA6@veritas.com> (raw)
In-Reply-To: <20161125113508.GC4939@stefanha-x1.localdomain>



On 11/25/16, 5:05 PM, "Stefan Hajnoczi" <stefanha@gmail.com> wrote:

    On Fri, Nov 25, 2016 at 08:27:26AM +0000, Ketan Nilangekar wrote:
    > On 11/24/16, 9:38 PM, "Stefan Hajnoczi" <stefanha@gmail.com> wrote:
    >     On Thu, Nov 24, 2016 at 11:31:14AM +0000, Ketan Nilangekar wrote:
    >     > On 11/24/16, 4:41 PM, "Stefan Hajnoczi" <stefanha@gmail.com> wrote:
    >     >     On Thu, Nov 24, 2016 at 05:44:37AM +0000, Ketan Nilangekar wrote:
    >     >     > On 11/24/16, 4:07 AM, "Paolo Bonzini" <pbonzini@redhat.com> wrote:
    >     >     > >On 23/11/2016 23:09, ashish mittal wrote:
    >     >     > >> On the topic of protocol security -
    >     >     > >> 
    >     >     > >> Would it be enough for the first patch to implement only
    >     >     > >> authentication and not encryption?
    >     >     > >
    >     >     > >Yes, of course.  However, as we introduce more and more QEMU-specific
    >     >     > >characteristics to a protocol that is already QEMU-specific (it doesn't
    >     >     > >do failover, etc.), I am still not sure of the actual benefit of using
    >     >     > >libqnio versus having an NBD server or FUSE driver.
    >     >     > >
    >     >     > >You have already mentioned performance, but the design has changed so
    >     >     > >much that I think one of the two things has to change: either failover
    >     >     > >moves back to QEMU and there is no (closed source) translator running on
    >     >     > >the node, or the translator needs to speak a well-known and
    >     >     > >already-supported protocol.
    >     >     > 
    >     >     > IMO design has not changed. Implementation has changed significantly. I would propose that we keep resiliency/failover code out of QEMU driver and implement it entirely in libqnio as planned in a subsequent revision. The VxHS server does not need to understand/handle failover at all. 
    >     >     > 
    >     >     > Today libqnio gives us significantly better performance than any NBD/FUSE implementation. We know because we have prototyped with both. Significant improvements to libqnio are also in the pipeline which will use cross memory attach calls to further boost performance. Ofcourse a big reason for the performance is also the HyperScale storage backend but we believe this method of IO tapping/redirecting can be leveraged by other solutions as well.
    >     >     
    >     >     By "cross memory attach" do you mean
    >     >     process_vm_readv(2)/process_vm_writev(2)?
    >     >   
    >     > Ketan> Yes.
    >     >   
    >     >     That puts us back to square one in terms of security.  You have
    >     >     (untrusted) QEMU + (untrusted) libqnio directly accessing the memory of
    >     >     another process on the same machine.  That process is therefore also
    >     >     untrusted and may only process data for one guest so that guests stay
    >     >     isolated from each other.
    >     >     
    >     > Ketan> Understood but this will be no worse than the current network based communication between qnio and vxhs server. And although we have questions around QEMU trust/vulnerability issues, we are looking to implement basic authentication scheme between libqnio and vxhs server.
    >     
    >     This is incorrect.
    >     
    >     Cross memory attach is equivalent to ptrace(2) (i.e. debugger) access.
    >     It means process A reads/writes directly from/to process B memory.  Both
    >     processes must have the same uid/gid.  There is no trust boundary
    >     between them.
    >     
    > Ketan> Not if vxhs server is running as root and initiating the cross mem attach. Which is also why we are proposing a basic authentication mechanism between qemu-vxhs. But anyway the cross memory attach is for a near future implementation. 
    > 
    >     Network communication does not require both processes to have the same
    >     uid/gid.  If you want multiple QEMU processes talking to a single server
    >     there must be a trust boundary between client and server.  The server
    >     can validate the input from the client and reject undesired operations.
    > 
    > Ketan> This is what we are trying to propose. With the addition of authentication between qemu-vxhs server, we should be able to achieve this. Question is, would that be acceptable?
    >     
    >     Hope this makes sense now.
    >     
    >     Two architectures that implement the QEMU trust model correctly are:
    >     
    >     1. Cross memory attach: each QEMU process has a dedicated vxhs server
    >        process to prevent guests from attacking each other.  This is where I
    >        said you might as well put the code inside QEMU since there is no
    >        isolation anyway.  From what you've said it sounds like the vxhs
    >        server needs a host-wide view and is responsible for all guests
    >        running on the host, so I guess we have to rule out this
    >        architecture.
    >     
    >     2. Network communication: one vxhs server process and multiple guests.
    >        Here you might as well use NBD or iSCSI because it already exists and
    >        the vxhs driver doesn't add any unique functionality over existing
    >        protocols.
    > 
    > Ketan> NBD does not give us the performance we are trying to achieve. Besides NBD does not have any authentication support.
    
    NBD over TCP supports TLS with X.509 certificate authentication.  I
    think Daniel Berrange mentioned that.

Ketan> I saw the patch to nbd that was merged in 2015. Before that NBD did not have any auth as Daniel Berrange mentioned. 
    
    NBD over AF_UNIX does not need authentication because it relies on file
    permissions for access control.  Each guest should have its own UNIX
    domain socket that it connects to.  That socket can only see exports
    that have been assigned to the guest.
    
    > There is a hybrid 2.a approach which uses both 1 & 2 but I’d keep that for a later discussion.
    
    Please discuss it now so everyone gets on the same page.  I think there
    is a big gap and we need to communicate so that progress can be made.

Ketan> The approach was to use cross mem attach for IO path and a simplified network IO lib for resiliency/failover. Did not want to derail the current discussion hence the suggestion to take it up later.

    
    >     >     There's an easier way to get even better performance: get rid of libqnio
    >     >     and the external process.  Move the code from the external process into
    >     >     QEMU to eliminate the process_vm_readv(2)/process_vm_writev(2) and
    >     >     context switching.
    >     >     
    >     >     Can you remind me why there needs to be an external process?
    >     >  
    >     > Ketan>  Apart from virtualizing the available direct attached storage on the compute, vxhs storage backend (the external process) provides features such as storage QoS, resiliency, efficient use of direct attached storage, automatic storage recovery points (snapshots) etc. Implementing this in QEMU is not practical and not the purpose of proposing this driver.
    >     
    >     This sounds similar to what QEMU and Linux (file systems, LVM, RAID,
    >     etc) already do.  It brings to mind a third architecture:
    >     
    >     3. A Linux driver or file system.  Then QEMU opens a raw block device.
    >        This is what the Ceph rbd block driver in Linux does.  This
    >        architecture has a kernel-userspace boundary so vxhs does not have to
    >        trust QEMU.
    >     
    >     I suggest Architecture #2.  You'll be able to deploy on existing systems
    >     because QEMU already supports NBD or iSCSI.  Use the time you gain from
    >     switching to this architecture on benchmarking and optimizing NBD or
    >     iSCSI so performance is closer to your goal.
    >     
    > Ketan> We have made a choice to go with QEMU driver approach after serious evaluation of most if not all standard IO tapping mechanisms including NFS, NBD and FUSE. None of these has been able to deliver the performance that we have set ourselves to achieve. Hence the effort to propose this new IO tap which we believe will provide an alternate to the existing mechanisms and hopefully benefit the community.
    
    I thought the VxHS block driver was another network block driver like
    GlusterFS or Sheepdog but you are actually proposing a new local I/O tap
    with the goal of better performance.

Ketan> The VxHS block driver is a new local IO tap with the goal of better performance specifically when used with the VxHS server. This coupled with shared mem IPC (like cross mem attach) could be a much better IO tap option for qemu users. This will also avoid context switch between qemu/network stack to service which happens today in NBD.

    
    Please share fio(1) or other standard benchmark configuration files and
    performance results.

Ketan> We have fio results with the VxHS storage backend which I am not sure I can share in a public forum. 
    
    NBD and libqnio wire protocols have comparable performance
    characteristics.  There is no magic that should give either one a
    fundamental edge over the other.  Am I missing something?

Ketan> I have not seen the NBD code but few things which we considered and are part of libqnio (though not exclusively) are low protocol overhead, threading model, queueing, latencies, memory pools, zero data copies in user-land, scatter-gather write/read etc. Again these are not exclusive to libqnio but could give one protocol the edge over the other. Also part of the “magic” is also in the VxHS storage backend which is able to ingest the IOs with lower latencies.
    
    The main performance difference is probably that libqnio opens 8
    simultaneous connections but that's not unique to the wire protocol.
    What happens when you run 8 NBD simultaneous TCP connections?

Ketan> Possibly. We have not benchmarked this.

    Stefan
    


  reply	other threads:[~2016-11-28 10:23 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28  4:09 [Qemu-devel] [PATCH v7 RFC] block/vxhs: Initial commit to add Veritas HyperScale VxHS block device support Ashish Mittal
2016-09-28 11:12 ` Paolo Bonzini
2016-09-28 11:13 ` Stefan Hajnoczi
2016-10-05  4:02   ` Jeff Cody
2016-10-11  7:56     ` ashish mittal
2016-10-18 19:10       ` Jeff Cody
2016-10-19 20:01         ` Ketan Nilangekar
2016-09-28 11:36 ` Stefan Hajnoczi
2016-09-28 12:06 ` Daniel P. Berrange
2016-09-28 21:45 ` Stefan Hajnoczi
2016-11-14 15:05   ` Stefan Hajnoczi
2016-11-14 18:01     ` ashish mittal
2016-11-15 22:38   ` ashish mittal
2016-11-16  8:12     ` Stefan Hajnoczi
2016-11-18  7:26       ` Jeff Cody
2016-11-18  8:57         ` Daniel P. Berrange
2016-11-18 10:02         ` Stefan Hajnoczi
2016-11-18 10:57           ` Ketan Nilangekar
2016-11-18 11:03             ` Daniel P. Berrange
2016-11-18 11:36           ` Ketan Nilangekar
2016-11-18 11:54             ` Daniel P. Berrange
2016-11-18 13:25               ` Ketan Nilangekar
2016-11-18 13:36                 ` Daniel P. Berrange
2016-11-23  8:25                   ` Ketan Nilangekar
2016-11-23 22:09                     ` ashish mittal
2016-11-23 22:37                       ` Paolo Bonzini
2016-11-24  5:44                         ` Ketan Nilangekar
2016-11-24 11:11                           ` Stefan Hajnoczi
2016-11-24 11:31                             ` Ketan Nilangekar
2016-11-24 16:08                               ` Stefan Hajnoczi
2016-11-25  8:27                                 ` Ketan Nilangekar
2016-11-25 11:35                                   ` Stefan Hajnoczi
2016-11-28 10:23                                     ` Ketan Nilangekar [this message]
2016-11-28 14:17                                       ` Stefan Hajnoczi
2016-11-30  0:45                                         ` ashish mittal
2016-11-30  4:20                                           ` Rakesh Ranjan
2016-11-30  8:35                                             ` Stefan Hajnoczi
2016-11-30  9:01                                         ` Stefan Hajnoczi
2016-11-28  7:15                                   ` Fam Zheng
2016-11-24 10:15                       ` Daniel P. Berrange
2016-11-18 10:34         ` Ketan Nilangekar
2016-11-18 14:49           ` Markus Armbruster
2016-11-18 16:19           ` Jeff Cody
2016-09-29  1:46 ` Jeff Cody
2016-09-29  2:18 ` Jeff Cody
2016-09-29 17:30   ` ashish mittal
2016-09-30  8:36 ` Stefan Hajnoczi
2016-10-01  3:10   ` ashish mittal
2016-10-03 14:10     ` Stefan Hajnoczi
2016-10-20  1:31   ` Ketan Nilangekar
2016-10-24 14:24     ` Paolo Bonzini
2016-10-25  1:56       ` Abhijit Dey
2016-10-25  5:07       ` Ketan Nilangekar
2016-10-25  5:15         ` Abhijit Dey
2016-10-25 11:01         ` Paolo Bonzini
2016-10-25 21:53           ` Ketan Nilangekar
2016-10-25 21:59             ` Paolo Bonzini
     [not found]               ` <21994ADD-7BC5-4C77-8D18-C1D4F9A52277@veritas.com>
     [not found]                 ` <ac0aa87f-702d-b53f-a6b7-2257b25a4a2a@redhat.com>
2016-10-26 22:17                   ` Ketan Nilangekar
2016-11-04  9:49     ` Stefan Hajnoczi
2016-11-04 18:44       ` Ketan Nilangekar
2016-11-04  9:52     ` Stefan Hajnoczi
2016-11-04 18:30       ` Ketan Nilangekar
2016-11-07 10:22         ` Stefan Hajnoczi
2016-11-07 20:27           ` Ketan Nilangekar
2016-11-08 15:39             ` Stefan Hajnoczi
2016-11-09 12:47               ` Paolo Bonzini
2016-12-14  0:06 ashish mittal
2016-12-14  7:23 ` Stefan Hajnoczi
2016-12-16  1:42   ` Buddhi Madhav
2016-12-16  8:09     ` Stefan Hajnoczi
2017-02-01 23:59       ` Ketan Nilangekar
2017-02-02  9:53         ` Daniel P. Berrange
2017-02-02 10:07         ` Stefan Hajnoczi
2017-02-02 10:15           ` Daniel P. Berrange
2017-02-02 20:57             ` Ketan Nilangekar
2017-02-02 21:22               ` Ketan Nilangekar
2017-02-03  9:45                 ` Daniel P. Berrange
2017-02-03 21:32                   ` Ketan Nilangekar
2017-02-02 20:53           ` Ketan Nilangekar

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=995D8EE5-E13C-45C1-A08C-887772D0DEA6@veritas.com \
    --to=ketan.nilangekar@veritas.com \
    --cc=Abhijit.Dey@veritas.com \
    --cc=Abhishek.Kane@veritas.com \
    --cc=Ashish.Mittal@veritas.com \
    --cc=Buddhi.Madhav@veritas.com \
    --cc=Gaurav.Bhandarkar@veritas.com \
    --cc=Ketan.Mahajan@veritas.com \
    --cc=Niranjan.Pendharkar@veritas.com \
    --cc=Nirendra.Awasthi@veritas.com \
    --cc=Nitin.Jerath@veritas.com \
    --cc=Venkatesha.Mg@veritas.com \
    --cc=armbru@redhat.com \
    --cc=ashmit602@gmail.com \
    --cc=berrange@redhat.com \
    --cc=famz@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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.