[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3] block: Add support for Secure Shell (ssh) bl
From: |
Richard W.M. Jones |
Subject: |
Re: [Qemu-devel] [PATCH v3] block: Add support for Secure Shell (ssh) block device. |
Date: |
Tue, 26 Mar 2013 17:00:43 +0000 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
On Tue, Mar 26, 2013 at 05:23:03PM +0100, Stefan Hajnoczi wrote:
> On Tue, Mar 26, 2013 at 02:21:39PM +0000, Richard W.M. Jones wrote:
> > On Tue, Mar 26, 2013 at 10:38:46AM +0000, Richard W.M. Jones wrote:
> > > + /* According to the docs, this just updates a field in the
> > > + * sftp_handle structure, so there is no network traffic and it
> > > + * cannot fail.
> > > + */
> > > + libssh2_sftp_seek64(s->sftp_handle, offset);
> >
> > While I was looking at the performance of qemu+ssh vs sshfs, I noticed
> > that the line above has a catastrophic effect on performance, since it
> > causes all readahead data to be thrown away. Ooops. I'm reworking
> > the patch to make seeking more intelligent.
>
> Should libssh2 be smarter and preserve the readahead when offsets are
> contiguous?
>
> It makes sense to fix in QEMU for older libssh2 binaries, but the real
> fix might be for libssh2 to be smart.
It's quite tricky to fix at the libssh2 API level ... However I sent
a preliminary patch upstream:
http://www.libssh2.org/mail/libssh2-devel-archive-2013-03/0019.shtml
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top