public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* ftp way quicker than cp?
@ 2003-09-27 18:22 Andrew DeFaria
  2003-09-27 19:08 ` Igor Pechtchanski
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew DeFaria @ 2003-09-27 18:22 UTC (permalink / raw)
  To: cygwin

Ftp is orders of magnitude quicker than cp. Here's the situation.

File to copy: 25 Meg.
 From location: Santa Clara, USA.
To location: Shanghai, China
Network connection: Not really sure but both Santa Clara and Shanghai 
are in the same NT domain.

I tried the following:

$ time ncftpput sons-cc Release 2.2.0.7.images.tar.gz
2.2.0.7.images.tar.gz:                                  25.99 MB   81.70 
kB/s 

real    5m34.187s
user    0m0.327s
sys     0m1.124s
$ time cp 2.2.0.7.images.tar.gz //sons-shanghai/users/ftp/release

real    133m39.290s
user    0m1.186s
sys     0m7.406s

Why such a huge difference! Had I thought that such a huge difference 
would have occurred I would have switched to ftp long ago!
===
Give me ambiguity or give me something else.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: ftp way quicker than cp?
  2003-09-27 18:22 ftp way quicker than cp? Andrew DeFaria
@ 2003-09-27 19:08 ` Igor Pechtchanski
  2003-09-27 20:18   ` Andrew DeFaria
  0 siblings, 1 reply; 5+ messages in thread
From: Igor Pechtchanski @ 2003-09-27 19:08 UTC (permalink / raw)
  To: Andrew DeFaria; +Cc: cygwin

On Sat, 27 Sep 2003, Andrew DeFaria wrote:

> Ftp is orders of magnitude quicker than cp. Here's the situation.
>
> File to copy: 25 Meg.
>  From location: Santa Clara, USA.
> To location: Shanghai, China
> Network connection: Not really sure but both Santa Clara and Shanghai
> are in the same NT domain.
>
> I tried the following:
>
> $ time ncftpput sons-cc Release 2.2.0.7.images.tar.gz
> 2.2.0.7.images.tar.gz:                                  25.99 MB   81.70
> kB/s
>
> real    5m34.187s
> user    0m0.327s
> sys     0m1.124s
> $ time cp 2.2.0.7.images.tar.gz //sons-shanghai/users/ftp/release
>
> real    133m39.290s
> user    0m1.186s
> sys     0m7.406s
>
> Why such a huge difference! Had I thought that such a huge difference
> would have occurred I would have switched to ftp long ago!

You are not really measuring the time needed for "cp".  You are measuring
the overhead of SMB share access.  Using ftp bypasses all this mechanism
completely, and sends files directly over the network.  Try comparing the
time it takes to copy the file in Windows Explorer to the SMB share and to
an FTP location -- you'll probably see the same results.

IOW, this is not really Cygwin-related.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: ftp way quicker than cp?
  2003-09-27 19:08 ` Igor Pechtchanski
@ 2003-09-27 20:18   ` Andrew DeFaria
  2003-09-27 20:34     ` Igor Pechtchanski
  2003-09-27 21:22     ` Brian Dessent
  0 siblings, 2 replies; 5+ messages in thread
From: Andrew DeFaria @ 2003-09-27 20:18 UTC (permalink / raw)
  To: cygwin

Igor Pechtchanski wrote:

> You are not really measuring the time needed for "cp". You are 
> measuring the overhead of SMB share access. Using ftp bypasses all 
> this mechanism completely, and sends files directly over the network. 
> Try comparing the time it takes to copy the file in Windows Explorer 
> to the SMB share and to an FTP location -- you'll probably see the 
> same results.

I was aware that there is SMB overhead - just didn't think it would be 
that great!

(BTW: How exactly do you get the time command working in conjuntion with 
a "copy the file in the Windows Explorer"! :-) )

> IOW, this is not really Cygwin-related.

This is true if such large overhead is only attributable to SMB.

===
I know you may think you know what I said, but I'm not sure that you 
realize that what you think I said is not really what I meant.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: ftp way quicker than cp?
  2003-09-27 20:18   ` Andrew DeFaria
@ 2003-09-27 20:34     ` Igor Pechtchanski
  2003-09-27 21:22     ` Brian Dessent
  1 sibling, 0 replies; 5+ messages in thread
From: Igor Pechtchanski @ 2003-09-27 20:34 UTC (permalink / raw)
  To: Andrew DeFaria; +Cc: cygwin

On Sat, 27 Sep 2003, Andrew DeFaria wrote:

> Igor Pechtchanski wrote:
>
> > You are not really measuring the time needed for "cp". You are
> > measuring the overhead of SMB share access. Using ftp bypasses all
> > this mechanism completely, and sends files directly over the network.
> > Try comparing the time it takes to copy the file in Windows Explorer
> > to the SMB share and to an FTP location -- you'll probably see the
> > same results.
>
> I was aware that there is SMB overhead - just didn't think it would be
> that great!

Well, if you compared a cp to a local directory with ftp to localhost,
you'd get another datapoint...

> (BTW: How exactly do you get the time command working in conjuntion with
> a "copy the file in the Windows Explorer"! :-) )

Umm, have people forgotten already about the good ol' "wallclock time"? ;-)
Sometimes the old methods are still the best [*].

> > IOW, this is not really Cygwin-related.
>
> This is true if such large overhead is only attributable to SMB.

Well, that's what the experiment is for...  Alternatively, compare a
non-Cygwin ftp with a "copy" from cmd.exe (although that may skew the
comparison a bit if the ftp implementation is not too efficient).
	Igor
[*] Of course, I wouldn't mind at all if someone shows how to
programmatically measure time-to-copy in Windows Explorer...
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: ftp way quicker than cp?
  2003-09-27 20:18   ` Andrew DeFaria
  2003-09-27 20:34     ` Igor Pechtchanski
@ 2003-09-27 21:22     ` Brian Dessent
  1 sibling, 0 replies; 5+ messages in thread
From: Brian Dessent @ 2003-09-27 21:22 UTC (permalink / raw)
  To: cygwin

Andrew DeFaria wrote:

> I was aware that there is SMB overhead - just didn't think it would be
> that great!

It's not necessarily overhead as in "extra data" but also round trip
delay times.  SMB was designed for use with a low-latency local network
connection, in contrast to FTP which was designed to just stream raw
data over a TCP connection.  In other words there's a bunch of message
passing and other "overhead" that takes TIME in addition to bandwith
with SMB.

> > IOW, this is not really Cygwin-related.
> 
> This is true if such large overhead is only attributable to SMB.

I think you'll find that the Cygwin "cp" command takes about the same
time as "copy" from a regular command prompt, which should also be
comparable to Explorer's copy function.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

end of thread, other threads:[~2003-09-27 21:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-27 18:22 ftp way quicker than cp? Andrew DeFaria
2003-09-27 19:08 ` Igor Pechtchanski
2003-09-27 20:18   ` Andrew DeFaria
2003-09-27 20:34     ` Igor Pechtchanski
2003-09-27 21:22     ` Brian Dessent

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 read-only IMAP folder(s) and NNTP newsgroup(s).