wood burning stoves 2.0*
The moose likes Sockets and Internet Protocols and the fly likes FTP very slow Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "FTP very slow" Watch "FTP very slow" New topic

FTP very slow

Tom Simmons

Joined: Nov 16, 2010
Posts: 11
Afternoon All

Not quite sure if this is the right forum section...

I need to implement FTP transfer in a program I support. First time playing with FTP in Java so I knocked up a quick program see what was needed and got some disappoiting results.

If I use FileZilla or the DOS bases FTP command to transfer the 2.37MB test file, it takes about 6 seconds. Using either Commons Net of sun.net.ftp I get 20-30 seconds.

Can anyone shed any light on why there is such a difference?

Apologies for the huge post, but it wouldn't let me attach .java, .txt or .zip files!


Commons Appraoch

Sun Approach

Tom Simmons

Joined: Nov 16, 2010
Posts: 11
Having installed Wireshark I think I might have found something...

With Wireshark I was able to see that when using FileZilla each dollop of data sent was 1360 bytes, however checked the Java approaches the dollops ranged from 688 to 1360 bytes.

I tried adding a buffered read, just in case...

It made no difference.

I agree. Here's the link: http://aspose.com/file-tools
subject: FTP very slow
Similar Threads
File transfer using FTP
Using FTP in jsp
FTP Dowload JPG & XML files only... USing com.oroinc.net.ftp.* from FTP server
How to make directories
Unable to connect to Windows Machine Using FTPClient...