Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase download buffer size in Get-FtpFile to speed up downloads #1099

Closed
jamestelfer opened this issue Dec 19, 2016 · 1 comment
Closed

Comments

@jamestelfer
Copy link

What You Are Seeing?

The FTP download rate for a large file is slow compared to HTTP, which should not generally be the case.

Looking at the code for Get-FtpFile, I speculate that the small buffer size is to blame. For similar functionality I've found that a much larger buffer is more efficient -- 256Kb-512Kb. There are diminishing returns with increasing buffer size that testing will soon show.

What is Expected?

FTP should be as fast if not faster than HTTP.

How Did You Get This To Happen? (Steps to Reproduce)

Downloaded a large from from a local FTP server via Get-FtpFile

Output Log

No pertinent information to share

@ferventcoder
Copy link
Member

Interesting that there is a divergence between the two.

ferventcoder pushed a commit that referenced this issue Mar 19, 2017
Buffer size changes from 1KiB to 1MiB. This will make FTP downloads more
performant, and shift the `Get-FtpFile` implementation to match
`Get-WebFile`.
ferventcoder added a commit that referenced this issue Mar 19, 2017
* pr1110:
  GH-1099 Change buffer for FTP downloads to 1MiB
ferventcoder added a commit that referenced this issue Mar 19, 2017
* stable:
  GH-1099 Change buffer for FTP downloads to 1MiB
@ferventcoder ferventcoder added this to the 0.10.4 milestone Mar 19, 2017
@ferventcoder ferventcoder changed the title Get-FtpFile downloads are slow, possibly because of the use of a 1Kb download buffer Increase download buffer size in Get-FtpFile to speed up downloads Mar 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants