[erlang-questions] Obsolete exported functions file:raw_{read, write}_file_info/2 - why?
Zabrane Mickael
zabrane3@REDACTED
Thu Sep 15 11:36:18 CEST 2011
Thanks for sharing Joseph.
One more question:
Is the call prim_file:read_file/1 a better alternative to file:read_file/1?
Regards,
Zabrane
On Sep 15, 2011, at 11:25 AM, Joseph Norton wrote:
>
> Hi.
>
> I'm working on a patch for the file.erl module itself. In the meantime, see the attached module as a working example. We have been using this approach for benchmarking purposes since early summer. The performance difference is dramatically better than the default file implementation.
>
> thanks,
>
> Joseph Norton
> norton@REDACTED
>
> <basho_bench_erlang_file_alternative.erl>
> On Sep 15, 2011, at 1:57 AM, erlang wrote:
>
>>> I recommend reading the file.erl source. It's quite instructive to see
>>> how many file I/O functions are redirected to the 'file_server_2'
>>> process. For file I/O-intensive applications (e.g. Hibari and Riak I
>>> know, CouchDB and RabbitMQ I'd guess), having all calls to(*)
>>> file:read_file_info/1 serialized by the file server process is a source
>>> of latency that we (DB authors) may desire to live without.
>>
>> How did you proceed to avoid these calls and reduce latency Scott?
>> Any hints?
>
More information about the erlang-questions
mailing list