This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Java in General and the fly likes file transfer Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "file transfer" Watch "file transfer" New topic
Author

file transfer

Ritesh Badwaik
Greenhorn

Joined: Feb 23, 2009
Posts: 16
Hi all,
I want to transfer data file between two Linux machines using java code. I tried this using pscp in java code but the transfer speed is very slow. The file size are between 300 MB to 700 MB.
Can anyone help me ?


Thanks
Ritesh
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 8563

Transfer rate would depend on the data size and the network. Have you done any testing to confirm that the slow rate is because of the code?


[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
Ritesh Badwaik
Greenhorn

Joined: Feb 23, 2009
Posts: 16
yes, maybe this is because of network , following are some results(the time is in seconds)

1 MB 2 MB 5 MB 10 MB 50 MB 100 MB 500 MB

4.92 13.45 24.05 57.14 307.59 530.88 2716.98
6.03 11.88 27.86 55.28 299.3 530.89 2603.73
4.78 11.66 37.03 51.77 298.45 542.5 2721.81
4.51 12.31 27.02 50.27 276.08 525.53 2727.56
5.3 10.7 28.92 51.88 270.16 550.25 2552.5
5.11 12 28.98 53.27 290.32 536.01 2664.52

Is there any other way to minimize this time?


Thanks
Ritesh
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 8563

Don't know. Sorry.
I will move this over to the Performance forum, where you might get better suggestions.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: file transfer
 
Similar Threads
Total memory won't reduce after freeing memory allocated for String?
Multi Files Transfer from client machines to server machines using socket communication in java
Files are not getting copied using scp.
Reading very large file
Any difference betn FTP & SCP