[erlang-questions] locking caveats in file module

Michael Truog mjtruog@REDACTED
Wed May 18 09:01:28 CEST 2016


If this is related to the async thread pool, you could increase the number of async threads.  Since the async threads have no shared job queue, long filesystem blocking can cause async threads to accumulate jobs, and the only option is to increase the number of threads (despite the CPU/core count) if you have variable latency with filesystem use (which causes async threads to get clogged up unpredictably).

On 05/17/2016 11:37 PM, Max Lapshin wrote:
> We have been hunting a performance bug on customer installation during some time and have found that group of processes (about 300) each hour (when new archive file is opened) got locked with following stacktrace:
>
> [{gen,do_call,4,[{file,"gen.erl"},{line,168}]},
>
>  {gen_server,call,3,[{file,"gen_server.erl"},{line,208}]},
>
>  {file,call,2,[{file,"file.erl"},{line,1487}]},
>
>  {filelib,do_is_dir,2,[{file,"filelib.erl"},{line,130}]},
>
>  {filelib,ensure_dir,1,[{file,"filelib.erl"},{line,231}]},
>
>  {dvr_hour_storage,append1,2,...
>
>
>
> Just a friendly reminder that most of file access functions are called via singleton process.
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160518/e746cf30/attachment.htm>


More information about the erlang-questions mailing list