Thread pool configuration
Alan Bateman
Alan.Bateman at Sun.COM
Fri Nov 21 04:45:45 PST 2008
Avinash Lakshman wrote:
> Hi All
>
> Does anyone any pointers to any literature which talks about what
> should be the ideal amount of data to read from disk for maximizing
> I/O throughput? Another naive way of posing this question is what
> should be the ideal buffer size for reads for maximizing I/O throughput?
>
> A
It might be worth elaborating more on what you are doing. Usually,
reading in multiples of the block size is efficient. Alternatively,
mapping the file into memory may be a good solution. If you are just
transferring the bits to a socket then FileChannel#transferTo should use
the most efficient facility available (sendfile or equivalent). In any
case, you will likely need to do your own performance tests.
-Alan.
More information about the nio-discuss
mailing list