Will using multiple threads with a RandomAccessFile help performance?
concurrency, file-io, java, multithreading, performance
Solution
A fairly common question. Basically using multiple threads will not make your hard drive go any faster. Instead performing concurrent request can make it slower.
Disk subsystems, esp IDE, EIDE, SATA, are designed to read/write sequentially fastest.
Problem
I am working on a (database-ish) project, where data is stored in a flat file. For reading/writing I'm using the `RandomAccessFile` class. Will I gain anything from multithreading, and giving each thread an instance each of `RandomAccessFile`, or will one thread/instance be just as fast? Is there any difference in reading/writing, as you can make instances that only do the reading, and can't write?