login about faq

I am using chilkat sftp for my Objective-C macOS application and I get good upload speed but miserable download speed.

I use and the following code to download:

    //  Open a file on the server:
    NSString *handle = [sftp OpenFile: ftpFile access: @"readOnly" createDisp: @"openExisting"];
    if (sftp.LastMethodSuccess != YES) {

    //  Download the file:
    success = [sftp DownloadFile: handle toFilePath: downloadFile];

and for upload:

    //  Open a file for writing on the SSH server.
    //  If the file already exists, it is overwritten.
    //  (Specify "createNew" instead of "createTruncate" to
    //  prevent overwriting existing files.)
    NSString *handle = 0;
    handle = [sftp OpenFile: [ftpToDir stringByAppendingPathComponent:ftpPartFile] access: @"writeOnly" createDisp: @"createTruncate"];
    if (handle == nil ) {

    currentTransferBytes = fileToUpload.filesize;
    //  Upload from the local file to the SSH server.
    success = [sftp UploadFile: handle fromFilePath: fileToUpload.filepath];

I have done some tests where I use 70 files, total 2,34 GB

Uploadtime Filezilla: 2:40 (1 file at a time) Chilkat: 2:34

Downloadtime Filezilla: 1:17 (1 file at a time) Chilkat: 7:05

I have also tried using

    success = [sftp DownloadFileByName: ftpFile localFilePath: downloadFile];

and got the same result.

I also tried to play with

sftp.SoRcvBuf = [NSNumber numberWithInt:64*4096]; // 262144

but this didn’t change anything.

Am I doing something wrong?

Kind regards /Nikolai

asked Feb 08 '17 at 17:26

Nickel's gravatar image


Hi Nickel,

I'm going to send post a new build for you to test..


answered Feb 08 '17 at 17:44

chilkat's gravatar image

chilkat ♦♦


answered Feb 08 '17 at 20:25

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Feb 08 '17 at 17:26

Seen: 1,071 times

Last updated: Feb 08 '17 at 20:25

powered by OSQA