qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] iSCSI support for QEMU
@ 2011-04-21  8:43 Ronnie Sahlberg
  2011-04-21  8:43 ` [Qemu-devel] [PATCH] iSCSI block driver support Ronnie Sahlberg
  2011-04-21  8:50 ` [Qemu-devel] iSCSI support for QEMU Christoph Hellwig
  0 siblings, 2 replies; 16+ messages in thread
From: Ronnie Sahlberg @ 2011-04-21  8:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: stefanha

Please find attached a new version of the patch for iSCSI support.
iSCSI support is automaticallt detected and activated during configure/build
if the libiscsi library is available on the build host.

This library is available at : https://github.com/sahlberg/libiscsi


This new version contains two changes since previous versions
* avoid copying data in the read path and use the api for reading directly
into the application buffers
* use proper task management functions to abort tasks that are cancelled
by qemu


A built in iSCSI initiator has many benefits
* the LUNs used are local to the guest and are not exposed to the host, nor any of the processes running on the host.
* it provides very high performance out-of-the-box, compared to open-iscsi
that requires several special flags to iscsi to match libiscsi
* it avoids cache trashing and having two copies of the same data, once in the 
hosts cache and a second copy in the guest. I.e. O_DIRECT like behaviour.
* management of LUNs are much easier for high-end or enterprise users with
very many iscsi devices. You no longer need to expose many hundreds of devices
to the local host and have them pollute the caches.


Performance is acceptable with libiscsi.
Some basic tests thatve been performed show it to be significantly faster
than an out-of-the-box open-iscsi mounted LUN being accessed by default
QEMU i/o options.

Test was performed as booting a Ubuntu 10.04 host, mounted on a 8GB STGT LUN 
exposed across a 1GbE network.
Test was once the system booted, how long would it take to run, inside the guest, "sudo time dd if=/dev/sda of=/dev/null bs=1M"
i.e. just have the guest read the 8GB system disk.

QEMU+libiscsi                   : 228 seconds
QEMU, default device options    : 273 seconds
QEMU with cache=none            : 387 seconds
QEMU with cache=none,aio=native : 218 seconds


Please review and consider for inclusion.

regards
ronnie sahlberg



From: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Subject: iSCSI support for QEMU
In-Reply-To: 

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [Qemu-devel] iSCSI support for QEMU
@ 2011-06-12  2:54 ronnie sahlberg
  0 siblings, 0 replies; 16+ messages in thread
From: ronnie sahlberg @ 2011-06-12  2:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, stefanha, hch

Sorry about the missing subject line in the previous mail
Got confused when using git-send-patch :-)

regards
ronnie sahlberg

On Sun, Jun 12, 2011 at 12:47 PM, Ronnie Sahlberg
<ronniesahlberg@gmail.com> wrote:
> Please find attached a patch to add built-in support for iSCSI into QEMU.
> Please review and/or apply this patch.
>
> This is the latest version of this patch and I think I have addressed all previous concerns and suggestions.
>
>
> Using built-in iSCSI support has many advantages for certain use cases :
>
> * if you have very many iSCSI devices it may be impractical to expose
> all LUNs to the underlying host.
>
> * the devices become private to the guest and are not visible to the host.
> This automatically avoids polluting the page-cache on the host.
>
> * security, the devices are private to the guest, which prevents other guests or the host itself from accessing the devices.
>
> * security, it allows non-root users a secure way to get private and password protected access to the device by using CHAP authentication.
>
> * migration, many other virtualization systems provide built-in iscsi clients like this. Also providing this as feature in QEMU may make it easier for such users to migrate over to QEMU/KVM.
>
> * easier to maintain. For users with very many QEMU instances I think having guest-private iscsi targets and LUNs may be easier to manage than 'huge set of files in /dev/scsi/*'
>
> * easier to maintain, when copying a QEMU instance from one host to another, this offers a more self-contained solution where the QEMU command line itself cotnains all required storage configuration, instead of also having to coordinate this move with setting up and tearing down open-iscsi logins on the underlying hosts.
>
>
>
>
> The patch has been tested by installing and running several distributions such as RHEL6 and Ubuntu on devices, both system disk as well as the installer CDROM as being iscsi devices.
>
> This testing has also been performed by running full QEMU under valgrind.
>
> Performance is comparable to using open-iscsi devices.
>
>
>

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

end of thread, other threads:[~2011-06-12  2:54 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-21  8:43 [Qemu-devel] iSCSI support for QEMU Ronnie Sahlberg
2011-04-21  8:43 ` [Qemu-devel] [PATCH] iSCSI block driver support Ronnie Sahlberg
2011-04-21  8:50 ` [Qemu-devel] iSCSI support for QEMU Christoph Hellwig
2011-04-21  8:58   ` ronnie sahlberg
2011-04-21  9:09     ` Christoph Hellwig
2011-04-21  9:28       ` ronnie sahlberg
2011-04-21 10:58         ` Stefan Hajnoczi
2011-04-21 11:12           ` ronnie sahlberg
2011-04-21 11:21             ` Stefan Hajnoczi
2011-04-21 11:36               ` ronnie sahlberg
2011-04-21 11:44                 ` Kevin Wolf
2011-04-21 12:08                 ` Stefan Hajnoczi
2011-04-21 12:49                 ` Christoph Hellwig
2011-04-21 20:25                   ` ronnie sahlberg
2011-04-21  9:47       ` ronnie sahlberg
  -- strict thread matches above, loose matches on Subject: below --
2011-06-12  2:54 ronnie sahlberg

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