summaryrefslogtreecommitdiff
path: root/src/fsyncport.erl
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2017-03-16 16:04:35 +0100
committerMagnus Ahltorp <map@kth.se>2017-03-16 16:04:35 +0100
commitb71679ca2aff4fb7d6c3d9cee72e15c509f6a0ec (patch)
tree42bebed51411360861e3034253ad84c7a954f657 /src/fsyncport.erl
parentd62f8189a2eb7be50353eef85073b8af6a3e8f79 (diff)
Make number of fsync processed configurableCATLFISH-102
Diffstat (limited to 'src/fsyncport.erl')
-rw-r--r--src/fsyncport.erl3
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()}}.