Thread pool configuration

Avinash Lakshman avinash.lakshman at gmail.com
Fri Nov 21 07:55:17 PST 2008


Do the FileChannel's transferTo() and transferFrom() methods use the AIO
framework or are they synchronous in nature? I remember reading somewhere
that the Linux sendfile() implementation relies on O_DIRECT to not disturb
the page cache. Any truth to this?

Thanks
Avinash

On Fri, Nov 21, 2008 at 4:45 AM, Alan Bateman <Alan.Bateman at sun.com> wrote:

> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-discuss/attachments/20081121/01081754/attachment.html 


More information about the nio-discuss mailing list