Strange result for SSHFS benchmark

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Strange result for SSHFS benchmark

Vlad C.
While running a short benchmark on SSHFS, I found
something very intriguing -- it takes ~2.7 times
longer to copy a file from an SSHFS mount to a local
partition than to copy the same file from a local
partition to an SSHFS mount.
Here are the results:

# sshfs vlad@localhost:/home/vlad/rpms
/home/vlad/test_ssh
# time cp ~/rpms/KNOPPIX_V3.8.iso
~/test_ssh/KNOPPIX_V3.8.copy.iso
real    1m29.643s
user    0m0.163s
sys     0m2.371s

# time cp ~/test_ssh/KNOPPIX_V3.8.iso
~/rpms/KNOPPIX_V3.8.copy.iso
real    4m3.125s
user    0m0.076s
sys     0m3.987s


Strangely enough, no such difference is present when
using scp:

# time scp vlad@localhost:~/rpms/KNOPPIX_V3.8.iso
~/rpms/KNOPPIX_V3.8.copy.iso
real    1m7.498s
user    0m13.403s
sys     0m5.277s

# time scp ~/rpms/KNOPPIX_V3.8.iso
vlad@localhost:~/rpms/KNOPPIX_V3.8.copy.iso
real    1m1.429s
user    0m12.820s
sys     0m3.822s

These numbers are pretty reproducible on my machine.
Does anyone know what might cause this difference in
performance?
Thanks!
Vlad


               
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs 
 


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Strange result for SSHFS benchmark

Miklos Szeredi
> While running a short benchmark on SSHFS, I found
> something very intriguing -- it takes ~2.7 times
> longer to copy a file from an SSHFS mount to a local
> partition than to copy the same file from a local
> partition to an SSHFS mount.
> Here are the results:
>
> # sshfs vlad@localhost:/home/vlad/rpms
> /home/vlad/test_ssh
> # time cp ~/rpms/KNOPPIX_V3.8.iso
> ~/test_ssh/KNOPPIX_V3.8.copy.iso
> real    1m29.643s
> user    0m0.163s
> sys     0m2.371s
>
> # time cp ~/test_ssh/KNOPPIX_V3.8.iso
> ~/rpms/KNOPPIX_V3.8.copy.iso
> real    4m3.125s
> user    0m0.076s
> sys     0m3.987s
>
>
> Strangely enough, no such difference is present when
> using scp:
>
> # time scp vlad@localhost:~/rpms/KNOPPIX_V3.8.iso
> ~/rpms/KNOPPIX_V3.8.copy.iso
> real    1m7.498s
> user    0m13.403s
> sys     0m5.277s
>
> # time scp ~/rpms/KNOPPIX_V3.8.iso
> vlad@localhost:~/rpms/KNOPPIX_V3.8.copy.iso
> real    1m1.429s
> user    0m12.820s
> sys     0m3.822s
>
> These numbers are pretty reproducible on my machine.
> Does anyone know what might cause this difference in
> performance?

On a high latency (or very high speed) link, it is not trivial to keep
the network pipe filled with read requests.  The current readahead
algorithm in SSHFS does not always get this right (as in your case
probably).

In the write direction is trivial to fill the network with requests
(it's done automatically by the TCP stack).  I see there's still about
1.5 slowdown compared to scp.  I wonder what causes this.  What is the
size of test file?

Miklos


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Strange result for SSHFS benchmark

Vlad C.
--- Miklos Szeredi <[hidden email]> wrote:

> > While running a short benchmark on SSHFS, I found
> > something very intriguing -- it takes ~2.7 times
> > longer to copy a file from an SSHFS mount to a
> local
> > partition than to copy the same file from a local
> > partition to an SSHFS mount.
> > Here are the results:
> >
> > # sshfs vlad@localhost:/home/vlad/rpms
> > /home/vlad/test_ssh
> > # time cp ~/rpms/KNOPPIX_V3.8.iso
> > ~/test_ssh/KNOPPIX_V3.8.copy.iso
> > real    1m29.643s
> > user    0m0.163s
> > sys     0m2.371s
> >
> > # time cp ~/test_ssh/KNOPPIX_V3.8.iso
> > ~/rpms/KNOPPIX_V3.8.copy.iso
> > real    4m3.125s
> > user    0m0.076s
> > sys     0m3.987s
> >
> >
> > Strangely enough, no such difference is present
> when
> > using scp:
> >
> > # time scp vlad@localhost:~/rpms/KNOPPIX_V3.8.iso
> > ~/rpms/KNOPPIX_V3.8.copy.iso
> > real    1m7.498s
> > user    0m13.403s
> > sys     0m5.277s
> >
> > # time scp ~/rpms/KNOPPIX_V3.8.iso
> > vlad@localhost:~/rpms/KNOPPIX_V3.8.copy.iso
> > real    1m1.429s
> > user    0m12.820s
> > sys     0m3.822s
> >
> > These numbers are pretty reproducible on my
> machine.
> > Does anyone know what might cause this difference
> in
> > performance?
>
> On a high latency (or very high speed) link, it is
> not trivial to keep
> the network pipe filled with read requests.

I was copying to localhost, so this is very high speed
indeed (10-14 MB/s).

> The current readahead
> algorithm in SSHFS does not always get this right
> (as in your case
> probably).
>
> In the write direction is trivial to fill the
> network with requests
> (it's done automatically by the TCP stack).  I see
> there's still about
> 1.5 slowdown compared to scp.  I wonder what causes
> this.  What is the
> size of test file?

KNOPPIX_V3.8.iso is 694M.

Thanks for looking into this!
Vlad


               
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs 
 


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Loading...