What ist the fastest way to copy a big number of files in Java. So far I have used file streams and nio. Overall streams seem to be faster than nio. What experiences did you mak
http://www.baptiste-wicht.com/2010/08/file-copy-in-java-benchmark/ might get you your answer.
For the benchmark, I made the tests using different files.
- Little file (5 KB)
- Medium file (50 KB)
- Big file (5 MB)
- Fat file (50 MB)
- And an enormous file (1.3 GB) only binary
And I made the tests first using text files and then using binary files. I made the tests using in three modes :
- On the same hard disk. It's an IDE Hard Disk of 250 GB with 8 MB of cache. It's formatted in Ext4.
- Between two disk. I used the first disk and an other SATA Hard Disk of 250 GB with 16 MB of cache. It's formatted in Ext4.
- Between two disk. I used the first disk and an other SATA Hard Disk of 1 TB with 32 MB of cache. It's formatted using NTFS.
I used a benchmark framework, described here, to make the tests of all the methods. The tests have been made on my personal computer (Ubuntu 10.04 64 bits, Intel Core 2 Duo 3.16 GHz, 6 Go DDR2, SATA Hard Disks). The Java version used is a Java 7 64 bits Virtual Machine...