diff options
author | Magnus Ahltorp <map@kth.se> | 2017-03-16 16:04:35 +0100 |
---|---|---|
committer | Magnus Ahltorp <map@kth.se> | 2017-03-16 16:04:35 +0100 |
commit | b71679ca2aff4fb7d6c3d9cee72e15c509f6a0ec (patch) | |
tree | 42bebed51411360861e3034253ad84c7a954f657 /src/fsyncport.erl | |
parent | d62f8189a2eb7be50353eef85073b8af6a3e8f79 (diff) |
Make number of fsync processed configurableCATLFISH-102
Diffstat (limited to 'src/fsyncport.erl')
-rw-r--r-- | src/fsyncport.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fsyncport.erl b/src/fsyncport.erl index 55d21ff..c516fa8 100644 --- a/src/fsyncport.erl +++ b/src/fsyncport.erl @@ -29,9 +29,10 @@ fsyncall(Paths, Timeout) -> init(ExtPrg) -> lager:debug("starting fsync service"), process_flag(trap_exit, true), + FsyncProcesses = application:get_env(plop, fsync_parallel_tasks, 32), Ports = lists:map(fun(_N) -> open_port({spawn_executable, ExtPrg}, [{packet, 2}]) end, - lists:seq(1, 32)), + lists:seq(1, FsyncProcesses)), lager:debug("fsync service started", []), {ok, #state{idleports = Ports, busyports = dict:new(), waiting = queue:new(), requests = dict:new()}}. |